---
title: "Get an agent's graph"
method: GET
path: "/v1/agents/{agent_id}/graph"
tags: ["Agents"]
---

# Get an agent's graph

`GET /v1/agents/{agent_id}/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.

## Path parameters

- `agent_id` string, uuid, required — The ID of the agent whose graph to retrieve.

## Query parameters

- `version` 'published' | 'draft' — Version selector for retrieving a specific agent.

## Response `200`

Successful Response

- AgentGraph — An agent version's workflow graph in the canonical dialect.
  - `agent_id` string, uuid, required — Unique ID of the agent the graph belongs to.
  - `version` 'published' | 'draft', required — Version selector for retrieving a specific agent.
  - `graph` object, 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.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/cooper-square-technologies/apis/external-api.md) · [All operations](https://skmtc.net/cooper-square-technologies/apis/external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cooper-square-technologies/external-api/revisions/ab03b3c80494/schema)
