[KongchangAI]
· 2 min read· 1,211 words

LangGraph in Practice: Three Parallel Agents per Request at Just $0.22

LangGraph in Practice: Three Parallel Agents per Request at Just $0.22

protoAgent orchestrates three Claude Code agents in parallel with LangGraph for just $0.22.

protoAgent is an open-source multi-agent project built on LangGraph: a lead agent decomposes a user request and dispatches it to engineer, QA, and researcher sub-agents running in parallel, each with an independent Claude Code instance communicating via the A2A protocol. The demo completed a slugify implementation, test design, and Unicode research for $0.22, with a real-time org chart showing run counts, success rates, and costs. Data stays in local SQLite with no telemetry, under the MIT license.

Multi-agent collaboration is moving from concept to engineering reality. Recently, an open-source project called protoAgent caught attention on Reddit: built on LangGraph, it can dispatch a single user request to three agents for parallel processing, each running an independent Claude Code instance, with a real-time org chart updated as they work.

protoAgent running screenshot

Architecture: LangGraph orchestration and A2A communication

The core of protoAgent is an agent runtime built on LangGraph. After a user sends a request to the lead agent, the lead breaks it down into multiple subtasks and delegates them to an engineer agent, a QA agent, and a researcher agent.

Behind each sub-agent runs an independent Claude Code instance, using the user's existing Claude Code login credentials via the Agent Client Protocol. Every tool call from these instances is streamed back to the chat interface in order, letting users observe execution in real time.

Communication between agents relies on the A2A (Agent-to-Agent) protocol. This layered design avoids the context bloat that comes from a single agent handling all tasks, while letting agents in different roles focus on their own domains.

LangGraph is an open-source orchestration framework from the LangChain team, purpose-built for stateful, multi-actor LLM applications. It models agent workflows as graphs: nodes represent computation steps (such as calling a model or executing a tool), edges define control flow and conditional jumps, and it supports loops, branching, and parallel execution. Compared with linear chain frameworks, LangGraph's core advantage is persistent state management—each node can read and write a shared state object, and the framework handles checkpoint saving and restoration, making long-running tasks, multi-turn conversations, and failure retries easier to implement. protoAgent leverages exactly these capabilities to organize the lead agent's task decomposition, parallel scheduling of sub-agents, and result aggregation into a traceable execution graph.

The A2A (Agent-to-Agent) protocol is an open protocol initiated by Google in 2025, designed to let agents built by different vendors and frameworks discover one another, delegate tasks, and exchange results. It defines Agent Cards for describing capabilities, a JSON-RPC-based task lifecycle, and mechanisms for streaming updates and multimodal message passing. Complementary to the MCP protocol, which focuses on tool invocation, A2A addresses horizontal collaboration between agents. protoAgent's adoption of this protocol means its sub-agents could theoretically be swapped for other A2A-compatible implementations, rather than being locked into a single tech stack.

The Agent Client Protocol (ACP) is a standardized protocol for communication between editors or host applications and AI coding agents, proposed and led by Zed Industries, with support already available in tools such as Claude Code and Gemini CLI. It specifies message formats for session creation, prompt sending, tool call notifications, permission requests, and streaming responses, enabling the same coding agent to plug into different frontends. protoAgent drives independent Claude Code instances through ACP, so it doesn't need to implement its own tool execution loop; instead it reuses Claude Code's existing file read/write, command execution, and authorization mechanisms, while forwarding each tool call in order to the chat interface to form an observable execution trace.

Task dispatched to three agents in parallel

In the demo, the user asks the lead agent to implement a slugify() function for a small Python library. The lead's scheduling logic is clear:

  • The engineer agent writes the function implementation;
  • The QA agent designs edge-case tests;
  • The researcher agent investigates how python-slugify handles Unicode characters.

All three tasks start simultaneously without blocking one another. This parallel strategy significantly shortens end-to-end latency—research, coding, and test design that would otherwise be done serially can now overlap.

Once the three agents return their results, the lead's own Claude Code takes over the remaining work: running all 74 test cases, fixing failures, and adding the new function to the README documentation. The entire flow forms a closed loop from delegation to wrap-up.

Real-time org chart and runtime metrics

The org chart on the right side of the protoAgent interface updates in real time as tasks execute. Each delegated agent retains its own run count, success rate, and cost data.

This visualization makes the black-box state of a multi-agent system transparent. Users can see not only which agent is doing what, but also evaluate each agent's historical performance and resource consumption. For agent teams that need long-term maintenance, these metrics are an important basis for optimizing scheduling strategy.

Cost, data, and licensing

The total cost of the entire task in the demo was $0.22. Considering that three agents run Claude Code instances in parallel, this cost level is feasible for real development tasks.

All data is stored in a local SQLite database, and the project explicitly states there is no telemetry. The code is open source under the MIT license at github.com/protoLabsAI/protoAgent.

Claude Code bills by Anthropic API token usage: input tokens, output tokens, and prompt cache reads/writes are priced separately, with notable price differences across model tiers. Costs multiply when multiple agents run in parallel, because each sub-agent carries its own system prompt and context, and the lead agent must read the subtask results again during aggregation. So the significance of the $0.22 figure isn't just its low absolute value—it shows that controlling each agent's context size through role separation can offset the extra overhead of parallelism. Note that this cost depends on the user's existing Claude Code subscription or API quota; actual spending will fluctuate with task complexity, model choice, and cache hit rate.

Engineering lessons from multi-agent collaboration

The protoAgent demo reveals several trends worth watching:

Role specialization beats general-purpose agents. Splitting coding, testing, and research into separate agents, each with its own Claude Code instance and context, avoids the performance degradation a single agent suffers when switching between different kinds of tasks.

Cost observability has become essential. Each agent records its run count, success rate, and cost, and this fine-grained accounting makes the economics of multi-agent systems measurable. Completing a full task—including research, coding, and testing—for $0.22 provides a reference point for scaling agent applications.

Local-first and privacy protection. Storing data in local SQLite, no telemetry, and using the user's own login credentials—these design choices respond to developers' concerns about code privacy and data sovereignty.

Of course, the current demo only covers parallel dispatch of a single request. Task dependency management in multi-turn conversations, retry strategies after agent failures, and the coordination efficiency of larger agent teams remain areas such systems need to keep validating. As an open-source project, protoAgent offers a runnable starting point for exploring these boundaries.

One-line Summary

protoAgent orchestrates three Claude Code agents in parallel with LangGraph for just $0.22.

Paragraph Summary

protoAgent is an open-source multi-agent project built on LangGraph: a user request is decomposed by a lead agent and dispatched to three sub-agents—engineer, QA, and researcher—running in parallel, each with an independent Claude Code instance communicating via the A2A protocol. In the demo, a slugify function implementation, test design, and Unicode research were completed for $0.22, after which the lead ran 74 tests and fixed failures. A real-time org chart shows each agent's run count, success rate, and cost; data is stored in local SQLite with no telemetry, and the project is open source under the MIT license. The article argues the demo reflects three trends: role specialization, cost observability, and local-first design.

#LangGraph#multi-agent#protoAgent#Claude Code#A2A protocol#agent orchestration
Share:

Related articles