---
title: "Get agent workflow"
method: GET
path: "/agent/{id}/workflow"
tags: ["Agents"]
deprecated: true
---

# Get agent workflow

`GET /agent/{id}/workflow`

> **Deprecated.**

**Deprecated** — prefer `GET /agent/{id}` (config is resolved into `_resolvedConfig`
including prompt, tools, and post-call analytics).

Returns the active version's prompt and tools for single-prompt agents, or the
workflow graph data for workflow_graph agents. Customers still rely on this to
fetch their current prompt + tools — endpoint is kept live for now.

**Caveat:** the `versionId` query param (if passed) is silently ignored.
The response always reflects the currently-active version. To inspect a
non-active version, use `GET /agent/{id}/versions/{versionId}`.

## Path parameters

- `id` string, required

## Response `200`

Successful response

- object
  - `status` boolean
  - `data` object — The active version's workflow.
    - `prompt` string — Active prompt (single-prompt agents only).
    - `tools` Tool[] — Active tool list (single-prompt agents only).
      - `type` 'end_call' | 'transfer_call' | 'api_call' | 'extract_dynamic_variables' | 'knowledge_base_search', required — The type of function/tool
      - `name` string, required — Unique name for the function (no spaces)
      - `description` string, required — Description of what the function does
      - `enabled` boolean — Whether the tool is enabled
      - `transferNumber` string — Required for transfer_call type. Phone number to transfer the call to (E.164 format)
      - `transferOption` object — Required for transfer_call type. Controls cold vs warm transfer behavior.
        - `type` 'cold_transfer' | 'warm_transfer' — Transfer mode. `cold_transfer` hands off immediately; `warm_transfer` briefs the receiving party first.
        - `privateHandoffOption` object, nullable — Private briefing delivered to the transfer target before the caller is connected. Only used when `type = warm_transfer`.
          - `type` 'prompt' | 'static' — `prompt` generates briefing from the LLM; `static` plays fixed text.
          - `prompt` string — The prompt or static text for the private handoff.
        - `publicHandoffOption` object, nullable — Message played to the caller while the transfer is being set up. Only used when `type = warm_transfer`.
          - `type` 'prompt' | 'static'
          - `prompt` string
      - `onHoldMusic` 'ringtone' | 'relaxing_sound' | 'uplifting_beats' | 'none' — Optional for transfer_call type. Audio played to the caller while the transfer is in progress.
      - `transferOnlyIfHuman` boolean — Optional for transfer_call type. If true, the call is only transferred when a human is detected on the receiving end (voicemail/IVR skipped).
      - `detectionTimeout` integer — Optional for transfer_call type. Seconds to wait for human detection before giving up (5–60).
      - `url` string, uri — Required for api_call type. The URL to make the HTTP request to.
      - `method` 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' — Required for api_call type. HTTP method to use.
      - `timeout` integer — Optional for api_call type. Request timeout in milliseconds (1000–30000).
      - `headers` object — Optional for api_call type. Static HTTP headers as a key/value map.
      - `headersArray` object[] — Optional for api_call type. Headers as an array of key/value objects (alternative to `headers` map).
        - `key` string, required
        - `value` string, required
      - `queryParams` object[] — Optional for api_call type. Query parameters to include in the request URL. Values support variable templating like `{{order_id}}`.
        - `key` string, required
        - `value` string, required
      - `requestBody` string — Optional for api_call type. Raw request body as a JSON string. Supports variable templating.
      - `llmParameters` object[] — Optional for api_call type. Parameters the LLM can supply dynamically at runtime.
        - `name` string, required — Parameter name
        - `description` string, required — What the parameter represents
        - `type` 'text' | 'number' | 'boolean' | 'enum', required
        - `values` string[] — Required when type is `enum`. Allowed values.
        - `required` boolean
      - `responseVariables` object[] — Optional for api_call type. Variables to extract from the API response into the agent's variable store.
        - `variableName` string, required — Name to store the extracted value under
        - `jsonPath` string, required — JSON path to extract the value from the response
      - `variablesExtractionSchema` object[] — Required for extract_dynamic_variables type. Schema defining variables to extract from the conversation.
        - `name` string, required — Name of the variable to extract
        - `description` string, required — What this variable represents
        - `type` 'text' | 'number' | 'boolean' | 'enum', required
        - `values` string[] — Required when type is `enum`. List of possible values.
      - `knowledgeBaseId` string — Required for knowledge_base_search type. ID of the knowledge base to search.
      - `fillerPhrases` string[] — Optional for knowledge_base_search type. Phrases spoken while searching.
    - `type` 'workflow_graph' | 'single_prompt' — The type of workflow configuration. workflow_graph uses a node-based visual workflow, single_prompt uses a simple prompt-based configuration.
    - `data` union — Graph data for workflow_graph agents.
      - WorkflowGraphData — Workflow configuration using a node-based graph structure
        - `nodes` object[] — Array of workflow nodes
          - `id` string — Unique identifier for the node
          - `type` string — Type of the node (e.g., default_node, end_call, pre_call_api)
          - `position` object
            - `x` number
            - `y` number
          - `data` object — Node-specific data and configuration
        - `edges` object[] — Array of workflow edges connecting nodes
          - `id` string — Unique identifier for the edge
          - `source` string — ID of the source node
          - `target` string — ID of the target node
          - `type` string — Type of the edge
      - SinglePromptData — Workflow configuration using a simple prompt-based approach
        - `prompt` string — The main prompt that defines the agent's behavior and responses
        - `tools` object[] — Array of tools/functions available to the agent

## Other responses

- `401` — Unauthorized access
- `404` — Agent not found
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/versions/6d1036a76fbc/schema)
