Skip to main content
Every paid tool call accepts two optional audit fields that record why the agent made it. Both land on the receipt: The SDK logs a warning (not an error) when a paid tool is called without memo. Read them back with GET /v1/analytics/receipts.

TypeScript SDK

memo is plain text. decisionContext is any JSON-serialisable object. Known fields are typed (see DecisionContext in the SDK types); extras are kept as-is.

Python SDK

Python accepts both decisionContext and decision_context. The SDK normalises to camelCase before sending.

Raw HTTP

Without an SDK, include memo and decisionContext in the JSON body of any paid tool call:

Validation

Bad audit values never block a call. The SDK validates lightly on the client before sending:
  • memo over 1000 chars → truncated with a warning log
  • memo empty / non-string → dropped silently
  • decisionContext.confidence outside [0, 1] → dropped silently
  • decisionContext non-object → dropped silently

Where it shows up

Both fields are written to the receipt when it is created:
GET /v1/analytics/receipts returns them with the other receipt attributes, with no extra request.

When to use which

  • Memo only: quick debugging. Set a one-line reason (“why am I calling this?”) on every paid call. The SDK logs a warning if you forget.
  • Memo + decisionContext: agents under programmatic oversight (supervisor agents, audit pipelines, eval rigs). A downstream system can reason about the structured context without parsing prose.
  • Neither: acceptable for fire-and-forget scripts where receipts don’t matter. The SDK won’t block the call, but there is no audit trail.

Tag vs memo vs decisionContext

Each field records something different about the same receipt: Together they link input to outcome, which RoCS is computed from.