API ReferenceDemo
Let the shopping agent carry out a task under a mandate
The agent can only search, read and propose. Each proposal goes through the policy gate, which
pays, asks the user, or blocks. With stream: true the response is NDJSON, one step per line.
Request Body
application/json
mandateId*string
task*string
Length
length <= 500drill?boolean
Compromised-agent drill: a planner that obeys product pages.
stream?boolean
Stream NDJSON
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/agent/run" \ -H "Content-Type: application/json" \ -d '{ "mandateId": "{{mandateId}}", "task": "Buy washing-up liquid and sponges" }'{ "final": "string", "stoppedBy": "end", "events": [ { "kind": "text", "text": "string", "name": "string", "input": null, "ok": true, "result": null } ]}Sign spending rules POST
With only `text`, the rules reader (the configured model, or the offline reader) turns the sentence into a policy and Mandate signs it. With `policy`, the rules the user reviewed are validated and signed. Rate limited when the model is called.
Purchases waiting for the user GET
Purchases the gate sent to the user (over a soft limit), with when each request expires.