Most agent demos collapse three jobs into one process: the model loop, the tools, and the product the tools mutate. That is fine for a screenshot. It is expensive the week a second agent appears, or the week the tenant API has to ship without waiting on prompt changes.
I keep those jobs on three surfaces. Agents stay replaceable. The harness owns the loop. The tenant API owns the domain.
agents → python harness
↓
.net tenant api
↓
azure
That split is how I run the AvenFort work: multiple agents, a Python harness, a .NET API, on an Azure VM. The rest of this note is the contract between those boxes, not the prompts inside them.
The three surfaces
Agents are policies. They decide what to try next. They should not know how a tenant stores a record, how auth is enforced, or which VM they run on. When an agent is wrong, you swap or constrain it. You do not rewrite billing.
The harness is the loop. In Python that means session, tool dispatch, retries, and the boundary that turns a model request into a typed call. It is also where you refuse to do work: missing auth, unknown tool, payload that does not match the contract. If the harness and the agent share a codebase with the product, you will ship product bugs to “fix” the model.
The tenant API is the product. For us that is .NET. It already has tenancy, validation, and persistence. Agents should look like another client of that API, not a back door. If an agent can skip a rule a human user cannot skip, you do not have a tool. You have an exploit.
Runtime — here, Azure — is a fourth box only in operations. Scaling, secrets, and disk belong there. They should not leak into tool names.
What not to couple
Do not let the harness construct SQL. Do not let the agent choose raw HTTP. Do not let the tenant API parse chat transcripts.
The failure mode I watch for is a “convenience” helper that takes a natural-language argument and decides which table to touch. That helper will work once. The second agent will call it with a different dialect of the same intent, and you will debug product state through logs that look like conversation.
Keep a narrow tool list. Each tool maps to one API operation you would be willing to expose to a careful human. Side effects stay in the API. The harness records that the call happened.
Maintainability is a leadership problem
The split also decides who can work in parallel. Prompt and evaluation work can move in the harness without blocking API reviewers. API work can ship behind the same auth the rest of the product uses. Agents can be added without a migration.
That only holds if code review treats the boundary as load-bearing. A pull request that reaches through the harness into tenant internals is not a shortcut. It is the start of a second product.
Next
The next note is the other half of this: tool contracts, evaluations, and what you log before an agent is allowed to call production. The architecture above is useless if the tools are vibes.