Skip to main content
POST /v1/agents/runs Invoke any of your account’s agents by passing the agent identifier in the request body,

Request

To stream the response, append ?stream=true and read the body as Server-Sent Events. See Streaming below.

Response

Examples

curl

TypeScript (@meshrouter/sdk ≥ 0.2.0)

Python (meshrouter ≥ 0.2.0)

Streaming

Add ?stream=true to receive Server-Sent Events as the agent generates output. Events are line-delimited; each carries event: and data: lines in the standard SSE format.

TypeScript

Python

Authentication

Send the API key with Authorization: Bearer mesh_live_…. The key must carry the chat scope. Issue keys from the portal under API keys.

Errors

Legacy endpoint

POST /v1/agents/{agentId}/chat (agent id in URL, no agent body field) still works for the moment. Responses carry a Deprecation: true header and a Sunset date — switch your clients to POST /v1/agents/runs before the sunset to avoid breakage.