Skip to content

Multi-Agent Workflow

A complete example with multiple agents orchestrated through a workflow pipeline.

Source

models.orca

orca
model gpt4 {
  provider    = "openai"
  model_name  = "gpt-4o"
  temperature = 0.7
}

model claude {
  provider    = "anthropic"
  model_name  = "claude-sonnet-4-20250514"
  temperature = 0.5
}

agents.orca

orca
tool search {
  desc   = "Search the web for information"
  invoke = "tools.search.web_search"
}

agent researcher {
  model   = gpt4
  persona = ```md
    You are a research specialist.
    You search for information and compile
    detailed findings with sources.
    ```
  tools   = [search]
}

agent writer {
  model   = claude
  persona = ```md
    You are a technical writer.
    You take research findings and turn them
    into clear, well-structured articles.
    ```
}

agent editor {
  model   = gpt4
  persona = ```md
    You are an editor.
    You review articles for clarity, accuracy,
    and grammar. You suggest improvements.
    ```
}

workflow.orca

orca
workflow content_pipeline {
  researcher -> writer -> editor
}

Build

bash
orca build

What's happening

  1. Two models are configured — GPT-4o for research/editing, Claude for writing.
  2. Three agents form a pipeline: researcher finds information, writer drafts the article, editor polishes it.
  3. The workflow block connects them with arrow syntax: researcher -> writer -> editor.
  4. START and END are inferred automatically — researcher has no incoming edges so it becomes the entry point, editor has no outgoing edges so it becomes the exit.
  5. For duplicate graph nodes or string ids in edges, use the optional nodes map described in the workflow reference.

This pattern — splitting definitions across multiple .orca files — is idiomatic. The compiler reads all .orca files in the directory and resolves cross-file references automatically.

Released under the MIT License.