API ReferenceDemo

Let the shopping agent carry out a task under a mandate

POST
/api/agent/run

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
Lengthlength <= 500
drill?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    }  ]}