Skip to content

Chat & tasks

There are two ways to give an agent work through the API:

POST /api/agents/{name}/chatPOST /api/agents/{name}/task
ContextContinues the agent’s ongoing conversationStateless — a fresh run each time
Best forConversational use, assistantsAutomations, pipelines, parallel work
Async—async_mode: true
Terminal window
curl -X POST https://acme.exohuman.cc/api/agents/sales-assistant/chat \
-H "Authorization: Bearer $EXOHUMAN_API_KEY" -H 'Content-Type: application/json' \
-d '{"message":"Summarise yesterday’s new leads."}'

The body takes message and an optional model override. Files can be attached as files (name, MIME type and base64 content). The agent must be running; if it is busy, the message waits its turn.

EndpointMethodDescription
/api/agents/{name}/chatPOSTSend a message
/api/agents/{name}/chat/historyGET / DELETECurrent conversation; reset it (owner/admin)
/api/agents/{name}/chat/sessionGETCurrent session and context usage
/api/agents/{name}/chat/sessionsGETList sessions
/api/agents/{name}/chat/sessions/{id}GETOne session with messages
Terminal window
curl -X POST https://acme.exohuman.cc/api/agents/research-analyst/task \
-H "Authorization: Bearer $EXOHUMAN_API_KEY" -H 'Content-Type: application/json' \
-H 'Idempotency-Key: weekly-report-2026-w45' \
-d '{"message":"Compile the weekly competitor report.","async_mode":true}'
# → {"status":"accepted","execution_id":"…","async_mode":true}

Useful fields:

FieldPurpose
messageThe task (required)
modelModel override for this run
async_modeReturn immediately with an execution_id
system_promptExtra instructions appended for this run
allowed_toolsRestrict the tools available
max_turnsCap agentic turns
filesAttachments

A synchronous call holds the connection until the run finishes and returns the response with an execution_id receipt. For long work, use async_mode and poll.

EndpointMethodDescription
/api/agents/{name}/executionsGETList the agent’s executions
/api/agents/{name}/executions/{id}GETStatus, response and cost — the polling target
/api/agents/{name}/executions/{id}/logGETFull transcript with tool calls
/api/agents/{name}/executions/{id}/streamGETLive log (server-sent events)
/api/agents/{name}/executions/runningGETCurrently running executions
/api/agents/{name}/executions/{id}/terminatePOSTStop a running or queued execution
Terminal window
curl -s https://acme.exohuman.cc/api/agents/research-analyst/executions/$EXEC_ID \
-H "Authorization: Bearer $EXOHUMAN_API_KEY" | jq '{status, cost}'

A failed run is not retried automatically. To retry, send the request again with a new idempotency key (or none).

POST /api/agents/{name}/fan-out dispatches several tasks in parallel to an agent and GET /api/agents/{name}/fan-out/{fan_out_id} polls the batch. Parallel capacity is bounded by the agent’s settings and your plan.

Agents shared through a public link are reachable without an account at /api/public/chat/{token}, subject to the agent’s access policy.