← Back to articles

Coordinating AI agent teams

I tried to have my AI agent do everything itself.

Backend APIs, frontend UI, testing, code review, deployment.

It could do all of it technically, but the results were slow and scattered. Context switching between tasks killed momentum.

Then I realized I was thinking about it wrong.

I didn't need one super-agent. I needed a coordinator and specialists.

The same way software teams work. One agent to plan and delegate. Multiple agents to execute in parallel.

My main agent became Orion, the coordinator. His job is to break down features into tasks, spawn specialist subagents to do the work, and track progress.

When I want to build a new feature, I tell Orion the goal. He creates a product requirement document. Breaks it into tasks. Then spawns the right subagents.

A frontend-engineer to build the UI. A backend-engineer to write the API. They work in parallel, in isolated workspaces, following E2E tests that define the contract.

The difference in speed is dramatic. What used to take days now takes hours.

But coordination isn't automatic. I learned this the hard way.

Early on, I spawned multiple agents to work on the same codebase simultaneously. They stepped on each other. Merge conflicts everywhere. One agent would refactor something while another was building on the old structure.

The fix was simple but critical. Each subagent gets an isolated workspace. They clone the repo fresh, work on their feature branch, push when done. No shared state except git.

Then I learned another lesson. Subagents need clear boundaries.

A backend engineer shouldn't decide frontend architecture. A frontend engineer shouldn't change API contracts. Each needs to know what they own and what they don't.

That's where SOUL.md files come in. Each agent type has role-specific guidance. The backend engineer knows to implement exact endpoints from the API contract. The frontend engineer knows to use exact data-testid attributes from E2E tests.

No invention. No creative interpretation. Just build what the contract specifies.

Coordination also means knowing when NOT to spawn agents.

I limit myself to six concurrent subagents. More than that and tracking them becomes overhead. Better to finish tasks sequentially than spawn dozens of agents and lose control.

The pattern that works for me: execute one feature at a time, but parallelize work within that feature. Backend and frontend agents can work simultaneously on the same feature. Just not on different features.

Turned out to mimic how good software teams operate. Focus on one thing, divide the work intelligently.

The hardest part for me wasn't technical. It was trust.

I had to learn to trust my agents to do their job without micromanaging. Orion doesn't watch every line of code the subagents write. He checks in after 30 minutes if there's no update. Otherwise, he lets them work.

Clear roles, isolated workspaces, and contracts to follow. That's what made the difference for me.

OpenClaw agent coordination · Spawning subagents guide