Building a 20-Agent Pipeline with Claude Code: Less AI, More Structure

✍️ OpenClawRadar📅 Published: March 26, 2026🔗 Source
Building a 20-Agent Pipeline with Claude Code: Less AI, More Structure
Ad

A developer on r/ClaudeAI shared their experience building a 20-agent pipeline with Claude Code to automate daily workflows across Gmail, Calendar, Notion, LinkedIn, web scrapers, and local APIs. The system replaced an hour of manual checking each morning.

The Problem with the Monolithic Approach

The first version was a single long conversation with Claude that handled everything—order, logic, all tasks. This "monolith" worked until around 100K tokens, then the model started losing track, repeating steps, skipping others, with no way to debug because everything lived in one context.

The Solution: Agent-Based Architecture

The developer broke the system into individual agents, each with one job. Each agent is a markdown file with its task. An orchestrator reads the file, replaces variables, and spawns it using the Agent tool—no LangChain or CrewAI.

The communication layer is simple: agents don't share context. Each writes a JSON file to a directory (one per day), with files like calendar.json, gmail.json, notion.json, leads.json, hitlist.json. The next agent reads that file. This approach provides complete visibility—you can open any file to see exactly what an agent produced. The developer calls this "blast radius containment": one agent fails, the rest keep going.

Ad

Key Structural Elements

  • Non-AI Orchestrator: A markdown file that specifies "run these 4 agents in parallel, wait for all of them, check that their output files exist, then run the next phase." The system has 9 phases, some parallel, some sequential.
  • Phase 0 Validation: Checks that all tools are connected. If Gmail or Notion is down, it stops completely—no partial runs that look complete.
  • Non-AI Compression: The system asks "1 to 5?" at start to determine capacity. This writes a JSON file with rules: low number caps everything at 5 actions, skips anything over 30 minutes; high number runs full routine.
  • Style Rules File: A plain text file that every content agent reads before writing. This fixed the problem of multiple agents writing outreach messages that sounded like different AIs—before this, zero responses; after, real conversations.

The Core Insight

The developer discovered that every time something broke, the fix was never a better prompt. It was adding structure around the AI. The AI parts worked—what broke was sequencing, communication between agents, error handling, and output volume. Each time, the answer was a piece of software, not a smarter model.

The developer, who comes from a Threat Intelligence Investigations background, has open-sourced a generic version at https://github.com/assafkip/kipi-system so others can build similar systems for their domains.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also