Define a reference architecture for the agent platform
Key takeaway
An agent platform bundles the building blocks every agent needs: model access, tool gateway, identity, logging, evaluation and environments. Teams then build only the business logic and inherit security and operations from the platform instead of reinventing them in every project.
Lessons in this path
What layers does an agent platform have?
An AI agent is an application in which a language model decides step by step which tools to call to reach a goal. To run many such applications safely side by side, shared infrastructure is separated from business logic. The table shows the usual layers.
| Layer | Purpose | Example implementations |
|---|---|---|
| Model access | Uniform access to approved models, quotas, routing | LLM gateway, cloud AI services, self-hosted models |
| Tool gateway | Serving catalogued tools, permission checks, rate limiting | MCP gateway, API management |
| Identity | Who acts: user, agent or both | Identity provider, OAuth token exchange |
| Runtime and orchestration | Executing agent logic, state, retries | Agent frameworks, workflow engines, container platform |
| Observability | Traceable record of every step, cost, errors | OpenTelemetry, existing monitoring |
| Evaluation | Test sets, automated scoring before releases | Eval frameworks, custom test suites |
On whose behalf does the agent act?
The most important architectural decision concerns identity. If the agent acts on behalf of a signed-in user, it should receive that user’s rights and no more. A token exchange suits this, where the gateway requests a separate, narrowly scoped token on the user’s behalf for each target system. The MCP specification relies on OAuth for authorisation, which makes these patterns possible in principle.
If the agent runs without a user, for example overnight as a background process, it needs its own service identity with minimal rights and an accountable owner. Avoid the common shortcut of running an agent with a developer’s personal account or a broadly privileged service account. Both are very hard to untangle later.
Which platform decisions should be made early?
Not everything has to be settled on day one. Some decisions, however, are expensive to change and belong in the first architecture round.
- Identity model: acting in user context and service identities, including a naming convention.
- One central entry point for model and tool calls so that logging and quotas apply everywhere.
- A shared trace format, for example following the OpenTelemetry conventions for generative AI.
- Environments: development with synthetic data, test with approved data, production.
- Rules for human confirmation on write actions, as a platform feature rather than a one-off.
- How teams may deploy agents self-service without filing tickets with the platform team.
Build, buy or combine?
Large cloud providers, enterprise software platforms and specialised vendors offer agent platforms with catalogue, gateway and observability. Alongside them there are open-source building blocks for orchestration, gateways and evaluation. In practice most large organisations end up with a combination: agents inside standard software stay there, custom agents run on a central platform, and both are governed through the same catalogue and the same identity.
For each option, check three things: whether traces and costs can be exported, whether your own policies can be hooked in before every tool call, and how much effort a later change of model or vendor would take.
Going deeper: failure modes the architecture must absorb
Agents fail differently from classic software. Typical patterns are loops in which an agent calls the same tool again and again, incomplete runs after a timeout, and actions executed twice because a call was retried. The platform should therefore enforce step and cost limits per run, make write tools idempotent (a repeat causes nothing extra) and give every run a unique identifier.
A second topic is context size. When a tool returns very large responses, costs rise and quality falls because the model misses what matters. Good platforms limit response sizes, offer pagination and measure per tool how much context it consumes. In practice this metric is often the fastest lever for both cost and reliability.
Example: three agents, one platform
A fictional insurance group plans three agents: a research agent for claims handling, an agent that prepares contract changes and a nightly agent that reports data quality issues. Instead of three separate projects, architecture defines a shared platform with gateway, token exchange and central traces.
The research agent acts on behalf of the claims handlers and sees only what they may see. The contract agent produces change drafts that a person confirms before the policy system accepts them. The nightly agent has its own read-only identity. When a tool gets stuck in a loop, the step limit stops the run and the trace shows the team within minutes which call caused the problem.
Common mistakes
- Running agents with personal accounts or broadly privileged service accounts.
- Letting every project build its own logging, so nobody sees the full picture.
- Setting no step or cost limits per run.
- Choosing a platform on features alone without checking exportability and switching effort.
Frequently asked questions
From how many agents is a platform worthwhile?
As rough orientation: once more than two teams build agents with access to enterprise systems. Identity, logging and approvals then repeat themselves, and a shared solution saves effort.
Does the platform replace the security review of individual agents?
No. It reduces review effort because baseline functions are inherited. Business risks of an agent, such as which decisions it prepares, still need individual assessment.
Try it yourself
For one planned agent, sketch the six layers and decide on whose behalf it acts and which actions need human confirmation.
Check your result
The sketch names a concrete component or an open decision with an owner for each layer, and the identity model is unambiguous.