A developer detailed a complete method for building a multi-agent AI team using a single session with Claude Code, a process that surfaced on Hacker News and garnered 48 points. The approach bypasses complex frameworks, using structured prompts and the Anthropic API to create a collaborative system of four specialized agents.
Framework: Claude Code Multi-Agent System | Agents: 4 | Core Tool: Anthropic Messages API
Cost: Variable (API usage) | Setup: Python script | Control: Centralized orchestration
How the Four-Agent Team Operates
The system creates a specialized workflow where a central orchestrator manages three subordinate agents. Each agent has a distinct role, defined by a system prompt, and communicates via a structured JSON format.
The Manager Agent receives a user's initial goal and breaks it down into discrete tasks. It then assigns these tasks sequentially to a specialized Engineer Agent (for coding), QA Agent (for testing and review), and Writer Agent (for documentation). The Manager evaluates each agent's output before proceeding, maintaining a single conversational thread within the Claude API to preserve context and reduce costs.
Building and Running the System
Implementation requires direct interaction with the Anthropic API. The developer provides the core Python script and the detailed system prompts for each agent role, which are the critical components.
The process is not a one-click install but a blueprint for a custom orchestrator. You must clone the provided example, insert your Anthropic API key, and run the main Python script. The entire logic is contained within a single file, relying on the anthropic Python package and clear, modular function design for agent handling.
"Step-by-Step Setup"
pip install anthropic."Build a simple web scraper."
Advantages and Immediate Drawbacks
This approach offers specific benefits but comes with clear, upfront tradeoffs.
Pros:
- Low Overhead: No external framework dependencies beyond the Anthropic Python library.
- Full Control: The orchestration logic is transparent and contained in your code, making it easy to debug and modify.
- Context-Awareness: Using a single Claude session for all agents maintains full context on the project history, improving coherence.
- Cost-Effective Design: A single, continuous conversation thread is often more efficient than managing multiple independent API calls.
Cons:
- Manual Orchestration: You are responsible for building and maintaining the agent interaction logic (the "glue" code).
- No Built-in Tools: Unlike some frameworks, agents cannot natively execute code, browse the web, or call APIs without significant additional engineering.
- Claude-Centric: The architecture is designed around Claude's models and API structure, offering less flexibility to mix different LLM providers.
How It Stacks Up Against Agent Frameworks
For developers considering multi-agent systems, the choice is between a custom-built orchestrator (like this Claude Code method) and a full-stack framework. The tradeoffs are primarily in setup complexity versus flexibility and built-in features.
| Feature | Claude Code Team | AutoGen | CrewAI |
|---|---|---|---|
| Setup Complexity | Low (One script) | Medium | Medium |
| Orchestration Control | High (Your code) | Medium (Framework-defined) | High (Configurable) |
| Multi-Model Support | Low (Claude-focused) | High | High |
| Built-in Tool Use | No | Yes | Yes |
| Ideal For | Prototyping, Claude-centric projects | Research, complex collaborative scenarios | Production workflows, business processes |
AutoGen, from Microsoft, provides robust features for tool-calling and complex group chats but has a steeper learning curve. CrewAI offers a more opinionated, role-based paradigm that is excellent for structured business processes. The Claude Code method is simpler but requires you to build what these frameworks provide out-of-the-box.
Bottom line: This method offers maximum transparency and control for Claude-based projects, but you trade away the convenience and advanced features of dedicated frameworks.
Who Should Build a Team This Way
This architecture is a precise fit for a specific developer profile. It is highly useful for practitioners who want to deeply understand agent orchestration mechanics, are building a prototype or internal tool primarily using Claude models, and prefer minimal dependencies.
Skip this approach if you need immediate support for multi-LLM workflows, require agents that can execute code or use external tools autonomously, or are looking for a production-ready solution without writing orchestration logic. In those cases, a framework like AutoGen or CrewAI is a more efficient starting point.
The Verdict on Custom Agent Orchestration
The Claude Code multi-agent system demonstrates that powerful coordination can emerge from a well-structured prompt and a single LLM context. It validates a lean, code-first approach to agent design. For the AI practitioner willing to write the "glue," it provides an unparalleled learning experience and a tightly controlled environment.
The trend is moving towards specialized agents over monolithic models. This project sits at the pragmatic intersection of that trend, proving you can start building that future with the tools already in your API toolkit. The next step is integrating tool-use capabilities, which would bridge the gap between this custom orchestrator and the broader framework ecosystem.

Top comments (0)