Export workflow as Agent Spec JSON
Convert a FlowDrop workflow to Agent Spec format and return it. The conversion: - Maps FlowDrop node types to Agent Spec component types - Splits unified edges into control_flow_connections and data_flow_connections - Stores FlowDrop-specific data (positions, dynamic ports) in metadata extensions - Validates the workflow for Agent Spec compatibility before export This is the Agent Spec counterpart of the FlowDrop-native `GET /workflows/{id}/export` under **Import and Export**.
JWT token for authentication
In: header
Path Parameters
Workflow UUID
uuidQuery Parameters
Output format (document wraps flow with agent/tools/LLM config)
"flow"Value in
- "flow"
- "document"
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/export/agentspec"{ "component_type": "flow", "name": "document_processing", "description": "string", "start_node": "start", "nodes": [ { "name": "process_input", "description": "string", "inputs": [ { "title": "user_query", "type": "string", "description": "string", "default": null, "enum": [ null ], "items": {}, "properties": { "property1": {}, "property2": {} }, "required": [ "string" ] } ], "outputs": [ { "title": "user_query", "type": "string", "description": "string", "default": null, "enum": [ null ], "items": {}, "properties": { "property1": {}, "property2": {} }, "required": [ "string" ] } ], "metadata": {}, "component_type": "start_node" } ], "control_flow_connections": [ { "name": "start_to_process", "from_node": "start", "to_node": "process_input", "from_branch": "high_priority" } ], "data_flow_connections": [ { "name": "query_to_llm", "source_node": "process_input", "source_output": "processed_text", "destination_node": "llm_generate", "destination_input": "prompt" } ], "metadata": {}}Validate Agent Spec flow on runtime POST
Validate an Agent Spec flow specification against the runtime without executing it. Checks for structural correctness, valid node references, and property compatibility.
Import workflow from Agent Spec JSON POST
Convert an Agent Spec flow or document to a FlowDrop workflow. The conversion: - Maps Agent Spec component types to FlowDrop node types - Merges control_flow_connections and data_flow_connections into unified edges - Auto-layouts nodes if no position metadata is present - Preserves Agent Spec component_type in FlowDrop extensions This is the Agent Spec counterpart of the FlowDrop-native `POST /workflows/import` under **Import and Export**.