Diagram of one large agent node split into several small connected agent nodes
Back to Work & InsightsComprehensive Guide

Single-Responsibility Micro-Agents

One giant agent with forty tools and a five-thousand-word prompt is the monolith of AI systems. Here's when and how to split it.

TL;DR

  • A God Agent handles everything with one prompt and every tool. Each fix risks breaking something else, tool selection gets worse as tools pile up, and when it fails you can't tell which part failed.
  • Split by responsibility: each agent gets one job, a small toolset, a typed input/output contract, its own evals, and only the permissions that job needs.
  • Coordinate with a deterministic orchestrator (often the state machine), not with agents chatting freely to each other.
  • Don't over-split. Every hop adds latency, cost, and a chance to lose context. Split where responsibilities, tools, or permissions genuinely differ.
Agent architecture · Typical API wrapper

One giant God Agent that does everything

Agent architecture · FDE architecture

Single-responsibility micro-agents working together

01 · Definition

The same principle as good software design

Single responsibility, explicit interfaces, least privilege: nothing new, applied to agents.

One responsibility
Intake · Matcher · Writer · Compliance

Each agent does one thing and has a short prompt about only that thing.

Typed contract
BuyerCriteria → Listing[]

Inputs and outputs validated by a schema, so a bad handoff fails loudly at the boundary.

Orchestrator
state machine or plain code

Decides who runs next. Deterministic, testable, and logged.

Scoped permissions
Matcher: read-only MLS

Only the agent that sends email can send email. A bug in one agent has a small blast radius.

02 · Worked example

A real estate lead pipeline, two ways

A new lead fills in a web form. The brokerage wants matched listings and a personal follow-up email within minutes.

“New lead: family of four, Irvine schools, up to $1.4M, wants to move by summer.”
God Agent
One prompt, every tool
  1. 01One prompt covers parsing, search, writing, compliance, CRM
  2. 02Agent picks among 30+ tools on every turn
  3. 03Email has a fair-housing problem: which part failed?
  4. 04Fixing the wording breaks listing search
Micro-agents
Four jobs, four contracts
  1. 01Intake → BuyerCriteria (small model, no tools)
  2. 02Matcher → Listing[] (read-only MLS search)
  3. 03Writer → EmailDraft (no send permission)
  4. 04Compliance → pass / flag; orchestrator sends or routes to a human

When the email fails compliance, the log shows exactly which agent produced what. You fix one 300-word prompt and rerun its evals.

const BuyerCriteria = z.object({
  maxPrice: z.number().positive(),
  cities: z.array(z.string()).min(1),
  minBedrooms: z.number().int().optional(),
  moveBy: z.string().date().optional(),
})

const criteria = BuyerCriteria.parse(await intakeAgent(lead.message))
const listings = await matcherAgent(criteria)        // read-only tools
const draft    = await writerAgent(criteria, listings) // no send permission
const review   = await complianceAgent(draft)
return review.ok ? send(draft) : routeToHuman(draft, review.flags)
Contracts make handoffs explicit. A malformed output fails at the boundary, not three steps later.
03 · Failure modes

How God Agents degrade

Tool confusion

With dozens of similar tools, the model picks the wrong one more often, and the prompt grows to explain them.

Each agent sees a handful of tools relevant to its one job.

Conflicting instructions

“Be concise” for emails and “be thorough” for reports sit in the same prompt.

Each prompt is short and about one task, so instructions don't collide.

Blast radius

The agent that reads web pages also holds the key that sends email.

Least privilege per agent; untrusted input never reaches an agent that can act on it directly.

Undebuggable

A bad output is the product of one long trace. Root cause is guesswork.

Each handoff is a logged, validated object. Failures are localized.

One model for everything

The whole agent runs on the biggest model because one step needs it.

Simple steps run on small models; only the hard step uses the large one.

04 · Decision

Is it time to split your agent?

Your score: 0 / 6

Keep one agent

A single focused agent is simpler and faster. Keep its tools few and its prompt short, and revisit when it grows.

05 · Trade-off

What splitting costs

Latency
Each hop is another model call. Run independent agents in parallel and keep the chain short.
Context loss
Information not in the contract doesn't reach the next agent. Design contracts around what downstream needs.
More moving parts
More prompts, evals, and deployments to maintain. Worth it only when the split removes real problems.
Over-splitting
Ten agents that each do half a job are worse than one. Split by responsibility, not by step count.
06 · Playbook

How to refactor a God Agent

  1. 01Read 50 production traces and group the work the agent actually does into responsibilities.
  2. 02For each responsibility, list the tools and permissions it truly needs.
  3. 03Define a schema for what each agent receives and returns.
  4. 04Extract one agent at a time behind its contract; keep the rest running as before.
  5. 05Write evals per agent, so each can be improved and re-tested in isolation.
  6. 06Move ordering into a deterministic orchestrator once three or more agents exist.

Implementation options

SMB · fastest start
Plain functions + schemas

Each agent is a function with a prompt and a Zod/Pydantic contract. The orchestrator is ordinary code.

Graph orchestration
LangGraph

Agents as nodes, explicit edges, shared checkpointed state.

Vendor SDKs
Claude Agent SDK / OpenAI Agents SDK

Subagents and handoffs with scoped tools, built into the SDK.

Durable pipelines
Temporal

Each agent as an activity with retries, timeouts, and history.

More guides

Want this built into your workflow?

I help small and mid-size teams decide what to build, then build it, from the first eval set to production guardrails.

Talk through your use case