CAIN-42 MCPGate

API reference · Trust Fabric

Ask the control plane to decide on a proposed action

POST /fabric/decisions

Last reviewed 2026-11-06

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
scitt_notarizeboolean or nullset true to anchor and notarize this decision in SCITT Merkle tree

Responses

StatusMeaningBody
200The decision. Run the tool only when verdict starts with ALLOWED.Decision
401The X-API-Key header is missing, or the key is unknown, revoked or replaced.Error
403The key is valid but may not do this (for example an agent key approving its own held action).Error
413The request body is over 1048576 bytes.Error
422Validation ErrorHTTPValidationError
429Rate limit or monthly quota reached. Wait for the number of seconds in Retry-After when it is sent.Error

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

Decision · Error · HTTPValidationError · ValidationError · DecisionRequest

← List this tenant's recent Fabric decisions · all 81 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 30-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