Contextual Agentic

One Architecture, Any Provider: Mapping the Contextual Agentic Enterprise onto the AI Tool Ecosystem

CAE does not depend on any one model, framework, vector store or cloud. This paper places eleven layers of the AI tool ecosystem on either side of CAE's commit boundary, states when a provider can be swapped without touching the safety guarantees, and reports a portable test suite run on a provider-neutral reference shell.

·29 min read

Written as at 24 September 2026.

formal-methodsai-governanceagentic-aivendor-neutralmcppolicy-as-codereference-architectureresearch

About this paper. The Contextual Agentic Enterprise (CAE) is a vendor- and platform-agnostic architecture framework from Contextual Agentic. This is a manuscript draft: it has not been peer reviewed, and no vendor named in it has reviewed it. Product names are examples of what sits in each layer, not endorsements, rankings or claims about any product’s behaviour. Any adoption or use of CAE should be undertaken in consultation with Contextual Agentic or an authorised advisory partner, who will tailor the framework to the organisation.

Abstract

The AI tool landscape is usually drawn as a stack of eleven layers – models, agent frameworks, retrieval, embeddings, tool protocols, security, observability, memory, agent platforms, automation and vector stores – with a crowd of providers in each. Enterprises then ask the same question eleven times: which one? We argue that CAE answers most of those questions differently from the market. Because the Contextual Agentic Enterprise places authority in a deterministic commit boundary, only a small trusted core has to be chosen with care; everything on the proposal side can be swapped without touching the safety guarantees. We make that precise. We (i) define a trust-placement function that assigns every component of the ecosystem to one of five classes; (ii) state and sketch the proof of a provider-substitution property: replacing any deliberation, evidence or observation component with another that meets four interface obligations preserves invariant preservation, replay determinism and tamper evidence; (iii) map all eleven layers to CAE roles, with the obligations each must meet, the way each is most often misplaced, and neutral criteria for comparing providers; (iv) define a four-operation adapter contract that any framework or protocol can implement; and (v) report a portable conformance suite run on a provider-neutral Python reference shell: 17 fixtures, all of which escalate except the baseline, and a randomised attack of 98,564 bundles in which none of the 22,447 committed actions broke an invariant, while four deliberately weakened shells were each caught. The results show the architecture’s guarantees survive provider changes; they do not show that any provider is good, and they say nothing about utility, cost or latency.

Index Terms – vendor neutrality, LLM agents, Model Context Protocol, policy-as-code, reference architecture, runtime verification, systems of record, conformance testing.


1. Introduction

A typical map of the modern AI tooling landscape has eleven rows. At the top are model providers, below them agent frameworks, then retrieval, embeddings, tool protocols, security, observability, memory, managed agent platforms, workflow automation and vector databases. Each row holds six to nine logos [12]. The map is useful, and it invites a particular kind of decision paralysis: choose a provider in every row, and do it correctly, because a wrong choice will be expensive to reverse.

The companion formal paper [1] starts from a different observation. In a system of record, the thing that must be right is not the choice of model or framework but the path by which a change reaches the record. If agents can only propose, and a deterministic function holds the sole write capability, then the correctness of every committed transition is independent of the distribution of agent proposals (Proposition 2 in [1]). That independence has a consequence the formal paper left implicit: if the guarantees do not depend on how agents reason, they do not depend on which model, framework, retrieval stack or vector store produced the reasoning.

This paper works that consequence out.

1.1 Contributions

  1. A trust-placement function that assigns each component of the ecosystem to one of five classes: deliberation, evidence, execution, observation, and the trusted core (§3.1).
  2. A provider-substitution property (Theorem 5) with its assumptions and a proof sketch, and an explicit statement of what substitution does not preserve (§3.2).
  3. An adapter contract of four operations that any framework, protocol or platform can implement (§3.3).
  4. A layer-by-layer mapping of the eleven layers, with obligations, common misplacements and neutral comparison criteria (§4), and an anti-pattern catalogue (§5).
  5. A portable conformance suite and the results of running it on a provider-neutral reference shell (§6), and a procedure for selecting and swapping providers (§7).

The scope is deliberately narrow. This paper maps where components sit relative to the commit boundary. It does not rank providers, compare their quality, price or latency, or certify any product.


2. The Ecosystem as Eleven Layers

Table 1 reproduces the eleven layers and, for each, the kinds of product commonly found there. The layer names and example products follow a widely shared public infographic [12]; they are a convenient vocabulary, not a standard, and the list is neither complete nor current. Ownership and product status change quickly: one security vendor in the infographic’s layer was acquired by a larger security company in 2025 [11], and Microsoft describes a 1.0 release of an agent framework positioned alongside its earlier agent projects [10]. This paper therefore maps capabilities and roles, not vendors.

Table 1. The eleven layers and example products (examples only; no ranking or endorsement).

# Layer Example products named in the public landscape
1 LLM providers OpenAI GPT, Anthropic Claude, Google Gemini, Meta Llama, Mistral AI, Cohere, Hugging Face, Ollama, vLLM
2 Agentic AI frameworks LangGraph, CrewAI, Microsoft AutoGen, Microsoft Agent Framework, LlamaIndex Workflows, AWS Strands Agents, CAMEL, Agno
3 RAG LangChain, LlamaIndex, Haystack, DSPy, RAGFlow, GraphRAG, Unstructured, EmbedChain
4 Embeddings OpenAI Embeddings, Cohere Embed, Voyage AI, Sentence Transformers, BGE, Google Vertex AI Embeddings, Azure OpenAI Embeddings
5 MCP MCP SDK, FastMCP, MCP Registry, and servers for GitHub, Slack, PostgreSQL, Google Drive and the file system
6 AI security NVIDIA NeMo Guardrails, Guardrails AI, Microsoft Presidio, Lakera Guard, Prompt Security, Protect AI, Azure AI Content Safety, AWS Bedrock Guardrails
7 Observability and evaluation LangSmith, Langfuse, Arize Phoenix, Weights & Biases Weave, TruLens, Ragas, Promptfoo, Helicone
8 Memory Mem0, Zep, Letta, LangGraph Memory, Redis, PostgreSQL, Neo4j, Chroma
9 AI agent SDKs and platforms OpenAI Agents SDK, LangChain Agents, PydanticAI, Semantic Kernel, Google ADK, AWS Bedrock Agents, Azure AI Foundry Agent Service
10 Automation and workflow n8n, Zapier, Make, Microsoft Power Automate, Temporal, Apache Airflow, Prefect, Kestra, Pipedream
11 Vector databases Pinecone, Weaviate, Qdrant, Milvus, Chroma, pgvector, Elasticsearch, Redis, MongoDB Atlas Vector Search

Two features of the table matter for what follows. First, products repeat across layers (Chroma, Redis and PostgreSQL appear as both memory and vector stores; LangChain appears as retrieval and as agents), so the layer a product occupies depends on how it is used, not on its brand. Second, hosted platforms bundle several layers into one product, so a single purchase can fill a model slot, a tool slot, a memory slot and a guardrail slot at once. A placement rule therefore has to apply to components in a deployment, not to products in a catalogue.


3. A Formal Account of Provider Independence

This section assumes the definitions and notation of the formal paper [1]: the Context Contract C, the Minimum Action-Evidence Bundle M, the shell function fshell, the state space Σ and invariant set ℐ, and Assumptions A1 (capability confinement), A2 (cryptographic soundness) and A3 (policy correctness).

3.1 Trust placement

Let 𝒞 be the set of components in a deployment: every model endpoint, framework, store, tool server, gateway, workflow engine and service that handles data on the path from a business event to a committed change.

Definition 6 (Trust placement). A trust placement is a function

π:𝒞→{𝖣,𝖤,𝖷,𝖮,𝖳}

where

  • 𝖣 (deliberation) components generate or transform proposals: models, agent frameworks, agent platforms, prompt optimisers;
  • 𝖤 (evidence) components supply material that agents use: retrieval pipelines, embeddings, vector indexes and memory stores;
  • 𝖷 (execution) components carry out a change once the shell has authorised it: workflow and automation engines;
  • 𝖮 (observation) components record or evaluate behaviour without influencing it: tracing, evaluation and monitoring tools;
  • 𝖳 (trusted core) components are the contract compiler 𝒦, the bundle compiler ℬ, the shell 𝒮, the ledger ℒ, the policy store and the key custody that signs.

A placement is admissible when it satisfies five rules.

  • R1 (nothing learned or agent-influenced in 𝖳). No component whose behaviour is produced by a model, or can be changed by an agent, is on the authorisation path.
  • R2 (authority only in 𝖳 and 𝖷). Write capability to any system of record, and every signing key, is held only by 𝖳 components, or by 𝖷 components acting on a command the shell has signed. This is Assumption A1 stated per component.
  • R3 (evidence is grounded or unverified). A value on which a predicate of Π depends must be groundable in the signed contract (Definition 4 in [1]). Output of an 𝖤 component that cannot be grounded may appear in a bundle only as supporting context that no predicate reads.
  • R4 (execution is idempotent and authorised). An 𝖷 component acts only on a shell-authorised command, once per idempotency key ι, and reports the outcome to the ledger.
  • R5 (observers are read-only). An 𝖮 component cannot write to anything above it in this list.

Rule R1 gives a usable test for the many products that mix techniques. A guardrail that is a schema validator or an allow-list is deterministic and may sit in the trusted core as a predicate. A guardrail that is a trained classifier cannot: it may reduce the volume of bad proposals, but it changes only the distribution pθ, not the support of what can be committed, so it belongs in 𝖣 or 𝖤 and is never the control.

Trust placement map: evidence components feed deliberation components; agents reach the trusted core only through a four-operation adapter contract; the trusted core holds the compilers, shell, ledger, policy store and key custody; execution engines act only on signed commands; observation is read-only
Figure 1. Where the eleven layers sit. Components are classified by role (D, E, X, O, T), not by brand; agents reach the trusted core only through the four-operation adapter contract.

3.2 Substitution

Every component placed in 𝖣, 𝖤 or 𝖮 must satisfy four obligations.

  • O1 (no write capability). It holds no credential that can modify a system of record or a signing key.
  • O2 (single exit). Its proposals leave only through the propose operation of §3.3, as a bundle M.
  • O3 (declared lineage). It records its provider, model or version identifier and parameters in the lineage Λ of every bundle it contributes to.
  • O4 (contract-derived input). Any fact it reports as authoritative carries a reference into C.S.

Theorem 5 (Provider substitution). Let P be a deployment with an admissible placement π satisfying Assumptions A1 to A3. Let c∈𝒞 with π(c)∈{𝖣,𝖤,𝖮}, and let c′ be any component meeting O1 to O4. Then the deployment P[c↦c′] satisfies Theorem 1 (invariant preservation), Proposition 3 (replay determinism) and Theorem 4 (tamper evidence) of [1].

Proof sketch. Theorem 1 and Proposition 3 quantify over all bundles M and mention no component of 𝖣, 𝖤 or 𝖮 in their premises (Proposition 2 in [1]). Replacing c by c′ changes at most the distribution of bundles presented to fshell, and by O1 and O2 every bundle still reaches fshell through the one exit. By O3 and O4 each bundle is well formed with respect to Definitions 2 to 4, so the pipeline stages V1 to V3 evaluate it exactly as before. Theorem 4 concerns the ledger ℒ, which is in 𝖳 and unchanged. For 𝖮 components, R5 means c′ cannot affect any input to fshell. □

Two components deserve a separate remark. An 𝖷 component is conditionally replaceable: Theorem 1 relies on Dt being read inside the same serialisable transaction as the commit (§4.4 of [1]), so a replacement execution engine must preserve atomicity and idempotency (R4) and the replacement has to be re-verified for those two properties. A 𝖳 component is not replaceable by this theorem at all. Replacing the shell, the compilers, the ledger or the key custody is a change to the control itself, and falls under the policy change controls of §7.1 of [1] (threat T7).

What substitution does not preserve. Theorem 5 is a statement about safety, not utility. A different model may propose worse plans, a different retrieval stack may fetch less relevant procedures, a different automation engine may be slower. These effects show up as two measurable quantities. Let

ε=Pr[fshell(M,Π)=𝖤𝗌𝖼𝖺𝗅𝖺𝗍𝖾],γ=Pr[¬grounded(M,C)],

the escalation rate and the groundedness failure rate over a fixed set of events. A swap that raises ε or γ is safe and unhelpful: more work reaches humans. That is why §7 asks for a shadow run and for re-qualification of autonomy tiers on observed ε and γ, not for re-verification of the shell.

Animated sequence: a deployment runs with provider A in the deliberation and evidence layers, is swapped to provider B, and a provider that reaches for write access finds no write path
Figure 2. Substitution, animated: the D and E layers change, the trusted core does not, and a provider that reaches for write access finds none. Provider names are deliberately omitted.

3.3 The adapter contract

For a provider to be usable in a CAE deployment it needs only to call four operations. Any framework with tool or function calling, any MCP client and any plain HTTP client can do so.

Table 2. The four-operation adapter contract.

Operation Caller Effect Notes
get_contract(event) agents, read-only returns the signed Context Contract C for the event the only authoritative source of state an agent is given
propose(M) agents submits a bundle; returns a receipt with ι and a status of pending, committed or escalated, with a reason set the only write-shaped operation visible to 𝖣; its reach is bounded by Theorem 1
get_status(iota) agents, observers returns the status and reason set for a prior proposal read-only
get_proof(iota) auditors, observers returns the ledger inclusion proof and the hashes needed to replay the decision read-only

A provider integration is then “write an adapter for these four operations in the provider’s idiom”. The shell’s real write credentials, its connections to systems of record and its engine-specific policy code stay on the trusted side and never appear in the adapter.


4. Mapping the Eleven Layers

Each subsection gives the placement, the obligations beyond O1 to O4, the most common misplacement, and neutral criteria for comparing providers within the layer. Table 3 summarises.

Table 3. Placement summary.

Layer Class Principal obligation Most common misplacement
LLM providers 𝖣 record provider and version in lineage policy written into the prompt
Agent frameworks 𝖣 wire tools so propose is the only write in-process approval step treated as the control
RAG 𝖤 no predicate may depend on a retrieved passage retrieved text used as a fact
Embeddings 𝖤 pin and record the model; never mix spaces embedding similarity treated as context
MCP transport no write tool is exposed to an agent except propose a write-capable server handed to an agent
AI security split deterministic checks may sit in 𝖳; learned checks may not classifier verdict treated as authorisation
Observability 𝖮 read-only; never the audit record traces used as evidence
Memory 𝖤 never written into C.S except through 𝒦 memory treated as context
Agent SDKs and platforms 𝖣 unbundle the platform into roles platform identity holds record credentials
Automation 𝖷 act only on signed commands, once per ι a reachable webhook is a write path
Vector databases 𝖤 index is derived data, with a version and as-of time the index co-located with, or confused with, the record

4.1 LLM providers

Placement. 𝖣. A model is the clearest example of a component whose output the architecture is built not to trust.

Obligations. Record the provider, model identifier or version, and sampling parameters in Λ (O3). Return structured output against the bundle’s JSON Schema so that V1 is a mechanical check. Hold no credentials (O1).

Misplacement. Putting a rule in a prompt (“never exceed budget”) and counting it as a control. A prompt changes pθ, not its support, as the formal paper argues in §1.1 of [1]. The same applies to provider-side safety features: they are useful filters, and they are not authority.

Compare on. Structured-output reliability, tool-use accuracy, context length, latency, cost, data-retention and training terms, regional residency, and whether the model can be run in the organisation’s own environment (open-weight models served through, for example, vLLM or Ollama versus hosted endpoints). These bear on ε, cost and compliance. None bears on Theorem 1.

4.2 Agent frameworks

Placement. 𝖣. Frameworks orchestrate deliberation: planning, handoffs between specialist agents, state between steps.

Obligations. Register propose as the only tool with a write-shaped effect, and register get_contract as the only source of authoritative state. Treat checkpoints as a means of resuming deliberation, not as rollback of anything committed, because a committed change is one the shell has already written.

Misplacement. An approval step inside the framework – a human-in-the-loop node, a confirmation callback – used as the control. It runs in the same process as the agent, shares its credentials and fails with it. An out-of-process shell is a control; an in-process approval hook is a convenience for the user interface. The two can coexist, and CAE’s escalation queue 𝒬 is where human approval belongs.

Compare on. State persistence and resumption, support for structured tool calling, handoff models, how many agents it can coordinate, licence and governance of the project, and release stability. The category consolidates quickly [10], which argues for keeping the adapter of §3.3 thin and framework-agnostic.

4.3 Retrieval-augmented generation

Placement. 𝖤. Retrieval pipelines (libraries, rerankers, parsers, graph builders) turn unstructured material into passages an agent can read.

Obligations. Rule R3 does the work here. A retrieved passage can justify why a procedure applies, and it can supply the narrative in a bundle, but any number a predicate reads – a threshold, a limit, a quantity on hand, a certification status – must come from C.S. Evidence that cites a passage references it by document hash and section so that an auditor can retrieve the same text.

Misplacement. A passage treated as a fact. An agent reads a technician’s note (“we’ve got a spare bearing somewhere”), asserts it as inventory, and the shell – if it checks only agent-supplied values – commits a reservation against stock that does not exist. This is the failure demonstrated in §6.4 of [1] as case C12, in textual form. Ingestion components that parse arbitrary documents also widen the attack surface for indirect prompt injection [3], so the retrieval pipeline is part of the threat model even though it cannot authorise anything.

Compare on. Parsing quality for the organisation’s document types, access-control support at retrieval time, support for graph and hybrid retrieval, evaluation tooling, and whether retrieved sources are returned with stable identifiers.

4.4 Embeddings

Placement. 𝖤, inside the retrieval pipeline.

Obligations. Pin the embedding model and version, record it in lineage, and never mix vectors from different models in one index. Treat the embedding call as a data transfer: the text sent to a hosted embedding endpoint leaves the organisation’s boundary.

Misplacement. Treating similarity in an embedding space as context. §3.1 of [1] distinguishes point embeddings, whose semantics are invariant under permutation, from the ordered, precondition-bearing structure an operational contract needs. An embedding model can help find the relevant procedure; it cannot say that the safety inspection must be established before the over-pressure dispatch is evaluated.

Compare on. Retrieval quality on the organisation’s own corpus, dimensionality and storage cost, multilingual coverage, residency of the hosted endpoint, and versioning policy – specifically whether a provider can change model behaviour under a fixed name.

4.5 Tool protocols (MCP)

Placement. Transport. MCP carries calls between a client and servers that expose tools, resources and prompts. It is not itself a component of authority, but every server is a capability grant to whoever can reach it, so it is where Assumption A1 is most easily broken in practice.

Obligations. Expose get_contract and get_status as read-only tools. Expose propose as the single write-shaped tool. Do not expose a server with write access to a system of record to an agent; the shell uses its own credentials through its adapters, over a channel agents cannot reach. The MCP specification says clients must treat tool annotations as untrusted unless they come from trusted servers [7], which means a server’s own claim that a tool is read-only is not evidence that it is. Check what a server can do, not what it says.

Misplacement. Handing an agent the off-the-shelf database server, file-system server or messaging server because it is convenient. A server that can write to the record is a bearer credential in the agent’s hands, which is threat T5 in [1] with a friendlier name. Registries help discovery; they do not make a server safe to hold.

Governance and churn. The protocol was contributed to the Agentic AI Foundation, a directed fund under the Linux Foundation co-founded by Anthropic, Block and OpenAI, on 9 December 2025 [8]. That is relevant to vendor neutrality, since stewardship is no longer a single company’s, and it does not change anything in this paper’s analysis: a transport is a transport.

Compare on. Authentication and authorisation support, server provenance and signing, audit logging at the server, maturity of the SDK in the organisation’s languages, and whether the server can be deployed inside the organisation’s network.

4.6 AI security

Placement. Split by technique, using R1. Components that are deterministic – schema validation, allow-lists, pattern-based detectors, rate limits – may be predicates in V1 or V4 and, if versioned and tested, belong to 𝖳. Components that are learned – injection classifiers, content classifiers, model-judged policies – belong to 𝖣 or 𝖤: they filter proposals and inputs, and they are never the control.

Obligations. For each product, identify the component that is actually on the decision path and classify that, not the product. Many guardrail products combine rules, trained classifiers and calls to a model; the same product can contribute a deterministic predicate in one deployment and a probabilistic filter in another.

Misplacement. A classifier’s “safe” verdict used as authorisation. Prompt-injection research shows that model-mediated controls are themselves attack surfaces [3]. A guardrail that is bypassed on one prompt in a thousand cannot be the only thing standing between an agent and a ledger.

Compare on. Which of its checks are deterministic, false-positive and false-negative behaviour on the organisation’s own traffic, where it runs (inline, sidecar, hosted), what leaves the boundary, and whether its verdict can be recorded in the bundle as lineage.

4.7 Observability and evaluation

Placement. 𝖮.

Obligations. Read-only access (R5). Correlate each trace with the bundle identifier ι and the run in Λ so that an investigator can move from a trace to a decision. Use a neutral schema where one exists: the OpenTelemetry generative AI conventions provide span and attribute names for model calls and agent steps, and have moved to a dedicated repository [9], so their stability should be checked at the time of adoption rather than assumed here.

Misplacement. Traces used as evidence. Tracing platforms record what an agent did, in a store that is operational, mutable and often hosted by a third party. The audit record is the hash-chained ledger ℒ with external anchoring (§7.2 of [1]), which records what the shell decided. A token trace shows that an agent produced a plan; it does not show that anything authorised it.

Where evaluation tools help. Evaluation and red-team tooling can generate adversarial proposals against the shell (§6), and retrieval-quality metrics help explain movements in ε. They improve the system’s usefulness and test its defences. They do not alter its guarantees.

Compare on. Support for the neutral schema, redaction of sensitive fields before data leaves the boundary, retention controls, cost at the organisation’s trace volume, and export formats.

4.8 Memory

Placement. 𝖤, with a warning. Memory stores are agent-writable, so what they hold can be placed there by an attacker who controlled an agent or a document earlier. It is poisoning (T1 in [1]) made persistent.

Obligations. Memory contents never enter C.S directly. They reach the contract only through the compiler 𝒦, from a system of record or from a reviewed assertion with provenance. In a bundle, a memory item is referenced as unverified supporting context (R3). Every item carries a time-to-live, because memory has no freshness bound like τ, and a deletion path, because retention and erasure obligations apply to it.

Misplacement. Memory treated as context: an agent “remembers” an approval limit or a supplier’s status from an earlier conversation and acts on it. Whether the backing store is a purpose-built memory service, a relational database, a graph database or a cache is immaterial. What matters is who can write to it and whether the shell ever reads from it. It should not.

Compare on. Write-access control, provenance recording, expiry and deletion semantics, whether memory can be scoped per user or per task, and the store’s consistency model.

4.9 Agent SDKs and managed platforms

Placement. 𝖣, with unbundling. Software development kits for agents sit with the frameworks of §4.2. Managed platforms are different in kind: one product may supply the model endpoint, a tool runtime, a memory store, guardrails and the identity under which tools run.

Obligations. Split the platform into roles and place each role separately. The model endpoint is 𝖣; its tool runtime is 𝖣 and must expose only propose and get_contract; its memory is 𝖤; its guardrails are classified by R1; the identity under which it runs must hold no credential to a system of record.

Misplacement. A tool or action definition that calls a write API, executed under a platform identity with record credentials. That is A1 broken inside a product. It happens easily when a platform’s quick-start for “agents that act” wires a business API straight to an agent.

Compare on. Whether each bundled role can be disabled or replaced, identity and role boundaries, data residency, audit export, and how portable the agent definition is across platforms.

4.10 Automation and workflow

Placement. 𝖷. This layer is where V5 happens: the atomic execution of Δ under idempotency key ι, followed by the ledger append.

Obligations (R4). Accept commands only from the shell, over mutually authenticated channels. Execute once per ι. Be atomic, or compensate, and record which. Report the outcome so it enters the ledger. Durable-execution engines and workflow orchestrators suit this role when their activities are idempotent. Batch schedulers also have a place in the trusted core’s own pipeline, for example to run contract compilation or the process-discovery jobs of Agentic Flow Mining, as they sit outside the agent path.

Misplacement. A webhook reachable by an agent. Low-code automation tools commonly expose a trigger URL that starts a workflow with the tool’s own stored credentials; whoever holds the URL holds the capability. Handing it to an agent as a “tool” is a write path that bypasses the shell (T5). The shell should be the only caller, and the trigger should require its signature.

Compare on. Idempotency support, execution history and replay, retry semantics, secrets handling, support for mutual authentication, and how the engine behaves on partial failure.

4.11 Vector databases

Placement. 𝖤. A vector database stores derived data – embeddings of documents – used for retrieval.

Obligations. Treat the index as a cache of source material, not a record. Record the index version and the as-of time of its contents in the evidence a bundle cites, since the freshness bound τ applies to the contract and not to the index. Enforce access control at query time, so that retrieval respects who may see what, and propagate deletions from source to index.

Misplacement. Confusing the index with the record, or co-locating them. Several products in this layer are general-purpose databases with a vector capability. Running the index inside the same database instance as a system of record is acceptable only if the retrieval path uses a separate, read-only role with no access to the record’s tables; otherwise the retrieval credentials are record credentials.

Compare on. Metadata filtering and access-control support, consistency and update latency, hybrid search, deployment options and residency, and operational cost at the organisation’s scale.


5. Anti-Patterns

The misplacements above recur across providers. Table 4 collects them with the rule each breaks, so that a design review can check a deployment against a short list.

Table 4. Anti-patterns that break provider independence.

Anti-pattern Rule broken Why it matters
A provider’s safety or guardrail verdict is the authorisation R1 a learned filter changes pθ, not the support of what can be committed
An agent holds a write-capable MCP server or API credential R2, O1 complete mediation [2] fails; this is T5 in [1]
The framework’s approval step is the control R1, R2 it runs in the agent’s process and fails with the agent
A retrieved passage supplies a number a predicate reads R3 the shell would trust text an adversary could have planted
Memory is copied into the contract R3 persistent poisoning gains the contract’s signature
The vector index is co-located with the record under shared credentials R2 the retrieval path becomes a write path
An agent can reach an automation webhook R2, R4 a bearer capability bypasses the shell
Traces are kept as the audit record R5, §7.2 of [1] a mutable, operational store cannot give tamper evidence

6. A Portable Conformance Suite and Reference Shell

A mapping is only useful if it can be tested. The formal paper’s conformance experiment [1, §6.4] ran 14 cases against a reference policy in Open Policy Agent and exposed four defects. We turn that experiment into a portable suite and run it on a provider-neutral implementation of the corrected definitions.

6.1 Method

The suite is a set of fixtures, each a tuple (M,C,Dt,t) with an expected outcome in {𝖢𝗈𝗆𝗆𝗂𝗍,𝖤𝗌𝖼𝖺𝗅𝖺𝗍𝖾} and an expected reason code. A fixture is plain data and can be ported to any engine, whether Rego [4], Cedar [5, 6], or ordinary code. The reference shell is a Python standard-library implementation of Definitions 1 to 5 of [1], about 240 lines, with no dependency on any model, framework, vector store or policy engine. It uses an HMAC where the paper uses an asymmetric signature, since what is being exercised is the rule that only signed material is accepted. It adds one predicate that the formal paper recommended (§6.4, finding F4): a bill-of-materials check requiring that every part a work order needs is reserved.

The fixtures C0 to C13 are reconstructed from the formal paper’s table: the original policy fixtures were not available for this paper, so this is not a re-run of the Open Policy Agent experiment. Three further fixtures exercise the added defences: X1 (a bundle altered after signing), X2 (an evidence reference to a field that does not exist) and X3 (the same bundle submitted twice).

6.2 Results on the 17 fixtures

Table 5. Reference-shell outcomes.

Case Mutation Outcome Reasons emitted
C0 Baseline plan Commit –
C1 $45k impeller order Escalate phi_doa, phi_inv, psi:cost-above-limit
C2 Contract 20 min old Escalate V2:contract-stale
C3 Contract dated 5 min in future Escalate V2:contract-future-dated
C4 Malformed snapshot hash Escalate V2:contract-hash, V2:contract-signature, V3:binding
C5 Empty agent lineage Escalate V1:schema
C6 Telemetry below threshold Escalate phi_tel
C7 Reserve 2 (breaks buffer) Escalate phi_inv
C8 Speed 70% Escalate phi_op
C9 L<c Escalate phi_doa
C10 Unknown SKU Escalate phi_bom, phi_inv
C11 No reservations Escalate phi_bom
C12 Agent asserts v=99.0 Escalate V3:ungrounded:bearing_peak_rms, phi_tel
C13 $45k and stale Escalate V2:contract-stale, phi_doa, psi:cost-above-limit
X1 Bundle altered after signing Escalate V2:bundle-signature
X2 Evidence reference to a missing field Escalate V3:bad-reference, phi_tel
X3 Same bundle submitted twice (second) Escalate V5:replay

Only the baseline commits. Every other fixture escalates with a non-empty reason set, so there is no implicit third outcome (F1) and no empty reason set (F2). A future-dated contract (C3) is distinguished from a stale one (C2). An agent-asserted reading (C12) is rejected because the value cannot be re-derived from the signed contract (F3), and a work order that needs a part and reserves none (C11) escalates rather than passing vacuously (F4). These are properties of the corrected definitions and the new predicate, as the formal paper predicted; they are not properties of Open Policy Agent or any other engine, which were not run.

6.3 Randomised attack and negative controls

Fixtures show that known cases are handled. They do not show that unknown ones are. We therefore ran a randomised attack in which the agent is an adversary that controls everything in a bundle – costs, losses, reservations, speeds, evidence values and references, lineage and identifiers, including values of the wrong type – and sometimes alters the bundle after signing. Half the cases start from the valid baseline with a few perturbed fields, so that the shell commits often enough for the result to mean something. An oracle, written separately from the shell and reading only the raw ground truth (the contract, the live inventory and the set of earlier commits), checks every committed bundle against each invariant. The run used a fixed seed.

Table 6. Randomised attack on the reference shell (100,000 requested; 98,564 well-formed enough to generate).

Quantity Result
Bundles decided 98,564
Commit 22,447
Escalate 76,117
Outcomes outside 0
Escalations with an empty reason set 0
Committed bundles that broke an invariant, per the oracle 0

A zero-violation result means little unless the test can fail. We therefore ran four negative controls on 19,699 cases each, each a copy of the shell with one defence removed.

Table 7. Negative controls (each should be detected).

Weakened shell Committed bundles that broke an invariant
Trusts agent-reported evidence (the F3 defect) 71
No live safety-stock check 652
No freshness check 257
No replay check 49

The test catches all four, so the clean result in Table 6 is informative.

6.4 What the results do and do not show

They show that one implementation of the corrected definitions behaves as Definition 5 requires on 17 constructed fixtures and under a random adversary, and that the test can detect the defects it is designed to detect. They do not show that Theorem 5 holds in general, only that no counterexample appeared on this implementation; the oracle shares its author and its assumptions with the shell; a symmetric stand-in replaces the signature scheme; and no provider, model, framework or engine was involved, so nothing here measures any of them. The harness has not been published.


7. Selecting and Swapping Providers

7.1 Procedure

For any provider decision in any layer:

  1. Place the component with Definition 6, classifying by what is on the decision path, not by the product’s marketing.
  2. Check the obligations O1 to O4 for 𝖣, 𝖤 and 𝖮; R4 for 𝖷.
  3. Run the conformance suite against the deployment with the component in place. Fixtures that touch the component’s role (for example, a retrieval change should be run against the grounding fixtures) must produce the expected outcomes.
  4. Shadow-run on real events and compare ε, γ, latency and cost against the incumbent, with humans deciding.
  5. Record lineage so every later decision identifies the provider and version that contributed to it.
  6. Re-qualify autonomy only if ε or γ moved. If they did not, tiers granted by the discovery process stand.

7.2 What each kind of change requires

Table 8. What a swap requires.

Change Safety re-verification Utility re-qualification
Swap the model provider or version conformance suite only yes: ε, γ, cost, latency
Swap the agent framework or platform check the adapter and tool wiring (O1, O2) yes
Swap retrieval, embeddings or vector store grounding fixtures; access control at retrieval yes: γ, retrieval quality
Swap the memory store confirm it is not read by the shell or compiled into C.S yes
Swap the observability or evaluation tool confirm read-only (R5) and redaction no
Swap the automation engine re-verify atomicity, idempotency and authentication (R4) yes: latency
Change a guardrail product classify by technique; if deterministic and in 𝖳, treat as a policy change yes
Swap the shell, compilers, ledger or key custody full re-verification of A1 to A3 and change control (T7) yes

7.3 Mixed and sovereign estates

Nothing above requires a single cloud, a single vendor or a hosted service. The trusted core may run on-premises while models run in a public cloud, or the reverse, provided A1 holds across the boundary and signing keys never leave 𝖳. Data residency and sovereignty are constraints on where each component may run, and they apply to 𝖣 and 𝖤 components, which handle the data, far more than to the shell, which handles hashes and decisions.


8. Limitations and Threats to Validity

(i) The mapping is a judgement. Classifying a product that mixes techniques requires reading what is on the decision path in a particular deployment, and two reviewers may differ. (ii) Product facts move. Names, ownership and behaviour are as at the date of writing; vendors may have changed them. No vendor has reviewed this paper, and its statements about product categories are not statements about the behaviour of any named product. (iii) No comparative evidence. We do not benchmark providers, and Theorem 5 makes no claim about quality, cost or latency. (iv) Theorem 5 is conditional. It holds under Assumptions A1 to A3 and rules R1 to R5, and the assumptions are the part an implementation can quietly violate; the anti-patterns of Table 4 are the usual routes. (v) The reference results are narrow. They come from one implementation, constructed fixtures, a randomised adversary designed by the same author as the oracle, and an HMAC stand-in, and the original Open Policy Agent experiment was not repeated. (vi) Governance remains outside the model. A deployment can satisfy every rule here and still be badly run: poor invariants, an over-conservative policy, or an escalation queue nobody reads. (vii) Tailoring. Reference values and placements are starting points, not recommendations for any organisation, and must be set through a tailoring engagement with Contextual Agentic or an authorised advisory partner.


9. Conclusion and Future Work

CAE moves authority to a deterministic commit boundary, and that has a quiet consequence for tool selection: most of the eleven layers do not have to be chosen for safety. A model, a framework, a retrieval stack, a vector store, a memory service, a platform and a tracing tool can each be changed without touching invariant preservation, replay determinism or tamper evidence, provided four interface obligations and five placement rules hold. What has to be chosen with care is small – the shell, the compilers, the ledger, the key custody – and, to a lesser degree, the execution engine. In practice the guarantees are more often lost by misplacing a component than by choosing a weak one: a write-capable tool server handed to an agent, an approval step inside the agent’s process, a reachable webhook, memory copied into the contract.

Future work includes: (1) ports of the fixtures to Rego and Cedar, so that the same suite can be run on the engines the formal paper discusses; (2) adapter implementations for named frameworks and for MCP, with their own conformance results; (3) a measurement study of ε and γ under model, framework and retrieval swaps on a shared event set; (4) a classification guide for guardrail products by the technique actually on the decision path; and (5) mechanised verification that a given deployment’s wiring satisfies R1 to R5.

Frequently asked questions

Does CAE depend on a particular AI vendor?

No. The paper places eleven layers of the AI tool ecosystem on one trust boundary and states a substitution property: replacing a provider inside a layer does not change what the deterministic shell guarantees, provided the replacement meets the layer’s obligations.

What is the adapter contract?

Four operations: get_contract, propose, get_status and get_proof. A provider that implements them can sit behind the shell without being trusted with write credentials.

Can I test whether a provider is swappable?

The paper describes a portable conformance suite and a reference shell for that purpose. Treat it as a starting point; the limitations section lists what it does not cover.

Does the paper endorse any product?

No. Product and company names identify categories only. Choose products by capability, approval status and your own requirements.


Disclosure: The Contextual Agentic Enterprise is a vendor- and platform-agnostic architecture framework from Contextual Agentic. The properties stated here hold under the stated assumptions; any adoption or use of CAE in a production setting should be undertaken in consultation with Contextual Agentic or an authorised advisory partner, who will tailor the placements, obligations and thresholds to the organisation. Product and company names are used to identify categories and remain the property of their owners. The scenario, fixtures and randomised data are constructed for illustration. The companion book, The Contextual Agentic Enterprise (Polymath Signal Press, 2026), develops the architecture further.

References

  1. Contextual Agentic, "The Contextual Agentic Enterprise: A Formally Governed Architecture for Bounded Multi-Agent Systems in Mission-Critical Systems of Record," manuscript draft, 2026 (the companion formal paper; its numbered definitions, assumptions and theorems are cited here as Definition n, Assumption An and Theorem n). https://contextualagenticenterprise.com/articles/cae-formally-governed-architecture/
  2. J. H. Saltzer and M. D. Schroeder, "The protection of information in computer systems," Proc. IEEE, 63(9), 1975.
  3. K. Greshake et al., "Not what you've signed up for: Compromising real-world LLM-integrated applications with indirect prompt injection," ACM AISec, 2023.
  4. Open Policy Agent, "Policy language (Rego)," CNCF project documentation. https://www.openpolicyagent.org/docs/policy-language
  5. J. Cutler et al., "Cedar: A new language for expressive, fast, safe, and analyzable authorization," Proc. ACM Program. Lang. (OOPSLA), 2024.
  6. M. Silvester, "Cedar joins the CNCF Sandbox," InfoQ, 27 January 2026. https://www.infoq.com/news/2026/01/cedar-joins-cncf-sandbox/
  7. Model Context Protocol, "Tools," specification revision 2025-06-18. https://modelcontextprotocol.io/specification/2025-06-18/server/tools
  8. Model Context Protocol, "MCP joins the Agentic AI Foundation," 9 December 2025. https://blog.modelcontextprotocol.io/posts/2025-12-09-mcp-joins-agentic-ai-foundation/
  9. OpenTelemetry, "Generative AI semantic conventions" (notice that the conventions have moved to a dedicated repository). https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-agent-spans
  10. Microsoft, "The future of agentic AI: inside Microsoft Agent Framework 1.0," Microsoft Tech Community blog. https://techcommunity.microsoft.com/blog/azuredevcommunityblog/the-future-of-agentic-ai-inside-microsoft-agent-framework-1-0/4510698
  11. CSO Online, "Check Point acquires Lakera to build a unified AI security stack," 2025. https://www.csoonline.com/article/4058653/check-point-acquires-lakera-to-build-a-unified-ai-security-stack.html
  12. "The Modern AI Ecosystem – Tools," infographic shared on LinkedIn, author and date not stated on the copy supplied (source of the eleven-layer taxonomy and the example product names).

← All articles

Related