---
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' | 'client_tool' | '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
      - `timeoutMs` integer — Optional for client_tool type. How long the agent waits for `function_call.result` before recovering verbally.
      - `expectsResponse` boolean — Optional for client_tool type. When false, fire-and-forget — the app acts on the event and the agent does not wait for a result.
      - `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
      - `auth` object — Optional for `api_call` type. Authentication for the outbound request. Credentials are referenced **by secret name** (from the org Secrets vault, see `POST /secret`), never inline. At call time the platform decrypts the secret, injects it into the request, and strips the `auth` block before the config reaches the runtime, cache, or webhooks. `token`, `value`, and `password` below are secret names, not literal values.
        - `type` 'none' | 'bearer' | 'api_key' | 'basic', required — Auth scheme. `bearer` sends `Authorization: Bearer <secret>`; `api_key` sends the secret in a header or query param you name; `basic` sends `Authorization: Basic <base64(username:secret)>`.
        - `token` string — For `bearer`: the name of the secret holding the token.
        - `name` string — For `api_key`: the header or query-param name to send the key under.
        - `location` 'header' | 'query' — For `api_key`: whether the key is sent as a header or a query parameter.
        - `value` string — For `api_key`: the name of the secret holding the key.
        - `username` string — For `basic`: the name of the secret holding the username.
        - `password` string — For `basic`: the name of the secret holding the password.
      - `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 and client_tool types. Phrases spoken while the tool runs so the pause is not silent.
    - `type` 'workflow_graph' | 'single_prompt' | 'multi_agents' — The type of workflow configuration. - `single_prompt` — simple prompt-based agent (default). - `workflow_graph` — node-based visual workflow. **Restricted:** requires the `conversational-agents` org flag. Requests without that flag receive HTTP 403 `"Conversational Flow agents are no longer available for your organization."` The Zod validator still accepts this enum value on any org, but the authorization middleware gates it. - `multi_agents` — multi-agent orchestration (restricted; requires `slmModel` to be one of `[electron, gpt-5.2-azure]`).
    - `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

## Changes

- **2026-09-02** `8546eaa96566` — 1 warning, 3 info
  - added the new `client_tool` enum value to the `data/tools/items/type` response property for the response status `200`
  - added the optional property `data/tools/items/auth` to the response with the `200` status
  - added the optional property `data/tools/items/expectsResponse` to the response with the `200` status
  - added the optional property `data/tools/items/timeoutMs` to the response with the `200` status
- **2026-09-01** `49ce8525306e` — 1 warning
  - added the new `multi_agents` enum value to the `data/type` response property for the response status `200`
- **2026-04-20** `801f1d220d57` — 1 breaking, 4 info
  - removed the media type `application/json` for the response with the status `404`
  - endpoint deprecated
  - removed the non-success response with the status `400`
  - added the optional property `data/prompt` to the response with the `200` status
  - …1 more

[Change history](https://skmtc.dev/smallest-inc/apis/agent-management-api/changes/agent/:id/workflow/get.md)

---

[API](https://skmtc.dev/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.dev/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/8546eaa96566/schema)
