Skip to content

Invoke an agent

There are five ways to start the same run: wait for the answer, stream it, fire and poll, put it on a cron, or let a signed webhook start it. They differ only in how the caller waits. The run itself, its journal, budget checks and receipts are identical. Pick the mode from the table, then copy the request from its tab.

Invocation modesFive ways to start the same run. They differ only in how the caller waits; the run itself is identical.
CallerSDK · curl · agentSchedulecron expressionSigned senderHMACA2A invokewaits up to 60 sCreate runPOST /v1/runsWebhook URL/v1/hooks/idRunbudget · journal · tierGET …/eventsSSE, from event 1GET /v1/runs/idpoll for statusReceiptsigned proof
Swipe sideways to pan.

1. Invoke and wait

The caller posts to the A2A invoke endpoint, which needs the runs:execute scope.

  • Callers and outputs
  • Control plane
You want Use Caller waits for
The answer in the response, under a minute Sync the output (up to 60 s)
Tokens or steps as they happen Stream an SSE stream that ends with the run
To hand off long work and check later Async a run id, immediately
The agent on a timetable Cron nothing; the scheduler starts it
GitHub, Sentry, PagerDuty or any HMAC sender to start it Webhook 202 with the run id
Many inputs in one call, with a completion callback Batch a batch id; per-run results, and a callback when all finish

The A2A invoke endpoint creates the run, waits for it and returns the output. It polls for up to 60 s. A run that has not succeeded by then answers 502 with its runId and status, so you can keep following it asynchronously.

Terminal window
curl -s -X POST http://localhost:8080/v1/agents/my-agent/a2a/invoke \
-H "Authorization: Bearer $PAL_API_KEY" -H "Content-Type: application/json" -d '{"input":{"q":"..."}}'
# 200 {"runId":"...","status":"succeeded","output":{...}}

Needs the runs:execute scope. Another tenant can call it only when the agent is public; see Marketplace.

Whatever starts the run, it goes through the same path: the budget check (a hard-fail cap returns 402 before anything executes), the journal, the isolation tier from the agent’s manifest, and a receipt you can verify afterwards.

  • Sync waits at most 60 s. Longer work belongs on stream or async.
  • Batch does not exist yet.