Egor Urvanov

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

One agent per bounded context: why there are as many agents as meaning boundaries, how it scales, what sits between agents and where to start.

· 2 min · · Harness

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 contextsalesdeliverypayment"order" means three different thingssalesown vocabularyown specsdeliveryown vocabularyown specspaymentown vocabularyown specsboundaries = contracts between agents● 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
Load on one agent0%50%100%12345678number of bounded contextsone agent for allagent per contextNumber of agents04812345678number of bounded contexts1 context = 1 agentillustrative numbers
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. In our experience. The numbers in the charts are illustrative.
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 our 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
Context map and contractssalespaymentdeliverypartnereventAPIcontractcontracteventnot under our controlthe agent works through the 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

1draw the context map
2assign an agent to each
3write contracts on the borders
Takeaway
In this exampleStart with two neighbouring contexts and one contract between them.
In generalOne context, one agent, one contract: 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.
© 2026 Egor Urvanov