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.

summary
"Governance: blocked; 1 blocking gap; memory healthy"

capability

What tools and connections are available and healthy.

capability
{ "total_available": 42, "healthy_count": 38, "active_integrations": ["stripe", "salesforce"] }

reasoning

Why the system chose this path — capability matches, evidence, gaps.

reasoning
{ "capability_matches": 12 }

memory

What knowledge was retrieved and whether it was sufficient.

memory
{ "healthy": true, "knowledge_queried": 12 }

governance

Policy decisions — approved, blocked, conditional.

governance
{ "active": true, "decision": "blocked", "confidence": 0.94 }

humility

What the system doesn't know — gaps detected and whether they block the action.

humility
{ "gaps_detected": 3, "blocking": 1 }

process

Timing and component participation.

process
{ "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.

next_action
{ "type": "resolve_gap", "label": "Resolve 1 blocking gap", "endpoint": "/api/v1/cadreen/connections/install" }

field_stability

Which fields are stable, evolving, or internal.

field_stability
{ "stable": ["summary", "capability.total_available", "governance.decision"], "evolving": ["capability.active_integrations"], "internal": ["process.started_at", "process.duration_ms"] }

Endpoints by capability

POST/api/v1/cadreen/intent

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

NameTypeReqDescription
messagesobject[]YesConversation messages. First element must have role: user.
messages[].roleenum [user | assistant | system]YesWho is speaking
messages[].contentstringYesThe message text
context.domainstringNoOptional domain to scope policy/governance evaluation
context.workspace_idstringNoWorkspace ID for multi-tenant isolation
modeenum [auto | chat | execution]NoProcessing modeDefault: auto
streambooleanNoStream partial results via SSE
Idempotency-KeyheaderNoUnique key for idempotent requests. Prevents duplicate execution if the same request is sent twice within 24 hours.

Request body

HTTP
POST /api/v1/cadreen/intent
{
"messages": [{"role": "user", "content": "Customer 123 wants a refund for order 456"}],
"context": {"domain": "ecommerce"}
}

Response

full profile
JSON
{
"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

FieldTypeWhenDescription
idstringalwaysUnique intent ID
typestringalwaysDiscriminator: direct, clarify, execution, blocked, connect_required
statusstringalwaysCanonical outcome: answered, needs_input, ready_to_execute, executing, blocked_by_policy, blocked_by_missing_connection, failed
next_actionobjectalwaysWhat the caller should do next
messageobjectalwaysDirect answer (when type is direct)
clarificationobjectalwaysClarification questions (when type is clarify)
executionobjectalwaysExecution handle (when type is execution)
reason_codestringblockedMachine-readable block reason (when type is blocked)
policy_idstringblockedPolicy that caused the block (when type is blocked)
endpointstringconnect_requiredEndpoint to resolve (when type is connect_required)
reasonstringconnect_requiredHuman-readable reason (when type is connect_required)
intelligenceobjectalwaysFull reasoning trace
trace_idstringalwaysRequest trace ID. Present in all profiles (lean included). Use for debugging and support.

Possible errors

401unauthorizedMissing or invalid API key
422tenant_requiredPass a valid workspace ID header
503routing_unavailableIntent routing engine is not initialized
POST/api/v1/intent

Same 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

NameTypeReqDescription
messagesobject[]YesSame as Cadreen-native intent
context.domainstringNoOptional domain scope
modeenum [auto | chat | execution]NoProcessing modeDefault: auto

Request body

HTTP
POST /api/v1/intent
{
"messages": [{"role": "user", "content": "Review this invoice for policy compliance"}]
}

Response

full profile
JSON
{
"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

FieldTypeWhenDescription
trace_idstringalwaysRequest trace ID

Possible errors

401unauthorizedMissing or invalid API key
503routing_unavailableIntent routing engine is not initialized
POST/api/v1/cadreen/chat/completions

Drop-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

NameTypeReqDescription
modelstringNoIgnored. Any value accepted.
messagesobject[]YesOpenAI-format messages. Content can be string or multimodal array (text, image_url, input_audio, file).
toolsobject[]NoOpenAI function definitions. Model proposes calls; governance evaluates each.
conversation_idstringNoTrack conversations across requests. Ensures pending confirmations match correctly.
memorybooleanNoEnable cross-conversation memory (default: true). When true, Cadreen injects relevant context from past conversations into the model prompt.Default: true
temperaturenumberNoIgnored. Cadreen uses deterministic reasoning.
streambooleanNoStream partial results via SSE

Request body

HTTP
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
JSON
{
"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

FieldTypeWhenDescription
idstringalwaysCadreen intent ID
choices[].message.contentstringalwaysText response or governance confirmation prompt
choices[].message.tool_callsobject[]alwaysApproved tool calls for client execution (when governance approves)
choices[].finish_reasonstringalways'stop' (text), 'tool_calls' (approved tools), 'length' (truncated)
conversation_idstringalwaysPersistent conversation ID for tracking across requests
trace_idstringalwaysRequest trace ID

Possible errors: 401, 422, 403