a2a-wrapper logoa2a-wrapper
Get started

Multi-agent crew

A runnable multi-agent software engineering workflow. A planner delegates a feature to Claude through a2a-claude, then hands the result to Codex through a2a-codex for tests and review, all over A2A.

The Software Engineering Crew example builds on the quick start: instead of one agent, several agents cooperate.

Recording: a planner delegates a feature to an implementer agent, then a tester agent

How it works

feature request ─▶ Planner (planner.mjs)
                     ├─ 1. implement ─▶ a2a-claude (Claude) :3030
                     └─ 2. test & review ─▶ a2a-codex (Codex)     :3020
                                 both work in the same git workspace
  1. The planner takes a feature request and sends it to Claude through a2a-claude.
  2. Claude implements it in the shared workspace and returns a summary as an A2A artifact.
  3. The planner hands that summary to Codex through a2a-codex, which writes tests, runs them and fixes what it finds.
  4. The planner prints the combined result.

The planner is about 100 lines of dependency-free Node that speaks plain A2A JSON-RPC. It could be any A2A-capable orchestrator. The point is that the two coding agents are interchangeable A2A peers.

Try it without API keys

git clone https://github.com/shashikanth-gs/a2a-wrapper.git
cd a2a-wrapper/examples/software-engineering-crew
node planner.mjs --mock "Add a slugify(text) helper"

--mock starts two in-process stand-in agents so you can see the flow. They make no model calls and change no files.

Run it for real

You need an ANTHROPIC_API_KEY and an OPENAI_API_KEY (or codex login plus CODEX_MODEL).

These agents can edit files and run commands in WORKSPACE_DIR. Use a scratch repository, not one you care about. See the security guide.

Install and build

From the repository root:

npm install
npx turbo run build

Create a shared scratch repository

Codex requires a Git repository.

export WORKSPACE_DIR=$(mktemp -d)
git -C "$WORKSPACE_DIR" init && git -C "$WORKSPACE_DIR" commit --allow-empty -m init

Start the implementer (Claude)

export ANTHROPIC_API_KEY=sk-ant-...
cd a2a-claude && npm run dev -- --config agents/example/config.json

Start the tester (Codex)

export OPENAI_API_KEY=sk-...   # same WORKSPACE_DIR as above
cd a2a-codex && npm run dev -- --config agents/example/config.json

Run the crew

cd examples/software-engineering-crew
node planner.mjs "Add a slugify(text) helper to src/slugify.js that lowercases and hyphenates"

Use IMPLEMENTER_URL and TESTER_URL if your agents run on other ports or hosts.

What the planner does

  • Discovery: fetches /.well-known/agent-card.json from each agent first.
  • Delegation: sends message/send with configuration.blocking: true.
  • Artifacts: reads the text parts of each agent's returned artifacts.
  • Sessions: shares one contextId across both calls so each agent can keep multi-turn history.

Ideas to extend it

  • Add a third agent (a2a-copilot or a2a-opencode) as a reviewer.
  • Loop until the tester reports passing tests.
  • Replace the planner with LangGraph, Google ADK or any other A2A client.
  • For the variant where sub-agents are exposed as MCP tools, see sub-agents.

Status

The --mock path runs with no external services. The real path depends on live model APIs and is not covered by CI, so treat it as a working reference.

On this page