Documentation

Flow Definition

API reference for defining flows programmatically.

Flow Definition

Define flows using YAML or JSON configuration.

Schema

flow:
  name: my-flow
  version: "1.0"

  agents:
    - id: researcher
      type: researcher
      model: claude-sonnet-4-6
      prompt: "Research the given topic"

    - id: writer
      type: writer
      model: claude-sonnet-4-6
      prompt: "Write a report based on the research"

  edges:
    - from: input
      to: researcher
    - from: researcher
      to: writer
    - from: writer
      to: output

Fields

| Field | Type | Required | Description | |-------|------|----------|-------------| | name | string | Yes | Flow name | | version | string | Yes | Semantic version | | agents | array | Yes | List of agent definitions | | edges | array | Yes | Connections between agents |