Enterprise Agent and Platform Reference Architectures
Four starting designs, from one knowledgeable agent to a shared and private platform. Adapt them; do not copy them blindly.
A reference architecture is a starting map of components, trust boundaries and responsibilities. Enterprise agents need identity on every call, a policy point before models and tools, governed data access, evaluation, tracing and an owner for each part. Add a shared platform when several teams need the same controls, and private hosting when data or obligations demand it and you can operate it.
What you will learn: a memory and retrieval design, a secure agent with trust boundaries, a multi-agent platform, a private platform, a shared gateway and how to check a design.
Prerequisites: Single-Agent, Router and Retrieval Patterns, RAG Explained and Agentic RAG and Agent Threat Model and OWASP Agentic Risks.
How to use these designs
- Write the use case, users, data classes and worst plausible harm.
- Choose the nearest design.
- Remove components you cannot justify.
- Mark trust boundaries and owners.
- State assumptions and non-functional targets.
- Record decisions and test them.
The names below are roles, not products. One service may fill several roles in a small system.
The baseline shared by all four
| Capability | Question it answers |
|---|---|
| Identity | Who asked, and which agent is acting? |
| Policy | Is this model, data or action allowed? |
| Limits | How much can one request or team consume? |
| Evaluation | How do we know a change is better? |
| Tracing and audit | What happened, and who decided? |
| Stop control | How do we halt actions quickly? |
| Ownership | Who is responsible when it fails? |
If a proposed design cannot answer one of these, fill that gap before adding features.
Agent with memory and retrieval
| Store | Written by | Key rule |
|---|---|---|
| Knowledge | Ingestion from approved sources | Honor source permissions and deletion |
| Memory | Controlled write step | Show, correct and delete on request |
| State | Agent service | Expire with the task |
The write path into memory deserves as much attention as reading. Text from a document or web page should not become a trusted "fact" about a user without checks. See Memory Integrity, Isolation and Sharing and RAG Security, Freshness and Cost.
The two paths
On the read path the service identifies the user, loads task state, fetches permitted memory facts, retrieves documents the user may open, assembles a bounded context and asks the model for an answer with citations. On the write path it saves task state at once, but proposes memory entries to a separate step that checks type, source, sensitivity and consent before storing them. Keeping the paths separate lets you test and switch off memory writing without breaking answers.
- Delete or re-index promptly when a source document changes or is removed.
- Apply access changes to retrieval at query time or synchronize them quickly.
- Show users what is remembered about them.
- Set what happens when memory or the index is unavailable.
Secure enterprise agent
| Boundary | Minimum controls |
|---|---|
| User to application | Authentication, session protection, limits |
| Agent to model | Data classification, approved providers, logging policy |
| Agent to tools | Delegated, narrow identity; validation; approval |
| Outside content to agent | Treat as data; limit later actions |
| Anything to the internet | Allowlisted destinations |
A declared design can be checked automatically against such rules.
"""Check a declared design against trust-boundary rules."""
ZONE = {"user": "outside", "web": "outside", "api": "app",
"agent": "app", "gateway": "platform", "vault": "platform",
"records": "data", "vendor-model": "outside"}
FLOWS = [ # source, target, data, authenticated, logged
("user", "api", "question", True, True),
("api", "agent", "question", True, True),
("agent", "gateway", "prompt", True, True),
("gateway", "vendor-model", "restricted", True, True),
("agent", "records", "query", True, False),
("web", "agent", "page text", False, True),
("agent", "vault", "secret read", True, True),
]
def findings(flow):
source, target, data, authenticated, logged = flow
found = []
if ZONE[source] != ZONE[target]:
if not authenticated:
found.append("crosses zones without authentication")
if not logged:
found.append("crosses zones without logging")
if data == "restricted" and ZONE[target] == "outside":
found.append("restricted data leaves the organization")
if target == "vault" and source == "agent":
found.append("agent reads secrets directly")
return found
total = 0
for flow in FLOWS:
for problem in findings(flow):
total += 1
print(f"{flow[0]} -> {flow[1]}: {problem}")
print(f"{len(FLOWS)} flows checked, {total} findings")
Output:
gateway -> vendor-model: restricted data leaves the organization
agent -> records: crosses zones without logging
web -> agent: crosses zones without authentication
agent -> vault: agent reads secrets directly
7 flows checked, 4 findings
Four problems appear: restricted data leaving, an unlogged data path, unauthenticated web input and an agent reading secrets directly. The web finding needs interpretation, since public pages cannot authenticate; the real control there is to treat the text as untrusted and constrain what follows. A checker sees only declared flows, so compare the declaration with network and access logs.
Follow one request through
- The user signs in; the entry point attaches identity and applies limits.
- The runtime loads only the instructions and tools permitted for this user and task.
- The model gateway checks the data class and chooses an approved model.
- The model requests an action; the tool gateway validates and authorizes it.
- A consequential action waits for approval.
- The tool runs with a short-lived credential that the model never sees.
- The result is filtered, traced and returned; the outcome is checked before the reply.
Walk through a hostile version too: a retrieved document asks the agent to export records. Identify which control stops it if the model complies. If the only answer is "the instructions tell it not to", the design needs work. See Secure Agent Reference Architecture.
Multi-agent platform
When several teams run agents, shared services avoid repeating security and operations work. A multi-agent platform may host many independent agents, and only some will cooperate.
- One agent must not gain another's permissions through delegation.
- Handoffs carry structured context and the originating user.
- Budgets apply to the whole task tree, with a depth limit.
- The registry shows what depends on what before a change.
- Protocols such as MCP for tools and A2A between agents can help interoperability but do not decide trust.
See Securing, Evaluating and Running Multi-Agent Systems and Agent Inventory, Policy-as-Code and Release Gates.
Isolation between teams
| Resource | Separation to decide |
|---|---|
| Compute | Shared pool, separate pools or separate environments |
| Data and indexes | Separate stores or enforced tenant filters |
| Credentials | Per agent and tenant, never shared by default |
| Quotas | Per team, so one cannot starve others |
| Logs and traces | Access limited to owners and operators |
Test isolation by attempting cross-tenant access, not by reading configuration.
The shared gateway
A gateway gives one place to apply tenant rules to model use.
"""A shared gateway applies tenant policy to every model request."""
MODELS = {"hosted-large": {"zone": "external", "price": 12},
"hosted-small": {"zone": "external", "price": 1},
"private-mid": {"zone": "private", "price": 4}}
TENANTS = {"hr": {"budget": 20, "max_external": "internal"},
"website": {"budget": 14, "max_external": "public"}}
LEVEL = {"public": 0, "internal": 1, "restricted": 2}
spent, audit = {name: 0 for name in TENANTS}, []
def request(tenant, data_class, preferred):
policy = TENANTS.get(tenant)
if policy is None or data_class not in LEVEL:
return "refused: unknown tenant or data class"
order = [preferred] + [m for m in MODELS if m != preferred]
for model in order:
info = MODELS[model]
if (info["zone"] == "external"
and LEVEL[data_class] > LEVEL[policy["max_external"]]):
continue # data may not leave
if spent[tenant] + info["price"] > policy["budget"]:
continue # cannot afford
spent[tenant] += info["price"]
audit.append((tenant, data_class, model, info["price"]))
note = "" if model == preferred else f" (instead of {preferred})"
return model + note
return "refused: no permitted model within budget"
for call in [("hr", "internal", "hosted-large"),
("hr", "restricted", "hosted-large"),
("hr", "restricted", "private-mid"),
("hr", "restricted", "private-mid"),
("website", "internal", "hosted-small"),
("website", "public", "hosted-large"),
("website", "public", "hosted-large"),
("guest", "public", "hosted-small")]:
print(f"{call[0]:<8}{call[1]:<11}{request(*call)}")
print("spent:", spent, "| audit records:", len(audit))
Output:
hr internal hosted-large
hr restricted private-mid (instead of hosted-large)
hr restricted private-mid
hr restricted refused: no permitted model within budget
website internal private-mid (instead of hosted-small)
website public hosted-small (instead of hosted-large)
website public hosted-small (instead of hosted-large)
guest public refused: unknown tenant or data class
spent: {'hr': 20, 'website': 6} | audit records: 6
Restricted data stays on the private model even when another was preferred, and the request is refused once the budget is spent rather than sent elsewhere. Note the website's internal request: its policy allows only public data externally, so it also uses the private model. Substituting a model can change quality, so evaluate every permitted route and report substitutions. A real gateway needs authentication, atomic budget updates, its own redundancy and protection of any content it logs. See Model Routing, Fallbacks and Gateways.
Private agent platform
"Private" can mean a provider's isolated offering, your own cloud network, your own data center or a disconnected site. State which one, because the controls and effort differ greatly.
| Level | What stays under your control | What you take on |
|---|---|---|
| Managed model with private connectivity | Network path and application data stores | Provider terms and configuration |
| Self-hosted models in your cloud | Weights, serving, logs | Capacity, patching, evaluation |
| On premises | Hardware and location too | Procurement, facilities, resilience |
| Disconnected | No external network path | Manual updates and supply checks |
Location does not by itself make a system secure or compliant. Internal users, tools and documents can still cause harm. See Private, Air-Gapped and Sovereign Deployment and Agent Fleets and Internal Platforms.
Running your own model serving
Self-hosting adds work that a provider otherwise does: selecting and licensing models, sizing accelerators for peak concurrency and context length, queueing, autoscaling within fixed hardware, patching the serving software and evaluating every model change. Keep the gateway interface stable so that applications need not change when a model is replaced. Verify the origin and integrity of model files before loading them. Plan spare capacity for failure, because new hardware cannot usually be added in minutes. Measure quality on your own tasks, since a model that fits your hardware may behave differently from the one used in a pilot.
Which one?
| Signal | Starting design |
|---|---|
| One team, document questions with continuity | Memory and retrieval |
| Actions on business systems | Secure enterprise agent |
| Several teams repeating controls | Shared platform |
| Obligations that exclude external processing | Private platform |
Combine them as needed, but grow in steps. A platform built before there are real users often solves the wrong problems.
A staged path
- One use case with complete controls, even if built simply.
- Extract shared model access when a second team needs it.
- Add a registry once nobody can list what is running.
- Centralize tool authorization as agents begin to act on the same systems.
- Offer templates and evaluation services so the safe route is the easy one.
- Retire shared parts that teams do not use.
Operating responsibilities
- Platform team: runtime, gateways, observability, capacity.
- Product team: behavior, evaluation cases, user support.
- Data owners: sources, permissions, retention.
- Security: threat review, detection, incident response.
- Risk and legal: obligations and required oversight.
Three teams each build their own model access, logging and approval screen. The company moves model calls behind one gateway first, then adds a shared tool permission service and registry. Teams keep their own agents and tests. Each step is adopted because it removes duplicated work.
Test the architecture itself
A diagram makes claims, and each can be tested. Block the vendor model and confirm that restricted work continues or fails cleanly. Revoke a user's access and confirm that search results change. Disable one tool and watch what the agent reports. Fill a team's quota and check that others are unaffected. Trigger the kill switch and measure how long actions continue. Keep these exercises in a schedule with owners, and update the diagram when a test shows that reality differs.
Write the design down briefly
One or two pages usually suffice: purpose, a context diagram, a component diagram with trust boundaries, a table of data stores and owners, the main request path, behavior during failure, targets and open risks. Link each significant choice to a decision record. Date the document, name its maintainer and review it when data classes, tools or providers change. A short accurate description helps more than a detailed one that nobody updates. See Architecture Decision Records and Reviews.
Adapting a design to a smaller team
A small team can keep the responsibilities while using fewer parts: the identity provider you already have, one service that holds both model and tool policy, one database with separate tables for state, memory and audit, and a hosted tracing product with strict content settings. Keep the interfaces clean so that a part can be split out later. Do not drop permission checks, approval, limits or the stop control to save effort.
Costs people forget
Besides model usage, budget for index storage and refresh, tracing volume, evaluation runs, redundant capacity, on-call time, security review and migration when a provider changes. A shared service needs a funding model so that its team can keep it maintained. Compare the whole cost with the work it removes from product teams.
Plan for shared failure
Shared services concentrate risk. State what happens when identity, policy, the gateway, the index or tracing is unavailable. Policy failures should stop consequential actions. A tracing outage may allow read-only help for a short, defined period but should block actions that must be audited. Write these choices down and rehearse them.
Common mistakes
- Copying a diagram without stating requirements.
- One powerful service account for all agents.
- Mixing knowledge, memory and state.
- A gateway that can be bypassed.
- Assuming private means safe.
- No owner for shared components.
- No plan for losing the gateway or model.
Checklist
- Trust boundaries and data classes are drawn.
- Every call carries an identity.
- Model, tool and data paths enforce policy.
- Stores have owners, retention and deletion.
- Failure of shared parts is planned.
- Agents are registered with owners and risk tier.
- Evaluation gates releases.
- The declared design is compared with reality.
Frequently asked questions
Do we need a platform for the first agent?
Usually not. Build the controls that the first use case needs, with clear interfaces, and share them when a second team arrives.
Is one gateway a single point of failure?
It can be. Run it redundantly, define behavior during failure and make sure the fallback does not bypass policy.
Should memory be shared between agents?
Only for a stated purpose with permissions and provenance. Separate by default.
Are these designs vendor specific?
No. They describe responsibilities that you can fill with managed services, open software or your own code.
References and further reading
- The C4 model
- arc42 architecture template
- Microsoft Azure Well-Architected Framework
- NIST AI Risk Management Framework
- ISO/IEC 25010:2023 product quality model
Next steps
Reliability, Non-Functional Requirements and Migration
Set targets and plan change.
Architecture Decision Records and Reviews
Record and review choices.
Secure Agent Reference Architecture
Study the security design.