Prerequisites
- Your workspace slug. Every endpoint below is scoped to one — see workspace scoping.
- 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/workspaces/{workspace}/api-keys/and readtokenfrom the 201 response — it is returned once and never again. - The agent’s id.
GET /v1/workspaces/{workspace}/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 The result is
POST /v1/agents/{agent_id}/a2a/rpc, speaking A2A v1.0.
Method names are PascalCase — SendMessage, not message/send. A
slash-style method returns “method not found”, and a request without the
A2A-Version: 1.0 header is refused with -32009.{"task": {...}}. Any A2A v1 client works too — for example
the official a2a-sdk, pointed at the agent card at
/v1/agents/{agent_id}/.well-known/agent-card.json.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/workspaces/{workspace}/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/workspaces/{workspace}/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.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