Step-by-step walkthrough of a real task
Let's trace exactly what happens when a user asks the orchestrator to generate code.
M1 Core Orchestrator receives the task with capability requirement ["code_generation"]
Registry searches for tools with code_generation capability:
Apply scoring formula to each matching tool:
| Tool | Cap | Prov | Int | Learn | Score |
|---|---|---|---|---|---|
| claude_code_generation | 1.0 | 1.5 | 1.0 | 1.2 | 1.80 |
| openai_codex | 1.0 | 1.0 | 1.0 | 0.9 | 0.90 |
Winner: claude_code_generation with score 1.80
Claude-first bias (1.5x) + good learning history (1.2x) = highest score
AnthropicAdapter makes API call to Claude:
M3 Observability logs the execution:
M5 stores the successful outcome:
tool_used: claude_code_generation
provider: anthropic
tokens_used: TokenUsage(input=23, output=287)
result:
When a similar task comes in (e.g., "Write a sorting function"):
If the tool fails (timeout, error, poor quality):