Skip to main content
POST
/
agentspec
/
flows
/
validate
Validate Agent Spec flow on runtime
curl --request POST \
  --url http://localhost:5173/api/flowdrop/agentspec/flows/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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": {}
}
'
{
  "valid": true,
  "errors": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

JWT token for authentication

Body

application/json

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

Response

Validation result

Runtime validation result for an Agent Spec flow

valid
boolean
required

Whether the flow is valid on the runtime

errors
string[]

Validation errors from the runtime