Enterprise AI Agent Platform: Four Static Foundations
This article examines the static design foundations that determine whether an enterprise AI agent platform scales cleanly or decays into complexity. It covers four boundaries: a single agent domain model projected into four delivery forms, three independent version tracks for prompts, capabilities, and models, six layers of unidirectional dependencies with a zero-framework compile gate, and five-level state IDs backed by dual aggregate roots. It also outlines a four-week rollout path and a six-question pre-launch checklist.
Over the past two weeks, we followed a real production request and explained why the control plane and execution plane must be completely separated at the physical process level. Anyone who has run an enterprise-grade infrastructure platform for more than a year knows that what determines whether a system grows thicker and stronger or turns into a swamp is often not a clever runtime trick, but the static skeleton established on day one: how domain entities are modeled, how version evolution is split into tracks, how code modules enforce boundaries, and how underlying state and data backbones are divided.
1. Suffocating Requirement Sprawl: Four Requests or Three Kinds of Chaos?
Internal enterprise AI platforms almost always go through the same requirement sprawl:
- Week 1: The business team only wants an internal web chat window that can answer questions about policy documents and search logs.
- Week 3: Monitoring, alerting, and ticketing systems arrive: can we embed a floating widget in the lower-right corner of the old system, and when it opens, automatically include the application name, cluster ID, and ticket context of the current error page?
- Week 5: The R&D and release pipeline team asks: can you provide a zero-framework-intrusion SDK or open API so we can call the agent directly in release change gates for risk assessment?
- Week 7: Frontline developers and operations engineers ask: we spend most of the day in local AI coding tools writing code and troubleshooting. Can you stop forcing us to switch to a browser and let us connect directly to this agent, reusing internal controlled operations tools and code repositories?
If you follow inertia and split these four requests into four independent product lines, then build four or five incompatible entity tables in the admin console to match popular concepts such as “basic Q&A agent,” “knowledge base retrieval agent,” “multi-agent orchestration agent,” and “tool service agent,” you will inevitably create three kinds of chaos within three months: the permission system splits into three separate systems, canary rules diverge, a tool parameter change must be synchronized in four places, and month-end Token cost accounting simply does not reconcile.
The root cause is not the number of requirements. It is mistaking delivery form for domain entity. Form is a projection; the entity is the backbone.
2. Boundary One: A Single Agent Domain Model with Zero-Duplicate Delivery in Four Forms
Many teams rush to add a type enum to their first core table: agent_type = CHAT | RAG | WORKFLOW | MULTI_AGENT. It looks clean at the prototype stage, but after two weeks in business operations it hits a dead end: real enterprise business assistants are naturally cross-type composites.
Take the most ordinary “production troubleshooting assistant” as an example. An employee asks, “Why was the order service unstable last night?”
- It first retrieves troubleshooting manuals from the operations knowledge base (retrieval augmentation).
- It then calls internal APIs of the logging platform and monitoring system to pull exception stacks (tool invocation).
- It finds that slow SQL is involved and needs to pull database diagnostic capabilities for execution plan analysis (tool invocation).
- Finally, it follows a predefined handling process: “locate—verify—rollback suggestion” (orchestration).
It is simultaneously a Q&A agent, a retrieval agent, a tool agent, and an orchestration agent. An enum field has only two outcomes here: either it is forced into multi-select and the enum degrades into tags, or the agent is classified by the highest complexity and all other capabilities are implicitly coupled into the prompt.
The correct solution is to converge the entity into one and push differences down into declarative configuration:
{"agent_id": "agent_prod_triage","model_binding": { "profile": "default", "fallback": "lite" },"instruction_ref": "prompt://triage/v7","capability_refs": ["kb://ops_manual", "tool://log_query", "tool://sql_insight"],"orchestration": { "mode": "plan_then_act", "max_steps": 8 },"exposure": ["web", "embed", "openapi", "ide"]}
The four forms are simply four projections of exposure: the web page is web, the floating widget is embed, the pipeline change gate is openapi, and the local coding tool is ide. Retrieval, tools, and orchestration are no longer types; they are pluggable capability references.
This immediately delivers three benefits: permissions only need one set of subject-resource authorization on the entity; canary releases only need traffic splitting by entity; and costs are attributed by agent_id, so the books naturally reconcile.
Acceptance criteria: Adding a new delivery form must not add an entity table, must not add a permission module, and must not modify the tool registry.
3. Boundary Two: Three Independent Version Tracks
The real change frequency of an agent varies greatly: prompts may change three times a day, tool contracts may change once a week, and model bindings may change once a quarter. If they are mixed on one track, a prompt change is forced to wait for model approval, and an emergency rollback must roll back tools together.
We split it into three independent tracks, each with its own version number, approval flow, and rollback point:
| Track | Content | Change Frequency | Rollback Granularity |
|---|---|---|---|
| Prompt track | Instructions, examples, output constraints | High | Single version, seconds |
| Capability track | Tool contracts, knowledge base mounts, orchestration policies | Medium | Contract version |
| Model track | Model bindings, parameter profiles, fallback chains | Low | Binding version |
The entity holds only one “published combination pointer” that points to the specific version triple of the three tracks. During canary releases, traffic is split by triple. During rollback, only the problematic track is rolled back. For example:
published = { prompt: v7, capability: v12, model: v3 }canary = { prompt: v8, capability: v12, model: v3 } # only the prompt changes
4. Boundary Three: Six-Layer Unidirectional Dependencies and a Zero-Framework Compile Gate
Module decay never happens at runtime; it happens because no one blocks it at compile time. We enforce six layers of unidirectional dependencies. Upper layers may depend on lower layers, and reverse dependencies are forbidden:
- Interface layer: web, embedded mounts, open APIs, local tool access;
- Application orchestration layer: sessions, tasks, canary routing;
- Agent domain layer: entities, capability references, version combinations;
- Capability layer: retrieval, tool invocation, process orchestration;
- Infrastructure layer: model access, logging services, monitoring and alerting, object storage, message queues;
- Data backbone layer: state and metadata storage.
Two hard constraints accompany this. First, a zero-framework compile gate: the access layer and domain layer must not contain any concrete framework annotations or types. SDKs and open APIs are adapted separately by the interface layer, ensuring zero intrusion for business teams. Second, dependency checks enter the continuous integration pipeline. A reverse reference fails the build directly, rather than relying on visual inspection during review.
5. Boundary Four: Five-Level State IDs and a Dual-Aggregate-Root Data Foundation
An agent is a stateful system. State is scattered across five levels: session, task, step, tool call, and artifact. If each level uses its own ID rule, link tracing and cost accounting immediately break. We standardize on five levels of IDs derived level by level:
session_id → task_id → step_id → call_id → artifact_id
Derived IDs allow any Token consumption and any tool invocation to be traced back to the session and tenant. Billing and auditing share the same link.
The data foundation converges into dual aggregate roots:
- Definition aggregate root: agent entities, capability registration, version triples. Strong consistency, low change frequency.
- Runtime aggregate root: session and task state, step流水. High write volume, sharded by session, eventual consistency allowed.
The two connect only through IDs and events, and do not share tables. Definition changes do not affect runtime history, and runtime peaks do not drag down configuration reads.
6. Rollout Path and Self-Check Checklist
We recommend a four-week rollout: Week 1, define entities and five-level IDs; Week 2, split the three tracks and the combination pointer; Week 3, establish six-layer dependencies and the compile gate; Week 4, complete the dual aggregate root split and cost reconciliation.
Before launch, ask six self-check questions: Does adding a delivery form require zero table changes? Does rollback touch only one track? Does a reverse dependency fail the build? Can the cost of one call be traced to a session and tenant? Does a tool contract change require only one change? Is the integrator free of framework intrusion?
If all six are green, the platform will grow thicker with use. If one cannot be answered, you are prepaying interest on a swamp three months from now.
