Skip to main content
GET
/
workflows
/
{workflow_id_or_name}
Get Agent
curl --request GET \
  --url https://api.promptlayer.com/workflows/{workflow_id_or_name} \
  --header 'X-API-KEY: <api-key>'
{
  "success": true,
  "workflow_id": 123,
  "workflow_name": "my-workflow",
  "version_number": 3,
  "release_labels": [
    "production"
  ],
  "nodes": [
    {
      "name": "greeting",
      "node_type": "VARIABLE",
      "is_output_node": true,
      "configuration": {
        "value": {
          "type": "string",
          "value": "Hello, World!"
        }
      },
      "dependencies": []
    }
  ],
  "edges": [],
  "required_input_variables": {
    "user_message": "string"
  },
  "external_ids": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve a workflow by ID or name, including full node configuration, edges, and version details. By default, the latest version is returned.

Behavior Notes

  • Use version to retrieve a specific version number.
  • Use label to retrieve the version currently assigned to a release label.
  • version and label are mutually exclusive.

Authorizations

X-API-KEY
string
header
required

Path Parameters

workflow_id_or_name
string
required

The agent ID or name.

Query Parameters

version
integer

Specific version number to retrieve. Mutually exclusive with label.

label
string

Release label name to retrieve (e.g. 'prod', 'staging'). Mutually exclusive with version.

Response

Agent retrieved successfully

success
boolean
required
Example:

true

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

nodes
object[]
required

Full node definitions including configuration and dependencies

edges
object[]
required

Connections between nodes with optional conditionals

commit_message
string | null

Commit message for this version

required_input_variables
object

Input variable names mapped to their types

release_labels
string[]

Release labels attached to this version

created_at
string | null

ISO 8601 timestamp of when this version was created