Multi-Agent System

Understand how Smith coordinates multiple specialized agents to build software in parallel.

Overview

Smith uses a multi-agent architecture where specialized AI agents work together to accomplish complex development tasks. Unlike traditional single-agent systems, Smith can run multiple agents in parallel, each focused on their area of expertise.

🕶️
Coordinator
Main agent you talk to
↓ delegates to ↓
🏛️
Planning
Breaks down features
🔑
Implementation
Writes code
🦑
Testing
Creates tests
🔮
Review
Checks quality

Agent Roles

🕶️

Coordinator Agent

Main Agent

Role: The main agent that communicates with users and orchestrates the entire system.

Responsibilities:

  • Understands user requests and requirements
  • Breaks down complex tasks into subtasks
  • Delegates work to specialized agents
  • Monitors progress and coordinates agent communication
  • Synthesizes results and reports back to user

Tools Available: Task management, file operations, command execution

🏛️

The Architect

Background

Role: The architect who designs implementation strategies and breaks down features.

Responsibilities:

  • Analyzes feature requirements
  • Creates detailed implementation plans
  • Identifies dependencies and order of operations
  • Suggests architecture and design patterns
  • Breaks complex features into manageable tasks

Tools Available: File operations (read-only), project analysis

🔑

The Keymaker

Background

Role: The coder who writes production-quality code following best practices.

Responsibilities:

  • Implements features according to plan
  • Writes clean, idiomatic code
  • Follows project conventions and style
  • Handles edge cases and error conditions
  • Creates or updates documentation

Tools Available: Full file operations, command execution

🦑

Sentinels

Background

Role: The QA specialists who hunt down bugs relentlessly through comprehensive testing.

Responsibilities:

  • Writes unit tests for new code
  • Creates integration tests
  • Ensures test coverage meets standards
  • Identifies edge cases and failure scenarios
  • Validates existing tests still pass

Tools Available: Full file operations, test execution

🔮

The Oracle

Background

Role: The code reviewer who sees quality issues and predicts potential problems.

Responsibilities:

  • Reviews code for quality issues
  • Checks adherence to best practices
  • Identifies potential bugs or security issues
  • Suggests improvements and optimizations
  • Ensures consistency with project standards

Tools Available: File operations (read-only), analysis tools

How It Works

1

User Request

You chat with the Coordinator agent through the REPL:

💬
implement JWT authentication with tests
2

Task Delegation

The Coordinator analyzes your request and creates tasks for specialized agents:

  • 🏛️ Planning: "Design JWT auth architecture"
  • 🔑 Implementation: "Implement JWT middleware"
  • 🔑 Implementation: "Implement token generation"
  • 🦑 Testing: "Write JWT auth tests"
  • 🔮 Review: "Review JWT implementation"
3

Parallel Execution

Background agents work on their tasks simultaneously. You can see them in the task queue:

🏛️ Planning: Design JWT auth... [IN PROGRESS]
🔑 Implementation: JWT middleware... [QUEUED]
🦑 Testing: Write tests... [QUEUED]
4

Communication

Agents communicate through the EventBus to share progress and results. The Architect's output feeds into Keymaker agents, which then triggers Sentinels and the Oracle.

5

Coordination

The Coordinator monitors all agents, handles dependencies, and ensures tasks complete in the correct order. It synthesizes results and presents them to you.

Benefits of Multi-Agent Architecture

Parallel Execution

Multiple agents work simultaneously, dramatically reducing time for complex tasks.

🎯

Specialization

Each agent is optimized for its specific role, resulting in higher quality output.

🔄

Separation of Concerns

Code, tests, and review happen independently, ensuring quality checks.

🛡️

Safety

Background agents have limited tool access, preventing unintended actions.

📈

Scalability

System scales naturally - more complex tasks just spawn more agents.

🔍

Transparency

See exactly what each agent is doing in real-time through the task queue.

Task Lifecycle

Understanding how tasks flow through the system:

PENDING

Task created by Coordinator, waiting for agent assignment

IN PROGRESS

Agent actively working on the task

COMPLETED

Agent finished, result available

Failed tasks are automatically retried or escalated to the Coordinator for manual intervention.

Common Coordination Patterns

🔄 Sequential Pipeline

Tasks that must happen in order:

Planning → Implementation → Testing → Review

⚡ Parallel Execution

Independent tasks running simultaneously:

Implementation (API) ║ Implementation (UI) ║ Documentation

🌳 Fan-out / Fan-in

One task spawns many, then results merge:

Planning
  ├─ Implementation 1 ┐
  ├─ Implementation 2 ├─→ Review
  └─ Implementation 3 ┘