Layered diagram of identity, data, API, event and observability connections between an AI model and enterprise systems

Enterprise AI Integration: The Five Layers That Decide Whether It Delivers

The model is rarely what fails. Identity, data contracts, MCP and APIs, events and observability decide whether enterprise AI works, and each has a test you can run before go-live.

By Shayan Salehi 8 min read

Image: ColdAI

Enterprise AI delivers or disappoints at the points where it connects to your systems. A capable model that acts with the wrong identity, reads data with no agreed meaning, calls tools nobody has scoped, or leaves no trace of what it did cannot be trusted with real work. Five integration layers decide the outcome: identity and permissions, data contracts, APIs and the Model Context Protocol, event-driven integration, and observability of AI calls.

Why integration is where AI projects succeed or fail

A model on its own produces text. It becomes useful when it reads a ledger, opens a ticket, drafts a reply from a customer record, or triggers a payment run. Every one of those steps crosses a boundary into a system with its own owner, its own permissions and its own failure modes.

That is also where the risk sits. The OWASP Top 10 for LLM Applications 2025 describes Excessive Agency as the vulnerability that lets damaging actions happen in response to unexpected, ambiguous or manipulated model output. It names three typical root causes: excessive functionality, excessive permissions and excessive autonomy. All three are integration decisions, not model decisions.

The sections below take the five layers in the order we would design them. Each ends with a test you can run before go-live.

Layer 1: Identity and permissions

The first question is whose authority the AI acts under. If a support assistant reads the order database with a shared service account that can see every customer, then every user of the assistant effectively has that reach, whatever the interface says.

OWASP's guidance on Excessive Agency lists several mitigations that answer this directly. Run extensions in the user's context, so downstream systems see the specific user and the minimum privileges needed. Minimize extension permissions, for example read access to one table instead of the whole database. Apply complete mediation, which means authorization is enforced in the downstream system and not left to the model to decide.

The Model Context Protocol specification of July 28, 2026 states the same discipline for its authorization flow. MCP servers must validate that access tokens were issued specifically for them as the intended audience. Clients must not send tokens to an MCP server other than ones issued by that server's authorization server, and servers must not accept or pass on any other tokens. This closes off token passthrough, where a server forwards a token meant for something else and a downstream API wrongly trusts it.

Test before go-live: take two users with different entitlements, ask the system the same question, and confirm the answers differ exactly as their permissions do. Then confirm that a revoked user loses access without anyone redeploying the AI.

Layer 2: Data contracts

A model cannot tell that "revenue" in one system means booked and in another means invoiced. People can ask. A model will pick one and sound certain.

A data contract is a written agreement between the team that produces a dataset and the teams that consume it. The Open Data Contract Standard, an open specification for describing data contracts in YAML, organizes them into sections that include fundamentals, schema, data quality, service-level agreements, team roles and support channels. You do not need that specific format, but you do need those questions answered for every source an AI system reads.

For each source feeding an AI workflow, record the owner, the schema and the meaning of each field, the freshness the consumer can rely on, the quality rules that are checked, and who is told when any of it changes. Then make the AI integration read through that contract and not around it.

Test before go-live: change a field name or a value format in a staging source and see what happens. If the AI workflow keeps answering with wrong or empty data and nobody is alerted, the contract is missing or not enforced.

Layer 3: APIs and the Model Context Protocol

Integrations between AI and enterprise systems go through ordinary APIs, through MCP, or through both. MCP is an open protocol for connecting AI applications to tools and data. The revision dated July 28, 2026 changes how it works in ways that matter to architects. Its changelog says MCP is now stateless: the initialize handshake and protocol-level sessions are removed, and every request carries its protocol version and client capabilities. Servers must also implement a discovery call that advertises supported versions and capabilities.

Two practical consequences follow. First, pin the protocol version you support and test against the revisions your vendors still ship, because the specification itself distinguishes older handshake-based versions from the newer per-request model. Second, check the deprecation list before building on a feature. The same changelog deprecates Roots, Sampling and Logging, and tells new implementations not to adopt them.

The tools page of the specification sets out baseline controls. Servers must validate all tool inputs, implement access controls, rate limit tool invocations and sanitize tool outputs. Clients should prompt for confirmation on sensitive operations, show tool inputs to the user before calling the server, validate results before passing them to the model, apply timeouts and log tool usage for audit. The specification also says there should always be a human in the loop with the ability to deny tool invocations, and that clients must treat tool annotations as untrusted unless they come from trusted servers.

Whether you use MCP or plain APIs, the design rule is the same. Expose narrow tools with one clear purpose, not open-ended ones. OWASP's example is a file-writing tool in place of a general shell command. A narrow tool is easier to permission, to test and to explain to an auditor.

Test before go-live: list every tool the AI can call, and for each one write down what the worst legitimate call and the worst malicious call would do. If the answer is "anything," split or remove the tool.

Layer 4: Event-driven integration

Some AI work should not wait for a person to ask. A new invoice arrives, a sensor crosses a threshold, a case changes status, and an AI step classifies, drafts or routes. Events are the natural trigger, and they bring their own failure modes.

The CloudEvents specification defines a vendor-neutral format for event data. It requires four attributes on every event: id, source, specversion and type. It also says that producers must ensure source plus id is unique for each distinct event, and that consumers may treat events with the same source and id as duplicates.

That last point matters for AI. The specification expects that an event may be re-sent, for example after a network error, so the same event can arrive twice. If an AI step reacts to an event by sending an email or posting an entry, a duplicate must not produce a second email or entry. Key every action the AI triggers on the event's source and id, and store the outcome so a repeat returns the earlier result.

Also decide where a person sits in the loop. For low-risk steps, such as tagging a document, let the AI act and sample the results afterward. For steps that move money or change records of account, route the AI's proposal to an approval queue and let the event stream carry the decision back.

Test before go-live: replay the same event three times and confirm exactly one effect. Then drop the AI service for ten minutes and confirm that events queue and drain without loss or double processing.

Layer 5: Observability of AI calls

When an AI-assisted process produces a wrong result, the first question is what it saw, what it called and what it did. Without traces, the answer is a guess.

OpenTelemetry has a set of semantic conventions for generative AI. They are still marked as being in development, so expect names to change, but they already give a shared vocabulary. A model call is a span named after the operation and the model. Token usage is recorded in the attributes for input tokens and output tokens. A tool call is its own span named for the tool.

The conventions for MCP go further. They recommend injecting trace context into the request's params._meta property, so the client span becomes the parent of the server span regardless of transport. The MCP specification itself now documents the traceparent, tracestate and baggage keys for this purpose. The result is one trace that runs from the user's request through the model call, the tool call and the downstream system.

Be careful with content. The OpenTelemetry conventions treat recording prompts and model outputs as opt-in, and note that those attributes are likely to contain sensitive information including personal data. Log structure, timing, token counts, tool names and outcomes by default. Capture full content only where you have a retention rule, access control and a reason.

Test before go-live: pick one answer from a pilot user and reconstruct, from traces alone, which model call and which tools produced it, how long each took and how many tokens it used.

Where to start

Do not begin with a platform. Begin with one AI workflow that is close to production and walk it through the five layers.

  1. Draw the workflow as a path from user to model to tools to systems of record, and mark every place identity changes.
  2. Replace any shared service account with user-scoped access, and write down the entitlement test from Layer 1.
  3. Name an owner and write a one-page contract for each data source the workflow reads.
  4. List the tools, narrow the broad ones, and add rate limits, timeouts and an approval step for anything that changes a record.
  5. Make every event-triggered action idempotent on source and id.
  6. Turn on traces across model calls and tools, with content capture off by default.

Start with the five tests above, because each one produces evidence in a day or two and shows where the integration will break before users find out.

Tags:enterprise-ai-integrationmodel-context-protocolai-observabilitydata-contractsevent-driven-architectureai-securityopentelemetry

Your starting point

What would you like to move forward?

Start with the outcome that feels closest. We'll help give the next step a useful shape.

Let's find your next move

One conversation. A clearer direction.

Tell us what you want to improve. A few sentences are enough to start.

shayan@coldai.org