Skip to main content
GET
/
workflows
/
{id}
/
export
/
agentspec
Export workflow as Agent Spec JSON
curl --request GET \
  --url http://localhost:5173/api/flowdrop/workflows/{id}/export/agentspec \
  --header 'Authorization: Bearer <token>'
{
  "component_type": "flow",
  "name": "document_processing",
  "start_node": "start",
  "nodes": [
    {
      "component_type": "start_node",
      "name": "process_input",
      "description": "<string>",
      "inputs": [
        {
          "title": "user_query",
          "type": "string",
          "description": "<string>",
          "default": "<unknown>",
          "enum": [
            "<unknown>"
          ],
          "items": "<unknown>",
          "properties": {},
          "required": [
            "<string>"
          ]
        }
      ],
      "outputs": [
        {
          "title": "user_query",
          "type": "string",
          "description": "<string>",
          "default": "<unknown>",
          "enum": [
            "<unknown>"
          ],
          "items": "<unknown>",
          "properties": {},
          "required": [
            "<string>"
          ]
        }
      ],
      "metadata": {}
    }
  ],
  "control_flow_connections": [
    {
      "name": "start_to_process",
      "from_node": "start",
      "to_node": "process_input",
      "from_branch": "high_priority"
    }
  ],
  "description": "<string>",
  "data_flow_connections": [
    {
      "name": "query_to_llm",
      "source_node": "process_input",
      "source_output": "processed_text",
      "destination_node": "llm_generate",
      "destination_input": "prompt"
    }
  ],
  "metadata": {}
}

Authorizations

Authorization
string
header
required

JWT token for authentication

Path Parameters

id
string<uuid>
required

Workflow UUID

Query Parameters

format
enum<string>
default:flow

Output format (document wraps flow with agent/tools/LLM config)

Available options:
flow,
document

Response

Agent Spec JSON exported successfully

Agent Spec Flow — a directed, potentially cyclic graph of nodes. Flows function as "subroutines" encapsulating repeatable processes. They separate control-flow (execution order) from data-flow (data routing).

component_type
enum<string>
required
Available options:
flow
name
string
required

Flow name

Example:

"document_processing"

start_node
string
required

Reference to the StartNode name

Example:

"start"

nodes
object[]
required

All nodes in the flow

Union of all Agent Spec node types. Discriminated by component_type.

control_flow_connections
object[]
required

Execution order edges

description
string

Human-readable description

data_flow_connections
object[] | null

Data routing edges. When null, data flows by matching input/output property names across connected nodes.

metadata
object

Extension metadata