Home · Insights · Engineering
EngineeringJuly 2026·8 min read

Agentic AI in Regulated Industries: Designing for Audit

An engineering guide to building AI agents that a regulated enterprise can audit and explain. It covers three patterns (bounded ReAct, planner-executor, multi-agent orchestration with hand-off contracts), three failure patterns to design against and four runtime controls. Written from MindMap's delivery work, it reports no deployment statistics.

ME
MindMap Engineering
MindMap Digital

The first question a risk or compliance function asks about an AI agent is whether it can see what the agent did, and why. The answer can be yes, but only if the agent runtime was designed for audit from the start. Adding an audit trail to an agent that already works is much harder than building one that records its own reasoning as it goes. This guide describes three agent patterns that can be made auditable, three failure patterns that leave nothing to show a supervisor, and four engineering controls that separate a prototype from a system a regulated enterprise can run. It is a practitioner's guide written from MindMap Digital's delivery work. It is not a study, and it reports no survey and no deployment statistics.

What "agentic AI" means here

We use "agentic" for any LLM-driven system that takes several sequential steps to complete a task, where the model chooses among tools or actions at each step based on the outcome of the previous one. That excludes plain retrieval-augmented generation (one retrieval, one generation), fixed prompt pipelines where no model decides between steps, and workflows where the model only drafts text for a person. It includes ReAct loops, planner-executor designs and multi-agent orchestration. Whether such a system is high-risk under the EU AI Act depends on what it is used for, not on how it is built. The high-risk use cases are listed in Annex III and include creditworthiness assessment, employment decisions and access to essential services. A system used for those purposes falls under the high-risk obligations, including logging under Article 12 and human oversight under Article 14, unless one of the Act's narrow exemptions applies. /blog/human-oversight-agentic-ai covers the oversight design.

Pattern 1: ReAct with bounded reasoning steps

ReAct alternates a reasoning step (a thought), an action (a tool call) and an observation of the result, and repeats until the task is done. It is the foundational agent loop. A production version differs from the textbook one in four ways. Reasoning steps are bounded, with a hard limit (we typically set it between 8 and 12) after which the run stops and goes to a person. Tools are defined with JSON Schema and their outputs are validated, not described in free text. Every thought and action is written to a tamper-evident log. And budgets are enforced on tokens, latency, tool calls and money, with any run that exceeds one stopped and escalated. With those in place, a reviewer can replay a run end to end and see each step with its inputs and outputs. The tooling exists and can be self-hosted: Langfuse and OpenTelemetry traces, plus an event store for regulated artefacts. The harder part is deciding which events to capture and at what granularity. /blog/react-pattern-production goes into the details.

Pattern 2: planner-executor with a persisted plan

For tasks where the plan itself matters, such as a prior-authorisation review, a complex claim or a clinical-pathway recommendation, a planner-executor design is a better fit. A planning step produces an explicit plan as structured data, an execution step carries it out with tool calls, and a verification step checks that the outputs match what the plan set out to do. The control that matters is plan persistence: each plan is hashed, stored and referenced in the audit trail, so a reviewer can see both what the agent intended and what it did. That is useful wherever the justification matters as much as the outcome, and wherever an organisation may later have to answer questions about how a decision was reached. The pattern uses more tokens than a single ReAct loop, because the model plans, executes and verifies. What it buys is a cleaner record.

Pattern 3: multi-agent orchestration with hand-off contracts

The most involved pattern uses several specialised agents coordinated by an orchestrator. It works when the hand-offs between agents are explicit, typed and verified, and it fails when they are not. In practice that means an orchestration framework such as LangGraph, with each agent's input and output defined as a typed schema (Pydantic models, for example) and a hand-off contract that states what the next agent may and may not assume about the data it receives. Take a prior-authorisation review as an illustration. An intake agent extracts the clinical scenario from the submission. A policy agent retrieves the applicable medical-necessity criteria. A reasoning agent compares the evidence with the criteria. A verification agent checks that reasoning against the source documents. The orchestrator then routes the case to approval, to a structured draft for a clinician, or to full human review. Each hand-off is logged with its schema-validated payload, so the audit replay shows the chain of intermediate decisions and not only the final one. Expect to engineer the hand-off contracts deliberately. A multi-agent system does not produce a clean audit trail by default.

Three failure patterns: silent loops, hidden tool calls, unbounded reasoning

Three failure patterns are worth designing against, because none of them leaves an answer to the question a supervisor will ask. The first is the silent loop. The agent gets stuck calling the same tool with slightly different inputs and eventually produces an output that looks plausible but was reached by trial and error. Asked why the agent chose its approach, nobody can answer, because there was no decision, only a loop. The fix is a hard step limit and detection of repeated thoughts. The second is the hidden tool call. The agent uses a tool the developer did not intend to make available, or a variant with a slightly different signature from the documented one. It happens when the tool registry is loosely specified or broader than the use case needs. The fix is a strict tool registry for each use case, with the registry's hash recorded in every run. The third is unbounded reasoning. The agent writes long reasoning traces that look thorough but contain steps never checked against the data, which happen to agree with the final decision. The fix is structured reasoning steps that must cite the facts they rely on, and a verification pass that re-runs the reasoning against the source data.

The four engineering controls

Four controls separate an agent runtime that can go into regulated production from one that cannot. The first is an explicit tool registry with hashed versioning. Every run records the hash of the registry it ran against, so the exact configuration of any historical run can be reproduced. The second is reasoning-trace persistence in content-addressed storage. Every thought and action is written to a tamper-evident store, and an audit replay retrieves it by hash. The third is budget enforcement with structured escalation. Token, latency, tool-call and monetary budgets are enforced at the orchestrator, and a run that exceeds one stops and goes to a human-review queue; it does not fail silently or retry without limit. The fourth is a separate verification step, by another agent or by a person, that checks the result against the source data before it is committed. That step is what catches the unbounded-reasoning failure described above, and it is the control we would add first.

Where agents are used, by sector

In banking and insurance, common candidates are KYC orchestration, AML alert triage, dispute intake, trade-finance document review, and claims or prior-authorisation triage. Model-risk expectations are well established in this sector, and the engineering difficulty tends to be integration with legacy core systems. In healthcare, candidates include clinical-coding assistance, prior authorisation, ambient documentation and clinical-pathway support. The difficulty is bringing clinical experts into the validation loop and keeping them there. In the public sector, candidates include intake triage for citizen services, drafting responses to information requests and search over internal knowledge. The difficulties are multilingual coverage and the duty to explain decisions on request. In pharma and life sciences, candidates include document workflows and portfolio orchestration, where electronic-record requirements such as 21 CFR Part 11 shape what has to be logged. /use-cases lists workflows MindMap has delivered, with case studies.

Evaluating an agent

Evaluating an agent is different from evaluating retrieval-augmented generation. RAG evaluation measures retrieval and answer quality on a set of questions. Agent evaluation measures whether a multi-step task was completed, how it was completed and whether the agent stayed within its limits. A three-tier harness covers this. The first tier is deterministic: a fixed set of task scenarios with known correct outcomes, run on every change to the runtime, reporting task success, step count and token cost. The second tier scores the trajectory: on a smaller set of scenarios, a stronger model or a reviewer judges the path against a rubric. Did the agent take an efficient route, call a tool it did not need, or skip a required check? The third tier is safety: adversarial scenarios such as prompt injection and tool-call manipulation, run before release and on a sample of production traffic. Build the first tier before the agent goes anywhere near production, and add the others as the use case and its risk grow. /blog/prompt-injection-defence covers the threat model for the third tier.

Cost: compare with the manual process, not with a single call

An agent consumes more tokens than a single model call, because it reasons, calls tools and often verifies its own work. That comparison is rarely the useful one. An agent is deployed to complete tasks that a single call cannot, so the comparison that matters is with the manual process it supports: reviewer time per case, cycle time and rework. Measure those before the build starts, so the business case rests on your own baseline. On a sovereign deployment the marginal token cost is also bounded by hardware you already run, which makes a per-run budget for tokens, tool calls and latency a control you enforce and not a bill you discover. MindMap's case study on prior authorisation at a US health insurer shows how the result was measured in one deployment: /stories/us-health-insurer-prior-auth.

Where this is heading

Three directions seem likely to us. The first is closer integration with operational systems, with agents invoked from inside the core banking, health-record or case-management system instead of running alongside it. The second is smaller models tuned for tool use and structured output taking over more agent work from large general-purpose models. The third is more complex multi-agent designs, which will make hand-off contracts a standard discipline. An organisation that builds the runtime controls now (tool registry, trace storage, budgets and verification) can adopt those designs later without rebuilding its audit trail.

MindMap Engineering
About the author

MindMap Engineering

MindMap Digital Engineering Practice

MindMap Engineering is the collective practice behind 117 production-deployed AI accelerators across BFSI, healthcare, government, retail and telecom. The pieces published here are written by the engineering leads who shipped the systems they describe — sovereign LLM platforms, RAG pipelines, agentic workflows, IDP systems — at customer sites across four continents. We don't write about architectures we haven't deployed.

Credentials + recognition
  • ✓117 production-deployed AI accelerators
  • ✓50+ enterprise customers across BFSI, healthcare, government
  • ✓Deployments live across India, UK, EU, Gulf, North America, Africa
  • ✓Sovereign deployment as the default architectural pattern
  • ✓Langfuse + RAGAS + vLLM + Qdrant production experience
Areas of repeated lived expertise
Open-weights LLM serving (Llama, Qwen, Mistral, DeepSeek)Production RAG architectureAgentic AI runtime engineeringDocument intelligence (IDP) at 94%+ STPOn-premise + air-gapped deployments
Free download · 12-minute read

The Sovereign AI Playbook.

Enterprise generative AI that runs on your servers.

  • 01Definition. The four non-negotiable properties of a sovereign deployment — and the three patterns that look sovereign but aren't.
  • 02Why now. Three forces that converged in 2026: regulator pressure, the open-weights capability gap closing, and unit economics flipping.
  • 03Reference architecture. The five-layer stack we deploy: applications → agent runtime → sovereign LLM → RAG + KB → data stores. With model and tooling choices for each.
  • 04The regulators. SAMA · RBI · UK ICO · EU AI Act · DPDP · HIPAA — what each requires and how it maps to architecture.
Get the playbook
Free PDF, in your inbox in 30 seconds.
We'll send the PDF, and may follow up once or twice with related material. One click unsubscribes.

Ready to apply these ideas?

Talk to our engineering team. No sales pitch — just a technical conversation.

Start a conversation →