Examples¶
Ready-to-use orchestration configs for common team structures.
Software development team (default)¶
Four-agent pipeline: Planner → Developer → Tester → Reviewer. Validates handoffs with routing validators and disk-based artifacts.
A complete version of this config is in config/examples/orchestration.yaml.
Key features:
- Keyword routing with RequireBrief, RequireWriteFile, RequireShellPass, and TestReportValid validators
- SourceAgents restrictions on every route — agents can only trigger transitions intended for their role
- RequiredCommandPattern on the HANDOFF TO TESTER shell-pass route (go build|go test) — prevents satisfying the check with unrelated commands
- brief.json and test-report.json written to disk to survive context compaction
- Compaction enabled (trigger at 30 turns, keep 8); post-compaction note prompts agents to re-read artifacts
- Stuck detection throws after 3 consecutive bad turns (no keyword, wrong-role keyword, multi-keyword, or validator failure)
- xAI Grok models via the Models registry
- USD spending cap
Single agent (minimal)¶
A single agent with filesystem access — good for quick tasks or as a starting point.
Orchestration:
Name: Assistant
Agents:
- Name: Assistant
Instructions: >-
You are a helpful software assistant. Use the tools available to read and write
files, run shell commands, and complete the user's task. When you are done,
say TASK COMPLETE.
Model:
ModelId: gpt-4o
Plugins:
- FileSystem
- Shell
- Search
FunctionChoice: auto
Selection:
Type: sequential
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: TASK COMPLETE
- Type: maxiterations
MaxIterations: 20
MaxCostUsd: 1.0
Research team¶
Two agents: a Researcher who gathers information via web requests and a Writer who synthesises it into a document.
Orchestration:
Name: ResearchTeam
Agents:
- Name: Researcher
Description: Gathers information from the web and structures findings.
Instructions: >-
You are a research assistant. Use http_get to fetch content from provided URLs
or APIs. Summarise your findings in structured form. When you have gathered
enough information, write HANDOFF TO WRITER.
Model:
ModelId: gpt-4o
Plugins:
- Http
- Json
- FileSystem
FunctionChoice: auto
- Name: Writer
Description: Synthesises research into a polished document.
Instructions: >-
You are a technical writer. The Researcher has gathered information for you.
Write a clear, well-structured document based on their findings. Save the final
document to disk using write_file. When done, say DOCUMENT COMPLETE.
Model:
ModelId: gpt-4o
Plugins:
- FileSystem
FunctionChoice: auto
Selection:
Type: keyword
DefaultAgent: Researcher
Routes:
- Keyword: "HANDOFF TO WRITER"
Agent: Writer
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: DOCUMENT COMPLETE
AgentNames:
- Writer
- Type: maxiterations
MaxIterations: 15
MaxCostUsd: 1.50
Local model team (Ollama)¶
Two agents running entirely on local models via Ollama. No API keys required.
Orchestration:
Name: LocalTeam
Models:
local-fast:
ModelId: llama3.2
MaxTokens: 4096
local-coder:
ModelId: qwen2.5-coder:7b
MaxTokens: 8192
Agents:
- Name: Planner
Instructions: >-
You are a planner. Analyse the task and write a clear plan with numbered steps.
When done, write HANDOFF TO DEVELOPER.
Model:
ModelId: local-fast
FunctionChoice: none
- Name: Developer
Instructions: >-
You are a developer. Follow the plan provided and implement the changes using
the tools available. When done, say TASK COMPLETE.
Model:
ModelId: local-coder
Plugins:
- FileSystem
- Shell
FunctionChoice: auto
Selection:
Type: keyword
DefaultAgent: Planner
Routes:
- Keyword: "HANDOFF TO DEVELOPER"
Agent: Developer
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: TASK COMPLETE
- Type: maxiterations
MaxIterations: 20
Mixed provider team¶
Different agents use different providers: GPT-4o for planning, Claude for implementation, a local Llama for review.
Orchestration:
Name: MixedProviderTeam
Models:
planner-model:
ModelId: gpt-4o
MaxTokens: 4096
coder-model:
ModelId: claude-3-5-sonnet-20241022
MaxTokens: 16384
reviewer-model:
ModelId: llama3.2
MaxTokens: 4096
Agents:
- Name: Planner
Instructions: Analyse the task and produce a structured plan. End with HANDOFF TO DEVELOPER.
Model:
ModelId: planner-model
Plugins:
- FileSystem
- Search
FunctionChoice: auto
- Name: Developer
Instructions: Implement the plan using the tools available. End with HANDOFF TO REVIEWER.
Model:
ModelId: coder-model
Plugins:
- FileSystem
- Shell
- Git
FunctionChoice: required
- Name: Reviewer
Instructions: >-
Review the implementation. If it meets the requirements, say APPROVED.
If not, say CHANGES REQUIRED and describe what to fix.
Model:
ModelId: reviewer-model
Plugins:
- FileSystem
FunctionChoice: auto
Selection:
Type: keyword
DefaultAgent: Planner
Routes:
- Keyword: "HANDOFF TO DEVELOPER"
Agent: Developer
- Keyword: "HANDOFF TO REVIEWER"
Agent: Reviewer
- Keyword: "CHANGES REQUIRED"
Agent: Developer
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: \bAPPROVED\b
AgentNames:
- Reviewer
- Type: maxiterations
MaxIterations: 30
MaxCostUsd: 2.0
Magentic team¶
A manager LLM plans the work and coordinates a Researcher and Developer dynamically each round. No routing keywords or conditions needed — the manager reasons about what has been done and picks the right agent next.
A complete version of this config is in config/examples/magentic-team.yaml.
Key features:
- Manager LLM drives a two-level loop: orientation (once) then per-round ledger evaluation + speaker selection
- Participant agents need no special routing keywords — they just do the work
- Built-in stall detection: if MaxStallCount consecutive rounds make no progress, the manager replans
- Termination section is ignored; session end is controlled by MaxRoundCount, MaxStallCount, and MaxResetCount
- Named model aliases let you assign a stronger reasoning model to the manager and a faster model to workers
Orchestration:
Name: Magentic Team
Description: >
AI-managed team orchestrated by Magentic. A manager LLM plans the work,
dynamically selects participants each round, and replans if progress stalls.
Models:
manager:
ModelId: gpt-4o # upgrade to o3 or claude-opus-4-6 for complex tasks
worker:
ModelId: gpt-4o-mini
Agents:
- Name: Researcher
Description: Gathers information, searches, and produces sourced summaries.
Instructions: |
You are a Researcher. Find information, analyse it, and produce well-sourced
summaries. Use your tools to search and read content. Be thorough but concise.
Model:
ModelId: worker
Plugins:
- FileSystem
- Search
- Scratchpad
- Name: Developer
Description: Writes code, implements features, runs tests, and fixes bugs.
Instructions: |
You are a Developer. Write clean, working code that solves the problem.
Implement what is asked, verify with shell_run, and report results accurately.
Model:
ModelId: worker
Plugins:
- FileSystem
- Shell
- Git
- Scratchpad
Selection:
Type: magentic
Magentic:
Model:
ModelId: manager
MaxRoundCount: 20
MaxStallCount: 3
MaxResetCount: 2
EnablePlanReview: false
# NOTE: Termination is ignored for Selection.Type 'magentic'.
Termination:
Type: maxiterations
MaxIterations: 50
Compaction:
TriggerTurnCount: 50
KeepRecentTurns: 10
Checkpoint:
Mode: json
Path: .fuseraft/checkpoints
Generate this config with fuseraft init --template magentic.
With MCP tools¶
Adding an MCP server that provides browser automation tools alongside built-in plugins:
Orchestration:
Name: WebAgent
McpServers:
- Name: Browser
Transport: stdio
Command: npx
Args:
- "-y"
- "@modelcontextprotocol/server-puppeteer"
Agents:
- Name: WebScraper
Instructions: >-
You are a web scraping agent. Use the browser tools to navigate pages, extract
data, and save it to files. When done, say TASK COMPLETE.
Model:
ModelId: gpt-4o
Plugins:
- Browser
- FileSystem
- Json
FunctionChoice: auto
Selection:
Type: sequential
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: TASK COMPLETE
- Type: maxiterations
MaxIterations: 15
With sandbox and cost cap¶
A config safe to run on untrusted tasks — file access restricted to a specific project, HTTP limited to known hosts, and a hard cost cap:
Orchestration:
Name: SafeTeam
Agents: [ ... ]
Selection: { ... }
Termination: { ... }
Security:
FileSystemSandboxPath: /home/user/projects/sandboxed-project
HttpAllowedHosts:
- api.github.com
- pypi.org
MaxCostUsd: 0.50
With compaction for long tasks¶
For tasks that may run for many turns (e.g. large refactors, multi-file migrations):
Orchestration:
Name: LongRunningTeam
Compaction:
TriggerTurnCount: 40
KeepRecentTurns: 10
Model:
ModelId: gpt-4o-mini
Agents: [ ... ]
Selection: { ... }
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: \bAPPROVED\b
- Type: maxiterations
MaxIterations: 100
When 40 messages have accumulated, the orchestrator summarises the oldest 30 turns into a single message and continues with the 10 most recent turns verbatim. This can run indefinitely without hitting context limits.
Structured routing — content review pipeline¶
Three agents use JSON output instead of routing keywords. The Reviewer returns {"review_result": "Yes"} or {"review_result": "No"} and the orchestrator routes based on that field value, with no keyword scanning involved.
Orchestration:
Name: ContentPipeline
Agents:
- Name: Drafter
Instructions: >-
Write a draft based on the user's request. Return your response as a JSON
object: {"draft_content": "<your draft here>"}. Your entire response must
be valid JSON.
Model:
ModelId: gpt-4o
FunctionChoice: none
- Name: Reviewer
Instructions: >-
Review the draft in the conversation. Check that it is accurate and
well-written. Return your decision as a JSON object:
{"review_result": "Yes", "reason": "<explanation>"} if acceptable, or
{"review_result": "No", "reason": "<what to fix>"} if it needs revision.
Your entire response must be valid JSON.
Model:
ModelId: gpt-4o
FunctionChoice: none
- Name: Publisher
Instructions: >-
The draft has been approved. Format it as a final polished document and
print it. End your response with the word PUBLISHED on its own line.
Model:
ModelId: gpt-4o
FunctionChoice: none
Selection:
Type: structured
DefaultAgent: Drafter
StructuredRoutes:
- Agent: Reviewer
Condition:
Field: draft_content
Exists: true
SourceAgents:
- Drafter
- Agent: Publisher
Condition:
Field: review_result
Is: "Yes"
SourceAgents:
- Reviewer
- Agent: Drafter
Condition:
Field: review_result
Is: "No"
SourceAgents:
- Reviewer
Termination:
Type: composite
Strategies:
- Type: regex
Pattern: PUBLISHED
AgentNames:
- Publisher
- Type: maxiterations
MaxIterations: 15
MaxCostUsd: 1.0
Key differences from keyword routing:
- Agents return JSON objects — routing happens on field values, not on specific text appearing in the response
- No APPROVED/REVISION REQUIRED style keywords needed
- Session end is handled by the Termination regex strategy rather than a self-routing route
- The --diagram flag renders conditions as edge labels: review_result = Yes, draft_content exists