Prerequisites
- An agent that exists and has a model configured. An agent with no
model_idis rejected at creation with 422, not at run time. - An API key. Create one with
POST /v1/api-keys/and readtokenfrom the 201 response — it is returned once and never again. - The agent’s id.
GET /v1/agents/lists them.
Choose an entry point
sync is the misleading name here: it returns a JSON response instead of a
stream. It does not wait for the agent to finish. It returns as soon as the
workflow is dispatched, with status set to running.
Steps
Option A — REST, streaming
The response is Server-Sent Events. Do not pipe it to The stream opens with a
jq.connected event, then task_created carrying the
task_id, then the execution events:Option C — CLI
agentarea tasks submit-sync for the JSON form. Loose flags are folded into
the request body, so --description "..." works in place of --data.Option D — A2A JSON-RPC
The endpoint is
POST /v1/agents/{agent_id}/a2a/rpc. Method names are
PascalCase — SendMessage, not message/send. A slash-style method returns
“method not found”.SendMessage returns as soon as the task is submitted. Use
SendStreamingMessage for a live SSE stream, or GetTask to poll.Verify
Fetch the task and confirm it has anexecution_id and a live status:
execution_id present and status of running means the Temporal workflow
started. A task sitting at pending with execution_id: null was persisted but
never dispatched.
Troubleshooting
The streaming endpoint returns nothing parseable
The streaming endpoint returns nothing parseable
POST /v1/agents/{agent_id}/tasks/ responds with text/event-stream .
curl without -N buffers it and jq cannot parse it. Use -N , or
switch to /sync .422 with "does not have a model configured"
422 with "does not have a model configured"
The agent was installed from the catalog without a matching model instance
in this workspace, so
model_id was left unset. Assign a model to the
agent, or pass parameters.model_override on the run.422 from the policy layer
422 from the policy layer
A
task_policy that widens any limit set at the workspace or agent scope is
rejected — task policy may only tighten. Compare against
POST /v1/governance/effective-policy/preview before retrying.The task exists but nothing happens and execution_id is null
The task exists but nothing happens and execution_id is null
The workflow dispatch failed, usually because no Temporal worker is running
on the
agent-tasks queue. The task row is written before dispatch, so a
creation success does not prove a worker exists. Check the worker, then
start a new task — a task that never dispatched cannot be resumed.A creation call returns a task you did not expect
A creation call returns a task you did not expect
If
parameters carries channel_origin.chat_id matching a workflow already
running for the same agent, the message is delivered into that workflow as a
follow-up and the existing task comes back with status: "routed" . No new
task is created.Related
Stream task events
Consume a task’s live event feed over SSE
Attach files to a task
Upload a file with a checksum-bound presigned PUT
Debug a failed task
Read the failure code, narrow it with the task rollup
Tasks
A task is one persisted request to one agent