Every response from Cadreen carries a trace: not just what the system did, but how it decided. Six sections. Stable contract.
On this page
Intelligence contract
Every response carries a trace. The sections below show which rules fired, what knowledge was consulted, and what Cadreen was unsure about.
summary
One-line verdict — what happened and why.
"Governance: blocked; 1 blocking gap; memory healthy"capability
What tools and connections are available and healthy.
{ "total_available": 42, "healthy_count": 38, "active_integrations": ["stripe", "salesforce"] }reasoning
Why the system chose this path — capability matches, evidence, gaps.
{ "capability_matches": 12 }memory
What knowledge was retrieved and whether it was sufficient.
{ "healthy": true, "knowledge_queried": 12 }governance
Policy decisions — approved, blocked, conditional.
{ "active": true, "decision": "blocked", "confidence": 0.94 }humility
What the system doesn't know — gaps detected and whether they block the action.
{ "gaps_detected": 3, "blocking": 1 }process
Timing and component participation.
{ "started_at": "2026-01-15T09:30:00Z", "duration_ms": 342, "components": { "memory": true, "governance": true, "tools": true } }next_action
What the caller should do next — with a labeled endpoint.
{ "type": "resolve_gap", "label": "Resolve 1 blocking gap", "endpoint": "/api/v1/cadreen/connections/install" }field_stability
Which fields are stable, evolving, or internal.
{ "stable": ["summary", "capability.total_available", "governance.decision"], "evolving": ["capability.active_integrations"], "internal": ["process.started_at", "process.duration_ms"] }Endpoints by capability
Ask Cadreen anything. Returns a direct answer, clarification request, or execution handle.
curl -X POST "https://accomplishanything.today/api/v1/cadreen/intent" \ -H "Authorization: Bearer sk_cadreen_..." \ -H "Content-Type: application/json"
Parameters
| Name | Type | Req | Description |
|---|---|---|---|
messages | object[] | Yes | Conversation messages. First element must have role: user. |
messages[].role | enum [user | assistant | system] | Yes | Who is speaking |
messages[].content | string | Yes | The message text |
context.domain | string | No | Optional domain to scope policy/governance evaluation |
context.workspace_id | string | No | Workspace ID for multi-tenant isolation |
mode | enum [auto | chat | execution] | No | Processing modeDefault: auto |
stream | boolean | No | Stream partial results via SSE |
Idempotency-Key | header | No | Unique key for idempotent requests. Prevents duplicate execution if the same request is sent twice within 24 hours. |
Request body
POST /api/v1/cadreen/intent
{
"messages": [{"role": "user", "content": "Customer 123 wants a refund for order 456"}],
"context": {"domain": "ecommerce"}
}Response
full profile{
"id": "int_abc123",
"type": "direct",
"status": "answered",
"message": {"content": "Based on the refund policy..."},
"next_action": {"type": "none", "label": "No further action needed"},
"intelligence": {"version": "1.0", "summary": "Answered directly from policy memory"},
"trace_id": "cad_a2c9"
}Set Accept: application/json; profile=lean for trace_id only. profile=audit for gate decisions.
Response fields
| Field | Type | When | Description |
|---|---|---|---|
id | string | always | Unique intent ID |
type | string | always | Discriminator: direct, clarify, execution, blocked, connect_required |
status | string | always | Canonical outcome: answered, needs_input, ready_to_execute, executing, blocked_by_policy, blocked_by_missing_connection, failed |
next_action | object | always | What the caller should do next |
message | object | always | Direct answer (when type is direct) |
clarification | object | always | Clarification questions (when type is clarify) |
execution | object | always | Execution handle (when type is execution) |
reason_code | string | blocked | Machine-readable block reason (when type is blocked) |
policy_id | string | blocked | Policy that caused the block (when type is blocked) |
endpoint | string | connect_required | Endpoint to resolve (when type is connect_required) |
reason | string | connect_required | Human-readable reason (when type is connect_required) |
intelligence | object | always | Full reasoning trace |
trace_id | string | always | Request trace ID. Present in all profiles (lean included). Use for debugging and support. |
Possible errors
unauthorizedMissing or invalid API keytenant_requiredPass a valid workspace ID headerrouting_unavailableIntent routing engine is not initializedSame as /api/v1/cadreen/intent. Use this if your app already speaks the /v1/ protocol.
curl -X POST "https://accomplishanything.today/api/v1/intent" \ -H "Authorization: Bearer sk_cadreen_..." \ -H "Content-Type: application/json"
Parameters
| Name | Type | Req | Description |
|---|---|---|---|
messages | object[] | Yes | Same as Cadreen-native intent |
context.domain | string | No | Optional domain scope |
mode | enum [auto | chat | execution] | No | Processing modeDefault: auto |
Request body
POST /api/v1/intent
{
"messages": [{"role": "user", "content": "Review this invoice for policy compliance"}]
}Response
full profile{
"id": "int_def456",
"type": "execution",
"status": "ready_to_execute",
"next_action": {"type": "confirm_execution", "label": "Confirm execution"},
"trace_id": "cad_b7d1"
}Set Accept: application/json; profile=lean for trace_id only. profile=audit for gate decisions.
Response fields
| Field | Type | When | Description |
|---|---|---|---|
trace_id | string | always | Request trace ID |
Possible errors
unauthorizedMissing or invalid API keyrouting_unavailableIntent routing engine is not initializedDrop-in OpenAI-compatible endpoint with governed tool calling. Proposes tool calls, evaluates governance, auto-approves or blocks. Cadreen tools execute server-side; client tools returned for client execution.
curl -X POST "https://accomplishanything.today/api/v1/cadreen/chat/completions" \ -H "Authorization: Bearer sk_cadreen_..." \ -H "Content-Type: application/json"
Parameters
| Name | Type | Req | Description |
|---|---|---|---|
model | string | No | Ignored. Any value accepted. |
messages | object[] | Yes | OpenAI-format messages. Content can be string or multimodal array (text, image_url, input_audio, file). |
tools | object[] | No | OpenAI function definitions. Model proposes calls; governance evaluates each. |
conversation_id | string | No | Track conversations across requests. Ensures pending confirmations match correctly. |
memory | boolean | No | Enable cross-conversation memory (default: true). When true, Cadreen injects relevant context from past conversations into the model prompt.Default: true |
temperature | number | No | Ignored. Cadreen uses deterministic reasoning. |
stream | boolean | No | Stream partial results via SSE |
Request body
POST /api/v1/cadreen/chat/completions
{
"model": "cadreen",
"messages": [{"role": "user", "content": "Refund order 456 for $750"}],
"tools": [{"type": "function", "function": {"name": "process_refund", "parameters": {"type": "object", "properties": {"order_id": {"type": "string"}, "amount": {"type": "number"}}}}}]
}Response
full profile{
"id": "chatcmpl-cadreen",
"object": "chat.completion",
"choices": [{
"message": {
"role": "assistant",
"content": "I need your approval before I can process_refund.\n\nSay \"yes\" to proceed or \"no\" to skip."
},
"finish_reason": "stop"
}],
"conversation_id": "conv_01H9...",
"usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}
}Set Accept: application/json; profile=lean for trace_id only. profile=audit for gate decisions.
Response fields
| Field | Type | When | Description |
|---|---|---|---|
id | string | always | Cadreen intent ID |
choices[].message.content | string | always | Text response or governance confirmation prompt |
choices[].message.tool_calls | object[] | always | Approved tool calls for client execution (when governance approves) |
choices[].finish_reason | string | always | 'stop' (text), 'tool_calls' (approved tools), 'length' (truncated) |
conversation_id | string | always | Persistent conversation ID for tracking across requests |
trace_id | string | always | Request trace ID |