CAIN-42 CAIN Studio

API reference · Trust Fabric

Ask the control plane to decide on a proposed action

POST /fabric/decisions

Last reviewed 2026-10-02

POST /fabric/decisions

Request body

DecisionRequest (required)

FieldTypeMeaning
servicestring or nullcatalog slug this call targets
pathstring or nullupstream path this call targets
payloadobjectthe request body the agent intends to send
planarray of objectordered [{tool, args}] plan for ActionProof
agent_idstring or nullmax length 255
provenanceobject or nullwhere each payload argument came from, keyed by dotted path: user | system | tool:<name> | memory:<id> | web:<url> | file:<ref> | agent:<id> | untrusted. An untrusted value in a recipient, URL, predicate, role, amount, account, command or SQL argument is denied; an unreadable label is denied.
chain_idstring or nullyour run id: every decision sharing it forms one trace
pattern ^[A-Za-z0-9._:-]{1,128}$
recordbooleanset false to evaluate without writing an evidence record
default true

Responses

StatusMeaningBody
200Successful ResponseJSON
422Validation ErrorHTTPValidationError
401No key, or a key that is not validJSON detail
429Rate limit for your plan reached; retry after the Retry-After secondsJSON detail

Try it

This call changes data in the account the key belongs to.

The request goes from your browser straight to this site. Your key is not stored unless you tick the box, and then only in this tab's session storage.

Code

curl -sS -X POST 'https://cainstudio.online/fabric/decisions' \
  -H "X-API-Key: $CAIN_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"path": "/tools/send_email", "payload": {"to": "ops@example.com", "subject": "Weekly report"}, "agent_id": "my-agent", "chain_id": "run-001", "record": false, "provenance": {"to": "user"}}'

In application code the SDK wraps this call for you: @cainstudio.guard() on a function sends its name and arguments here and only runs it on ALLOW. See the Python SDK.

Schemas used

HTTPValidationError · ValidationError · DecisionRequest

← List this tenant's recent Fabric decisions · all 79 Trust Fabric calls · Live feed of this tenant's decisions (Server-Sent Events) →

Try CAIN-42 on your own agents

Create a free account and every new account starts with a 7-day trial of the full platform. Or try the sandbox first, with no account at all.

Create a free account →  ·  Try the sandbox  ·  See the whole ecosystem