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.
One giant God Agent that does everything
Single-responsibility micro-agents working together
The same principle as good software design
Single responsibility, explicit interfaces, least privilege: nothing new, applied to agents.
Intake · Matcher · Writer · ComplianceEach agent does one thing and has a short prompt about only that thing.
BuyerCriteria → Listing[]Inputs and outputs validated by a schema, so a bad handoff fails loudly at the boundary.
state machine or plain codeDecides who runs next. Deterministic, testable, and logged.
Matcher: read-only MLSOnly the agent that sends email can send email. A bug in one agent has a small blast radius.
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.”
- 01One prompt covers parsing, search, writing, compliance, CRM
- 02Agent picks among 30+ tools on every turn
- 03Email has a fair-housing problem: which part failed?
- 04Fixing the wording breaks listing search
- 01Intake → BuyerCriteria (small model, no tools)
- 02Matcher → Listing[] (read-only MLS search)
- 03Writer → EmailDraft (no send permission)
- 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)How God Agents degrade
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.
“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.
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.
A bad output is the product of one long trace. Root cause is guesswork.
Each handoff is a logged, validated object. Failures are localized.
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.
Is it time to split your agent?
Keep one agent
A single focused agent is simpler and faster. Keep its tools few and its prompt short, and revisit when it grows.
What splitting costs
How to refactor a God Agent
- 01Read 50 production traces and group the work the agent actually does into responsibilities.
- 02For each responsibility, list the tools and permissions it truly needs.
- 03Define a schema for what each agent receives and returns.
- 04Extract one agent at a time behind its contract; keep the rest running as before.
- 05Write evals per agent, so each can be improved and re-tested in isolation.
- 06Move ordering into a deterministic orchestrator once three or more agents exist.
Implementation options
Each agent is a function with a prompt and a Zod/Pydantic contract. The orchestrator is ordinary code.
Agents as nodes, explicit edges, shared checkpointed state.
Subagents and handoffs with scoped tools, built into the SDK.
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