v84

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0985248447.1 KB
Agents

Get an agent's graph

Retrieve an agent's full workflow graph ({nodes, edges}).

The graph is returned verbatim in the canonical dialect — the same shape POST /v1/agents and PATCH /v1/agents/{agent_id} accept — so a known-good agent can be read back, copied, and edited. Tool-backed nodes appear in their lowered tool form rather than the friendly v1 node types. A draft is visible only to its creator; the published version is visible across its organization.

get/v1/agents/{agent_id}/graph

Path parameters

agent_idstring uuid required

The ID of the agent whose graph to retrieve.

The ID of the agent whose graph to retrieve.

Query parameters

version'published' | 'draft'

Version selector for retrieving a specific agent.

Version of the agent whose graph to retrieve. Use published for the live version, or draft for the latest unpublished changes. Defaults to published.

Response

Successful Response

agent_idstring uuid required

Unique ID of the agent the graph belongs to.

version'published' | 'draft' required

Version selector for retrieving a specific agent.

graphobject required

Workflow graph ({nodes, edges}) in the canonical dialect — the same shape create and update accept. Treat it as an opaque object: it is returned verbatim, so tool-backed nodes appear in their lowered tool form rather than the friendly v1 node types. Read it back to copy and edit a known-good agent.