---
title: "Get Agent"
method: GET
path: "/workflows/{workflow_id_or_name}"
tags: ["workflow"]
---

# Get Agent

`GET /workflows/{workflow_id_or_name}`

## Path parameters

- `workflow_id_or_name` string, required

## Query parameters

- `version` integer
- `label` string

## Response `200`

Agent retrieved successfully

- object
  - `success` boolean, required
  - `workflow_id` integer, required — Unique identifier for the agent
  - `workflow_name` string, required — Name of the agent
  - `version` integer, required — Version number
  - `workflow_version_id` integer, required — Unique identifier for this version
  - `commit_message` string, nullable — Commit message for this version
  - `required_input_variables` object, nullable — Input variable names mapped to their types
  - `release_labels` string[] — Release labels attached to this version
  - `created_at` string, nullable — ISO 8601 timestamp of when this version was created
  - `nodes` object[], required — Full node definitions including configuration and dependencies
    - `id` string, required — UUID of the node
    - `workflow_version_id` integer — Version ID this node belongs to
    - `name` string, required — Node name (unique within a version)
    - `node_type` string, required — Type of node (e.g. PROMPT_TEMPLATE, CODE_EXECUTION, VARIABLE)
    - `is_output_node` boolean, required — Whether this node is an output node
    - `configuration` object, required — Full node configuration (structure depends on node_type)
    - `dependencies` string[], required — Names of nodes this node depends on
  - `edges` object[], required — Connections between nodes with optional conditionals
    - `id` string, required — UUID of the edge
    - `source_node_name` string, required — Name of the source node
    - `target_node_name` string, required — Name of the target node
    - `is_and` boolean, required — Whether all conditionals must be true (AND) or any (OR)
    - `conditionals` object[] — Conditional rules for this edge

## Other responses

- `401` — Unauthorized - missing or invalid API key.
- `404` — Not found - requested resource does not exist or is not accessible.
- `422` — Validation error - request parameters or body are invalid.

---

[API](https://skmtc.dev/promptlayer/apis/promptlayer-api.md) · [All operations](https://skmtc.dev/promptlayer/apis/promptlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/promptlayer/promptlayer-api/revisions/a23093a0a506/schema)
