Gates
Choose your language:
A gate is the pass/fail rule attached to an agent.
client.gates.get(agentId)
Read the gate configuration attached to an agent.
| SDK | client.gates.get(agent_id) |
|---|---|
| Returns | AgentGate | null |
Parameters:
| Location | Parameter | Type | Required | Description |
|---|---|---|---|---|
| Path | agent_id | string | Required | Agent UUID. |
client.gates.update(agentId, gate)
Update the gate configuration attached to an agent. This does not create an agent and does not configure a CI provider by itself.
| SDK | client.gates.update(agent_id, gate) |
|---|---|
| Returns | AgentGate |
Parameters:
| Location | Parameter | Type | Required | Default | Description |
|---|---|---|---|---|---|
| Path | agent_id | string | Required | — | Agent UUID. |
| Body | overall_score_min | float | Optional | 0.8 | Minimum overall score, between 0 and 1. |
| Body | dimensions_must_pass | list[str] | Optional | — | Dimensions that must individually pass. |
| Body | max_failed_criteria | integer | Optional | — | Maximum number of failed criteria allowed. Minimum 0. |
| Body | warning_band_min | float | Optional | — | Warning floor between 0 and 1. |
The SDK sends the request body as { "gate": gate }. The backend stores that value under agent.config["gate"] and leaves the rest of the agent config intact.
Example:
client.gates.update(agent["id"], {
"overall_score_min": 0.85,
"dimensions_must_pass": ["security", "privacy"],
"max_failed_criteria": 0,
"warning_band_min": 0.75,
})
For pipeline wiring, secrets and provider snippets, use the CI/CD docs.
Was this page helpful?