Create a decider
POST/v1/projects/:project_id/deciders
Creates a decider at version 1: a named question set and the backend that answers it, exactly one of agent_id and tool_id. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by active_tool_ids and no knowledge_config.write_memory_store_id — or the create is refused with 400 DECIDER_AGENT_NOT_TOOL_LESS. A tool must run server-side with no action (not client or mcp; a builtin tool names its action in preset_parameters) and must not pin input or questions there, or the create is refused with 400 DECIDER_TOOL_NOT_CALLABLE. A duplicate name in the project is 409 NAME_CONFLICT.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
- 502
- 4XX
Decider created
Bad request — invalid questions, an unknown or tool-bearing agent
Unauthorized
Forbidden
The project does not exist or the caller is not a member of it (RESOURCE_NOT_FOUND).
A decider with this name already exists in the project
REQUEST_REJECTED — the request body is over the size the body parser accepts
QUOTA_EXCEEDED — a requests quota on the calling API key or its project is spent for the window; Retry-After says when it reopens
Response Headers
Seconds until the quota window admits a request again
Unexpected server error — INTERNAL_ERROR, with the raw message never forwarded
The deployment's admission service is asked about this write and did not answer — ADMISSION_UNAVAILABLE; the write did not happen
The deployment's admission service refused this write — answered under the service's own 4xx status, with its code (matching ^[A-Za-z_][A-Za-z0-9_]{0,63}$, not necessarily an ERROR_CODES key), message and meta; the write did not happen. A status this operation also declares on its own is documented there