Building AI Agents for Regulated Enterprise Workflows
Governance infrastructure, not AI models.

Enterprises stuck in AI pilot purgatory tend to blame the model. Wrong suspect. The agents that fail to reach production in banks, hospitals, and insurers rarely fail because the underlying model is incapable. They fail because nobody built the scaffolding to scope what the agent can touch, verify who it's acting as, and prove after the fact what it did. That scaffolding is governance architecture, and most organizations simply haven't built it yet.
The shift that exposed this gap happened fast. Enterprise AI spent 2024 and early 2025 as a copilot story: a chatbot in the corner of a screen, suggesting a reply, drafting a summary, always waiting for a human to click "accept." Through 2025, that started to change as organizations began moving toward autonomous agent deployment, though most are still running pilots, not full production rollouts. The difference matters because an agent that drafts a suggestion and an agent that calls an internal API, writes to a SaaS system, or pulls from a sensitive data store carry entirely different risk profiles. One waits for permission. The other acts.
That single change rewrites the question every compliance officer and platform engineer now has to answer. It's no longer about whether the organization uses AI, because that ship sailed.
NIST's AI Risk Management Framework, ISO/IEC 42001, and the EU AI Act all tell an enterprise what it needs to govern: risk categories, documentation obligations, human oversight expectations. None of them specifies the runtime architecture that actually enforces any of it. A framework can tell a bank it needs human oversight for a loan-denial agent. But it cannot tell the bank's platform team how to wire that oversight into the actual request path, token by token, API call by API call. That gap between what the frameworks demand and what the infrastructure delivers is what regulated enterprises must now build.
The regulatory floor underneath all this stopped being theoretical a while back, and the deadlines already in force prove it. The EU AI Act became fully applicable from August 2, 2026, and Article 50 transparency obligations have been in force since that date. Fines for prohibited practices can reach 7% of global annual turnover, capped at an absolute ceiling for the most serious violations. The Digital Omnibus pushed the high-risk Annex III obligations out to December 2027, so there's some breathing room there, but the clock on everything else already started. And despite all of that, only a small minority of enterprises report having mature AI governance processes in place. The law arrived before the architecture did.
Requirements for AI agent action in regulated workflows

A regulated workflow asks an agent for four things before it's allowed to act: scoped access, verified identity, traceable action, and alignment with human checkpoints. None of these can be handled by the agent's own reasoning, no matter how good the model is. They have to be enforced by the infrastructure around the agent, not promised by the prompt it was given.
Scoped access means the agent can do only what its role permits, for the specific task and user context in front of it, and nothing more. A broad capability grant, the kind that lets an agent "just in case" reach six systems instead of one, is a liability waiting for an incident report. Access controls and approval gates need to appear as a formal stage in the deployment workflow itself, not something bolted on after the agent is already running in production. Traditional role-based access control (RBAC) is too blunt an instrument for this: it grants a role, not a context. Relationship-based (ReBAC) or attribute-based (ABAC) models do the finer work. An agent holding a "viewer" relationship to a document set can summarize those documents, but it cannot export them to an external API, because the permission model distinguishes between those two actions even though a human with that same role might assume they're equivalent.
Verified identity means every action the agent takes ties back to an authenticated, authorized identity, so that when an auditor pulls the log, the entry means something. Identity and access management, confirming that each AI action is linked to a real, authorized actor, is one of the core architectural controls both the EU AI Act and NIST's RMF expect to see.
Traceable action means signed logs connecting every output to its source material, its model version, and the policy that governed it. Without that chain, accountability collapses into a guess. Immutable audit trails are what regulators and auditors actually inspect, not the vendor's marketing claim about "responsible AI."
Human-checkpoint alignment means that if a workflow touches safety, rights, or financial outcomes, a human has to sign off before the consequential step happens. The EU AI Act's architectural expectations make clear that agents don't get to self-authorize in these categories, period.
Those four requirements produce specific deliverables an auditor can actually hold in their hands: a control catalog listing each safeguard and how it's enforced at runtime, a compliance matrix mapping those controls to EU AI Act, NIST RMF, and ISO/IEC 42001 clauses, and a risk register naming owners, mitigations, and evidence.
The reason this is harder than it sounds comes down to how agentic requests are actually built. A single request might chain an LLM call, a retrieval step pulling from a document store, several tool or API calls, and an orchestration layer stitching it all together. Each one of those hops is a place where a governance gap can hide, if the enforcement point sits anywhere other than upstream of all of them.
The MCP gateway has become the mandatory enforcement point for agent-to-system traffic
Anthropic's Model Context Protocol has become the standard way agents connect to tools and data sources, and that popularity created a new piece of infrastructure almost by necessity: the MCP gateway. It's the only place in the architecture where the access, identity, and audit requirements above can actually be enforced, because it sits between every agent and every system that agent might touch.
What a gateway does is centralize management of MCP servers. So instead of each agent negotiating its own connection to each tool, the gateway becomes a single governed entry point, and it handles authentication, audit logging, and rate control for all agent traffic that passes through it.
Traditional API gateways can't be repurposed for this job, and the reason is structural, not a matter of missing a feature update. API gateways were built for deterministic app-to-app traffic, the kind secured with a static API key that doesn't change and doesn't need to adapt to context. Agent-to-system traffic is nondeterministic. The agent might call a different tool depending on what it just read. The gateway handling that traffic needs dynamic, short-lived tokens, user-delegated OAuth flows, and defenses against a threat category traditional gateways were never built for: tool poisoning, context leakage, and indirect prompt injection. SQL injection filters and DDoS mitigation don't touch any of those.
A handful of platforms have staked out this category, each with a distinct angle on enforcement. Cloudflare's MCP Server Portals use Cloudflare Gateway's data-loss-prevention engine, among other detection methods, to surface unauthorized remote MCP servers running on an enterprise network, catching shadow deployments before they become shadow incidents. IBM's ContextForge takes an open-source, cloud-native approach, with federation built into the core: multiple gateway instances discover each other automatically, merge their tool registries, and operate as one system across regions. ContextForge also bridges protocols, exposing legacy REST and gRPC services as MCP-compliant tools without requiring a rewrite, which matters enormously for regulated industries still running infrastructure from a decade or two ago. Lunar.dev's MCPX is an open-source gateway and control plane, and its Enterprise tier adds identity provider integration with Okta and Azure AD, automated risk scoring for MCP servers, hosted deployment, and a deeper governance control set.
None of these is "the" answer in some ranked sense. The category itself, not any single vendor's feature list, is what makes runtime governance possible. The practical principle is that unauthorized tools get caught at discovery time, before an agent ever reaches them, rather than blocked reactively after the agent has already tried to use them. Regulated environments need the enforcement point upstream of the action, because downstream enforcement just means writing a very detailed incident report.
The agent identity problem that most access control designs overlook
The system has to be able to say, with confidence, who the agent is before a policy can be enforced. That's the problem most access control designs quietly skip past: agent identity. Human identity and access management was built for people who log in with a password and service accounts that run with a fixed set of permissions forever. Neither model fits an agent that sometimes acts on its own, sometimes acts as a delegate for a specific user, spawns sub-agents to handle subtasks, and picks up new permissions dynamically as a workflow unfolds.
Security leaders already sense this. That's not an abstract worry about the future, since it's a confidence gap that exists right now, inside systems already running in production.
Role-based access control reappears here for the same reason it appeared in the workflow requirements earlier: a role is too blunt a unit to describe what an agent should be allowed to do in a given moment, so relationship-based and attribute-based models attach permissions to context instead. An agent with viewer access to a project's documents can summarize them for a user, but exporting that same data to an external API is a different action requiring a different grant, and the permission model has to be precise enough to tell the two apart.
Two platforms built specifically for this problem reached general availability in 2026. Microsoft's Entra Agent ID treats an agent identity as a specialized service principal, and it holds no credentials of its own. A separate component, the blueprint, holds the credentials and acquires tokens on the agent's behalf, which keeps the agent from ever directly possessing a long-lived secret it could leak. Conditional Access for Agents and ID Protection for Agents began rolling out worldwide in July 2026, delivered through Microsoft Agent 365 and Microsoft 365 E7 licensing. Anthropic's Workload Identity Federation, generally available in June 2026, solves a related but distinct problem: replacing long-lived static API keys with short-lived, scoped credentials, so a leaked token expires before it becomes useful to whoever stole it.
This leaves the hard problems of agent identity unresolved. Agents switch between acting autonomously and acting as a delegate for a human user, and most current systems cannot reliably tell which mode was active for a given action after the fact. Recursive delegation, where an agent spawns a sub-agent that spawns another sub-agent, creates permission chains with no principled limit on how deep or how broad they can get. And in the absence of a shared standard across vendors, proprietary identity systems are multiplying, recreating the exact sprawl problem shadow IT caused for SaaS a decade ago, just one layer deeper in the stack.
The practical takeaway for a regulated enterprise is that agent identity has to be designed into the architecture before the first agent goes live, not patched in after an incident makes the absence obvious. The platforms above make a credible version of this possible today. The unresolved problems mean governance teams need to keep watching how the standard evolves, rather than treating today's platform choice as a permanent decision.
The live threat surface: prompt injection and shadow AI as the two vectors most likely to cause a regulated-environment breach
All the architecture above exists to defend against something specific, and two vectors account for most of the realistic danger: indirect prompt injection and shadow AI. The first has already moved from research paper to incident report. The second is the condition that makes the first one worse.
Indirect prompt injection works by hiding instructions inside content the agent is going to read anyway, a code comment, a web page, a support ticket, rather than typing the attack directly into a chat box. Security researchers testing the Devin coding agent found it had no defense against this. An attacker could bury instructions inside what looked like a routine coding task and get the agent to expose server ports to the open internet, leak access tokens to an external endpoint, and install command-and-control malware, all while the task appeared, from the outside, entirely ordinary. Palo Alto Networks' Unit 42 documented twelve separate cases of indirect prompt injection against AI agents in production, and one included the first observed real-world payload built specifically to slip past an AI-based ad-review system. That last detail matters because it shows the attack isn't hypothetical or confined to a lab. Someone built a payload, aimed it at a live content filter, and it worked well enough to get documented.
Shadow AI is the condition that makes both of these worse before they even happen. Every unsanctioned agent connection, every MCP server someone on a product team spun up without telling security, every browser extension that quietly grants an AI tool access to a corporate account, expands the attack surface an organization doesn't know it has. A prompt injection attack against a governed, logged, scoped agent is a bad day. The gateway and identity architecture described above exists to make sure the second scenario doesn't happen, because it makes every agent connection visible, scoped, and logged before it ever becomes an opportunity for someone else to use.


