Read what an Agent version's activation would meet at the publish gate
GET /v1/agents/{agent_id}/versions/{version}/evaluation-gate
| Property | Value |
|---|---|
| Operation | get_agent_version_gate |
| Group | Agent versions |
| Scope | agents:read |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | Not audited: A metadata read; a gate outcome holds ids, codes and counts only. |
| Released in | 1.64.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers what the publish gate would decide for an activation of the version now (1.64.0): the Agent's gating suite, the latest completed run of that suite on the version and its gate outcome, whether activate_agent_version would pass the gate, and the EvaluationGateReason of each detail it would be refused with, in order (run_required, run_stale, a failed check). An Agent whose owner has not turned the gate on answers passes: true with no suite. It writes nothing and reads no Call content, so it is not audited. Whether the version is retired is the activation's own check. A version of another Organization's Agent answers not_found.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the agents:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/agents/agt_.../versions/1/evaluation-gate" \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/agents/agt_.../versions/1/evaluation-gate`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/agents/agt_.../versions/1/evaluation-gate",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | AgentId | yes | The id of an Agent: agt_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
version | path | integer | yes | A version number, from 1. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | AgentVersionGate | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is AgentVersionGate.
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | AgentId | yes | |
checked_at | Timestamp | yes | |
object | "agent_version_gate" | yes | |
outcome | PromptEvalGateOutcome or null | yes | That run's gate outcome, whose suite_revision tells whether it is current; null with no run. |
passes | boolean | yes | Whether an activation of the version now would pass the gate; true with no gate. |
reasons | array of EvaluationGateReason | yes | The reason of each detail an activation would be refused with, in order; empty when it passes. |
run_id | PromptEvalRunId or null | yes | The latest completed run of the gating suite on the version, at any revision; null when there is none or no gate. |
suite_id | PromptEvalSuiteId or null | yes | The Agent's gating suite; null when the owner has not turned the gate on. |
version | integer | yes |