Enterprise Agent Platform Architecture: Static Skeleton Design for Multi-Channel Delivery

    This article explains how to keep an enterprise agent platform coherent as web chat, embedded assistants, open APIs, and local development tools are added. Instead of modeling chat, retrieval-augmented agents, workflows, and multi-agent scenarios as separate entity types, it recommends one agent aggregate plus delivery adapters with explicit context contracts. It covers three independent version tracks—definition, runtime, and tool contracts—and argues for immutable versions and pinned version tuples. It also describes six downward-only dependency layers enforced at build time, separate control and execution planes, five identifiers, and two aggregate roots for definitions and runtime records. It concludes with a phased rollout sequence, common failure modes, and self-checks for permissions, versioning, context, cost, and channel removal.

    Many teams interpret “building our own agent” as starting with a page that can chat. What actually determines whether a platform becomes thicker or messier three months later is often not the cleverness of any single invocation, but how the system is modeled on day one: what an agent is, how versions are separated into tracks, where module boundaries are fixed, and which layer records the identity and state of a request.

    Enterprise requirements tend to spread in almost the same rhythm. In week one, a web Q&A page may need only to query policies and view log summaries. In week three, alerting and ticketing teams want an entry point embedded in existing systems, opened with the application name, cluster, and current incident context. In week five, the release pipeline requires a server-side SDK or open API that does not intrude on application frameworks, so risk assessment can be performed at change-control gates. In week seven, frontline developers want to stay inside their local AI coding tools and reuse the same governed tools and code repositories instead of switching to a browser. If these four requirements become four product lines, each with disconnected entities for Q&A, retrieval, orchestration, and tool services, permissions will fragment into multiple sets, progressive rollout rules will be implemented separately, a change to one tool parameter will need to be synchronized in several places, and monthly token consumption will not reconcile.

    The four boundaries below are not a feature list. They exist so the same capability can be delivered in multiple forms without duplicating the domain model.

    1. One Agent Entity, Not Four Mutually Exclusive Types

    A common first main table adds a type enum: chat-only, retrieval-augmented, workflow, and multi-agent. It looks clean in a prototype, but it fails once real business requirements arrive. Enterprise assistants are almost always composite: they must answer based on policies, call tools in steps, and hand subtasks to specialized capabilities when necessary. Once the type is encoded into the primary-key semantics, retrieval configuration, tool allowlists, and orchestration graphs grow their own tables, and the same questions—who can use it, which version is used, and how much it costs—cannot be reused.

    A safer approach is to keep a single agent aggregate: identity, owner, visibility scope, default model policy, tool grants, knowledge scope, and runtime quota. Differences in form belong in delivery adapters, not in domain types.

    • Chat entry: browser session, with context explicitly provided by the user.
    • Embedded entry: the host page injects read-only context such as application, cluster, and ticket; the agent definition remains unchanged.
    • Open API and SDK: the pipeline or business system calls as a service identity; authentication uses application credentials rather than a page login session.
    • Local development entry: coding tools connect to the same agent through a governed channel and reuse the tool catalog and repository permissions. There is no separate “local-only agent.”

    In a simplified view, creation and invocation should point to the same identifier:

    1. Agent
    2. id, owner, scope, policy_ref, tool_grants, knowledge_scope, quota
    3. Delivery
    4. channel = web | embed | api | ide
    5. context_contract # context fields this channel may inject
    6. Invocation
    7. agent_id + channel + caller_identity + pinned_versions

    There is no need to invent a separate “knowledge assistant.” Knowledge scope is a binding on the agent: document collections, update policy, and whether citations must be returned. Without a binding, the entity is a general chat agent; with a binding, the same entity automatically gains retrieval capability. Workflows and multi-role collaboration follow the same pattern: they are versions of policies and graphs, not separate entity types.

    This avoids duplicate delivery across the four forms. Permission checks, progressive rollout, audit, and cost all key off agent_id only. The channel determines only the context contract and interaction protocol. Any extra fields required by an embedded scenario must be declared in the contract; a channel is not allowed to inject arbitrary page state into the prompt on its own.

    2. Three Version Tracks So One Release Does Not Pull Everything Along

    An agent platform has at least three kinds of things that change independently. If they share one version number, they block one another.

    1. Definition track: prompt policy, tool grants, knowledge scope, and quotas. Business owners care about this track. It changes frequently and must support progressive rollout and rollback.
    2. Runtime track: model routing, inference parameter boundaries, timeouts and retries, and content safety policy. The platform team cares about this track. Changes must go through compatibility checks, and changing one prompt must not force a whole runtime upgrade.
    3. Tool and contract track: the input parameters, output parameters, permission points, and side-effect level of each tool. When a tool changes, every agent that references it may be affected. The contract must therefore be versioned, and invocations must pin a specific contract version.

    A production request should be able to answer: which definition version, which runtime version, and which tool contract version were used. Replay and incident investigation depend on this tuple, not on “the latest version in production at that time.” Rollout rules are also issued per track: it is possible to roll out only a definition without touching the runtime, or to expose only one tool contract to a small percentage of traffic. Whole-package replacement releases should be prohibited; otherwise embedded pages, open APIs, and local entry points will behave inconsistently at the same moment.

    Version storage should be immutable: published versions are append-only and are never modified in place. Drafts and published versions are separated. Rollback points traffic back to an old version number; it does not edit the database back to an earlier state.

    3. Six Downward-Only Dependency Layers and Build-Time Gates

    If modules can call one another freely, hard-wired shortcuts will break the static skeleton during iteration. Dependencies should be allowed to point downward only, and this rule should be checked at build time rather than remembered during code review.

    1. Access layer: pages, embedded components, open APIs, and local channels. It performs only authentication, context validation, and protocol conversion.
    2. Application layer: use cases such as “start a governed invocation” and “publish a definition version.”
    3. Domain layer: domain rules for agents, authorization, versions, and quotas. It is unaware of specific channels.
    4. Orchestration layer: task decomposition, tool selection, and multi-step state machines. It consumes only the authorization results provided by the domain layer.
    5. Capability adapter layer: unified ports for model invocation, retrieval, and tool execution.
    6. Infrastructure layer: storage, messaging, cache, and audit logs.

    Forbidden dependencies should be written into build rules: the access layer must not call tool execution directly; the orchestration layer must not read channel-private session tables; the capability adapter layer must not rewrite agent definitions. The control plane and execution plane should also be separated at the process level. Publishing, authorization, and quotas belong to the control plane; actual model and tool execution belong to the execution plane. The execution plane accepts only tasks with pinned versions and prior authorization, and it cannot go back and modify definitions. In this way, even if local entry points or pipeline interfaces are added, execution logic will not be copied four times.

    These gates can be implemented with dependency-direction checks and a small set of architecture tests: a reference that violates the layering directly fails the build. At runtime, a capability-port interface adds another layer of protection so business code does not hard-code the call details of a particular model or retrieval implementation.

    4. Five Identifiers and Two Aggregate Roots

    Reconciliation failures usually occur because a user action has no stable primary key in the system, so logs, billing, and tool side effects are recorded separately. Use at least five layers of identifiers, with traceability across each layer:

    • Principal identifier: a user, service account, or host application that determines permissions.
    • Agent identifier: the domain entity being invoked.
    • Version tuple: definition, runtime, and tool contract.
    • Session or task identifier: the business boundary for multiple turns or cross-step execution.
    • Invocation identifier: a single model or tool execution, the smallest granularity for billing and audit.

    Use two aggregate roots in the data model instead of one wide table. The agent aggregate root owns definitions, authorization, and version pointers; it changes infrequently and requires strong consistency. The runtime aggregate root owns sessions, invocations, tokens, and tool traces; it has frequent writes and can be partitioned by time. The two are linked only by agent identifier and version tuple. Runtime records must not write back and overwrite definitions. Cost summaries are aggregated by invocation identifier to the agent and the principal; the channel is only a dimension, not another ledger.

    Context injection must also be captured in runtime records. The application name, cluster, and ticket ID introduced by an embedded scenario are evidence for that invocation; they are not written into the agent definition. In this way, the same agent can serve both a web page and a pipeline, and an audit can still show what context it saw at the time.

    5. Implementation Sequence and Common Failure Modes

    It is not necessary to build every channel in the first week. A practical sequence is:

    1. Establish the agent aggregate and the three version tracks, with web Q&A as the first delivery form.
    2. Connect the open API to the same identifier so the pipeline can reuse the agent.
    3. Implement the embedding contract and explicitly define which fields may be injected.
    4. Connect the local development channel.

    Each new channel should add only an adapter and a context contract, not a new entity type.

    There are four common failure modes:

    1. Using an enum “type” to avoid modeling. Two weeks later, composite assistants cannot be classified.
    2. Writing tool parameters separately on each channel side. A change in one place misses three others.
    3. Keeping progressive rollout only as a switch in an admin console while the execution plane does not validate the version tuple. Replays then become inaccurate.
    4. Putting control-plane logic inside the execution process, so the local channel directly modifies quotas or authorization “to avoid one extra hop.”

    A concrete self-check can be:

    • Can any invocation use only the agent identifier to join permissions, version, context, and cost?
    • After retiring one channel, can the remaining channels operate without table changes?
    • When rolling back a definition version, do the runtime and tool contracts remain unchanged?

    If all three hold, the platform is becoming thicker rather than copying a separate agent for each entry point.