[ARCHITECTURE & CONCEPTS]
[
1/2/26
]
The Missing Layer in Every AI Agent Stack
[Author]:
Amjad Fatmi
Something changed quietly over the last eighteen months. AI went from answering questions to taking actions. The industry noticed, and then mostly looked the other way.
The tooling around AI agents has exploded. Orchestration frameworks, observability dashboards, prompt guardrails, model routers, token cost trackers. Dozens of products in each category. Billions of dollars invested. Thousands of engineers working on the problem.
And yet. If you deploy an AI agent into production today, one that can send emails, call APIs, move money, modify databases, delete records, there is no mandatory layer that asks before anything executes: should this specific action actually run?
Not "is this a reasonable thing for an agent to do?" Not "does this pattern look suspicious?" Not "did the model generate this correctly?" Those questions get asked in various places with varying reliability. But the harder question, the one that matters when something goes wrong, goes unasked.
The stack has a missing layer. Nobody named it yet. This is an attempt to do that.
What agents actually do
There are two fundamentally different things happening when an AI agent runs.
The first is reasoning. The model reads context, considers options, and produces a decision about what to do. The second is execution. Something in the world actually changes.
These are not the same thing. Reasoning happens inside a model, inside a context window. It produces information. Execution happens outside, in your database, your email server, your payment processor, your cloud environment. It produces consequences.
The distinction sounds obvious when stated plainly. But the architecture of almost every AI agent system today collapses these two things into a single computational step. The model produces a tool call. The framework executes it. Done.
No pause. No gate. No question asked.
Here is what that looks like in practice:
The model decided to send a refund. The framework deserializes the tool call and routes it to the right function. No policy is checked. No authorization is verified. $1,200 leaves the account. This is the first moment any consequence occurs, and it happens without a gate.
This is not a contrived example. This is the default pattern in LangChain, CrewAI, AutoGen, and every major agentic framework. The model proposes. The framework dispatches. The action runs.
When it works, nobody notices. When it doesn't, when the model misread the context, when the prompt got injected, when a multi-step task went sideways in step three, you find out after the fact, in the logs, after the consequence has already occurred.
What the existing tools actually do
If you push back on this framing, the natural response is: we have guardrails. We have observability. We have IAM policies and API gateway rules and model-level safety filters.
These tools are real and they do real work. But they are not doing what most teams think they are doing.
Here is where each layer actually sits relative to the execution moment:
Guardrails sit before execution. They evaluate prompts and model outputs and try to catch harmful patterns before a tool call gets generated. This is valuable. It is also probabilistic by design. They use classifiers and heuristics and sometimes LLMs evaluating LLMs. When they fail, and adversarial inputs are specifically designed to make them fail, nothing stops what follows.
Observability tools are explicitly post-execution. They record what happened. Traces, token costs, latency, error rates. Forensic tools operating on a completed past. An observability platform cannot tell you whether an action should have run. It can only tell you that it did.
IAM and RBAC govern identity. They answer: is this service account permitted to call this API endpoint? That question is answered at authentication time, not execution time. The agent's service account has permission to issue refunds. That's a class-level policy set by an administrator. It says nothing about whether this specific refund, for this specific amount, under these specific circumstances, should actually execute.
None of these tools are broken. They do what they were designed to do. The problem is that they were designed for a world where humans were in the loop at the execution boundary. That world no longer describes how most AI agents run.
The speed problem
Human authorization is built into almost every production system, but it's built for human timescales. An expense approval workflow assumes a manager will review before payment clears. A database schema change requires a ticket, a review, a deployment window. A wire transfer above a certain threshold requires a second signatory.
These controls work because humans take time. You have minutes or hours or days between the decision and the consequence. That window is where governance lives.
Agents collapse that window to zero.
An agent processing a customer support queue can handle five hundred cases before a human reviewer looks at the first one. An agent managing cloud infrastructure can provision, modify, and terminate resources faster than any approval workflow was designed to accommodate.
The governance mechanisms built for human-time decision-making do not transfer to machine-time execution. The gap between reasoning and execution, a gap that used to contain a human, is now empty.
What happens when this goes wrong
Consider what a failure looks like at scale.
An agent is deployed to handle customer refund requests. It has access to a payment processor. Its service account is authorized, correctly, to issue refunds. A prompt injection attack, buried in a customer message, convinces the agent it has been instructed by an internal administrator to process a batch refund for a class of orders. The agent issues it. Thousands of refunds go out before anyone notices.
At no point did anything fail in the traditional sense. The guardrails didn't catch it because the injection was subtle. The IAM policy allowed it because the service account was legitimately authorized. The observability platform recorded it perfectly. The orchestration framework routed it correctly.
The only thing missing was a gate at the execution boundary that asked: given what we know right now, should this specific action run?
This is not a hypothetical. Variations of this attack have been demonstrated against production agent systems. The attack surface is not the model. It is the absent layer between the model's proposal and the system's execution.
Naming the gap
Every mature infrastructure layer has a name. The name is not incidental. It's what makes it possible to reason about, specify, implement, and audit the layer consistently across different systems.
TLS gave us a name for secure transport. OAuth gave us a name for delegated authorization. Kubernetes admission controllers gave us a name for resource gatekeeping. Each of these names preceded widespread adoption. The name made the category legible. Legibility made standardization possible. Standardization made safety possible.
The layer between agent reasoning and agent execution does not have a name yet. It does not have a specification. It does not have a standard implementation. In most production deployments, it does not exist at all.
What belongs in that layer:
This layer is not optional in the way that observability is optional or prompt caching is optional. If you are running AI agents that take real actions in real systems, the question of whether any given action should execute is not a question that goes away because you chose not to answer it. It becomes a question that gets answered by default, by the framework, silently, in the affirmative.
Why it doesn't exist yet
The honest answer is timing. A year ago, AI agents were mostly demos. They queried APIs and summarized results and suggested next steps. The consequences of their actions were minimal. Information produced, not effects created. The gap was real but inconsequential.
That changed fast. Enterprise deployments of agents that touch production systems, code repositories, customer data, financial workflows, cloud infrastructure, are no longer edge cases. They are the use case. The agents are real. The consequences are real. And building this layer correctly is harder than it looks.
Agents do not produce actions in a single stable format. A LangChain agent and a CrewAI agent and a raw API call can produce semantically identical actions in completely different forms. Any enforcement layer that cannot normalize across these formats is not actually an enforcement layer. It is a partial filter with gaps an attacker can drive through. Faramesh addresses this through the Canonical Action Representation, a normalized form that allows the same policy engine to evaluate actions regardless of which framework, protocol, or runtime produced them.
The third reason is that nobody wanted to say the emperor had no clothes. The agent ecosystem is fast-moving and enthusiasm-driven, and companies building guardrails and observability platforms have strong incentives to imply their tools cover the problem. The framing "we have guardrails and observability" sounds like a complete answer if nobody has clearly articulated what question it doesn't answer. This post is that articulation.
The gap exists whether you name it or not
Infrastructure gaps do not close because people stop thinking about them. They close when someone builds the layer and demonstrates that it changes what safety actually means.
The consequences of this particular gap are becoming unavoidable. Agents are in production. Prompt injection is a documented attack class. Bulk unintended actions have happened at real companies. Regulators in financial services and healthcare are beginning to ask questions about automated decision-making that current architectures cannot answer.
The layer between reasoning and execution is not an implementation detail. It is the difference between an agent that operates under a governance regime and one that operates without one. Faramesh provides that layer, intercepting every effectful action before it executes, evaluating it against versioned policy, recording the authorization decision in a tamper-evident cryptographic chain, and denying by default when no policy matches.
For most deployments today, this layer is still absent. Not because anyone decided it should be. Because teams have not yet adopted infrastructure that provides it. The ecosystem is mature enough to need it. The question now is whether your team builds it from scratch, or uses infrastructure that already exists, has been formally specified, and has been proven to work across the heterogeneous reality of production agent deployments.
