Validate Agent
POST /agents/{agent_id}/validateThe same validator, without saving. 200 with valid: false rather
than a 422: the caller asked whether it is valid, and an error status
would make a perfectly successful question look like a failed request.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
agent_id | path | string (uuid) | required | — |
Request body — RevisionDocument
Section titled “Request body — RevisionDocument”| Field | Type | Notes | |
|---|---|---|---|
graph_kind | react_loop | pipeline | router | flow | code_task | optional | Default "react_loop". |
graph_config | object | optional | — |
system_prompt | string | optional | Default "". |
model_ref | string | null | optional | max length 200 |
model_params | object | optional | — |
tools | string[] | optional | — |
toolkits | string[] | optional | — |
sub_agents | SubAgentSpec[] | optional | — |
skills | string[] | optional | — |
context_providers | ContextProviderSpec[] | optional | — |
capabilities | object | optional | — |
memory_config | object | optional | — |
context_config | object | optional | — |
guardrails | object | optional | — |
hooks | object | optional | — |
interruptions | ToolCallInterrupt | TurnCountInterrupt | CostInterrupt[] | optional | — |
output_schema | object | null | optional | — |
input_schema | object | null | optional | — |
secrets_required | string[] | optional | — |
max_duration_s | integer | optional | Default 900. min 5 max 21600 |
max_turns | integer | optional | Default 40. min 1 max 500 |
recursion_limit | integer | optional | Default 200. min 1 max 1000 |
retry_policy | object | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | ValidationReport |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/agents/{agent_id}/validate \ -H "Authorization: Bearer $COBRE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "graph_kind": "react_loop", "graph_config": {}, "system_prompt": "string", "model_params": {}, "tools": [ "string" ], "toolkits": [ "string" ], "sub_agents": [ {} ], "skills": [ "string" ], "context_providers": [ {} ], "capabilities": {}, "memory_config": {}, "context_config": {}, "guardrails": {}, "hooks": {}, "interruptions": [], "secrets_required": [ "string" ], "max_duration_s": 0, "max_turns": 0, "recursion_limit": 0, "retry_policy": {} }'Response — ValidationReport
Section titled “Response — ValidationReport”| Field | Type | Notes | |
|---|---|---|---|
valid | boolean | required | — |
errors | ValidationViolation[] | optional | — |
warnings | ValidationWarning[] | optional | — |
resolved_tools | string[] | optional | — |
resolved_skills | string[] | optional | — |
resolved_model_ref | string | null | optional | — |
normalized | RevisionDocument | null | optional | — |