Egor Urvanov

How many AI agents you needThe number of agents grows with the number of bounded contexts

How many AI agents do you need? As many as there are bounded contexts: each meaning boundary gets its own agent. Below: why, how it scales, what sits between agents and where to start.

One agent per context

There are as many agents as bounded contexts. That way an agent has enough context.

One for all or one per context
One agent for everythingOne agent per contextcartparcelinvoice?one word, three meanings: the agent mixes them upsales«order» = cartdelivery«order» = parcelpayment«order» = invoiceborders of meaning: each agent has its own● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
Takeaway
In this example"Order" means different things in sales, delivery and payment. One agent mixes the meanings, three agents each keep their own.
In generalA context boundary already shows where the meaning changes. It is a handy place to cut both specs and the agents' work.
What to doList the project contexts and write next to each one who works inside its boundaries.

How it scales

Load and number of agents
One agent, 8 contexts8 agents, one context each!the stack grows, the agent drownseach holds one small stack● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
Takeaway
In this exampleEight contexts: one agent drowns in meanings, while eight agents each work within their own borders.
In generalThe number of agents grows linearly with the number of contexts while each one's load stays flat.
What to doAdd an agent together with a new context instead of growing one agent's context.

What sits between agents

Agents talk through contracts: events and APIs. A foreign context is not under your control, so the agent reaches it only through the contract and with your confirmation. More on judging complexity: where the complexity is real.

Context map
salespaymentdeliverypartnereventAPIeventborder of our controlcontractcontracta foreign system: through a contract only● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
Takeaway
In this exampleThe sales agent reads the "order paid" event from payment and writes to the partner system only through an approved contract.
In generalA contract replaces shared context: agents do not need to know the inside of someone else's boundary, and a mistake does not spread.
What to doFor each link between contexts write the contract in one line: what it gives, what it takes, who owns it.

Where to start

The first step
context 1its own agentcontext 2its own agentone contractwhat it gives, what it takes, who owns it● model, people, systems, data  ● agent and harness  ● risk, stop, boundary
Takeaway
In this exampleStart with two neighbouring contexts and one contract between them.
In generalTwo neighbouring contexts, one agent for each and one contract between them: that tests the scheme before you stretch it across the whole project.
What to doPick two contexts where words get mixed up most often and start one agent for each.

Frequently asked questions

How many AI agents do you need?

As many as there are bounded contexts: each meaning boundary gets its own agent.

How does this scale?

The number of agents grows linearly with the number of contexts, while the load on each stays even.

What connects the agents?

A contract at the boundary: agents need not know another context’s internals, and a mistake does not spread.

Where do you start?

With two neighbouring contexts: one agent for each and one contract between them: this tests the setup before stretching it across the whole project.
© 2026 Egor Urvanov