Two Execution Modes
- Endpoint Connection
- Agent (SDK-side)
When no
agent is provided, the evaluation is delegated to the server. The API calls your deployed HTTP endpoint for each test case, generates inference results, and evaluates them. Requires the version to have a conversation_endpoint_connection_id configured.Instead of version_id, you can pass product_id: the API clones the product’s latest properly configured version.Returns
jobId— the inference batch job ID for tracking progressversionId— the version the job runs against: theversion_idyou passed, or the id of the clone created when onlyproduct_idwas giventestCaseCount— total number of test cases queuedmessage— a human-readable status messagespecifications— summary of each specification evaluated
Examples
Endpoint connection (no agent):Parameters
string
The ID of the version to evaluate.
Provide
version_id or product_id (at least one). If both are given, version_id wins and product_id is ignored. Required (not product_id) when agent is given, since the local agent loop needs a concrete version.string
The ID of the product to evaluate, as an alternative to
version_id, for the endpoint-connection mode only. The API clones the product’s latest properly configured version.Provide
version_id or product_id (at least one). If both are given, version_id wins and product_id is ignored. Not supported when agent is given.AgentType
The agent to execute locally. Accepts:
- An
Agentclass instance with acall()method - An agent function (sync or async) with one of three signatures:
(str) -> str,(list[dict]) -> str, or(AgentInput) -> AgentResponse. See the AgentInput reference for all available fields.
version_id (not product_id).List[str]
A list of Specification IDs to evaluate. When omitted, all specifications for the product that have linked metrics and tests are used.
Specifications without linked metrics or without linked tests are silently skipped. If no specification has linked metrics, or none of the linked tests is ready to run, the call returns an error instead of running.