Orchestra ML Examples

Real-world patterns and workflows for multi-agent AI orchestration

Basic Workflow Patterns

Sequential Workflow

Research → Analysis → Writing pipeline

=== AGENTS
researcher: {persona: "academic researcher"
writer: {persona: "technical writer"
=== END
@researcher gather information about AI |
@writer create comprehensive article

The researcher's output becomes the writer's input, creating a clear data flow.

Parallel Task Assignment

Multiple agents working on the same task

=== AGENTS
designer: {persona: "UI/UX designer"
developer: {persona: "frontend developer"
=== END
@designer @developer
create a user registration form

Both agents receive the same task and work independently with different perspectives.

Advanced Coordination Patterns

Merge Pattern: AI Competition

Multiple models solve the same problem, then a critic evaluates

@claude design a prompt for essay writing &
@gpt4 design a prompt for essay writing >
@critic analyze both prompts and determine which is better

Two AI models compete to solve the same problem, then a critic agent evaluates and compares their approaches.

Fan-out Pattern: Distributed Processing

One coordinator distributes work to multiple specialists

@coordinator prepare dataset for analysis <
(@analyst1 analyze trends)
(@analyst2 check data quality)
(@analyst3 summarize findings)

The coordinator's output is distributed to three specialists, each performing different analysis tasks.

Complex Pipeline: Multi-stage Review

Development → Multiple reviews → Error fixing

@developer design a sprite sheet |
@developer2 create application using sprite <
@reviewer1 @reviewer2 check for syntax errors >
@fixer fix any flagged errors

Complex workflow: development, fan-out to multiple reviewers, merge reviews, then fix issues.

Real-world Use Cases

Content Creation Pipeline

End-to-end content production workflow

@researcher gather market data |
@strategist identify key insights |
(@copywriter write marketing copy &
@designer create visual concepts) |
@reviewer ensure brand consistency

Code Review Workflow

Multi-perspective code analysis and improvement

@developer submit code for review <
(@security_reviewer check vulnerabilities)
(@performance_reviewer analyze efficiency)
(@style_reviewer check conventions) >
@maintainer merge approved changes

Best Practices

Recommended Patterns

  • Use descriptive agent names that reflect their role
  • Define personas in AGENTS section for consistent behavior
  • Use variables for reusable workflow templates
  • Group complex expressions with parentheses for clarity
  • Keep workflows under 10 agents for performance

Common Pitfalls

  • Don't reuse agent handles within the same script
  • Avoid deeply nested parentheses - breaks readability
  • Don't create circular variable references
  • Avoid fan-out with only one target (use chain instead)
  • Don't leave agents without tasks

Start Building Your Own Workflows

These examples show the power and flexibility of Orchestra ML. Start with simple patterns and gradually build more complex coordination as you learn.