BLOG POST

AI Agent Governance: Audit Trails and Human-in-the-Loop

AI agent governance is what makes autonomous software safe to run in regulated firms. Audit trails, permissions, and human approval loops do the work.
August 20269 min read
Evan
- ai agent governance- governed ai agents- human-in-the-loop ai agents- ai agent audit trail- ai governance- ai governance framework- model governance- ai risk management- ai agent security

Agents act, so governance means mapping controls to obligations

AI agents differ from every software category before them because they act. A traditional system responds inside a fixed boundary. An agent plans, calls tools, reads data, writes data, and makes decisions no developer enumerated in advance. In a regulated enterprise, where one bad action can mean a breached customer record or a misrouted payment, ai agent governance is the control layer that decides whether an agent is a controlled employee or an uncontrolled liability.

Most writing on agent governance restates the controls. This article does the piece the surrounding coverage skips: it maps each control to the obligation that requires it, and shows the artifact an examiner requests. Regulators ask about both the model and the record. For agentic systems the gap is almost always the record, the action trail, not the model's validation pack. An audit trail is not just best practice; it is what DORA, the EU AI Act, SR 11-7, and your SOC 2 report each demand in slightly different words. Human oversight is not a design preference; it is EU AI Act Article 14.


From control to obligation: the map the checklist needs

Most governance checklists stop at the control. They tell you to log tool calls, require sign-off, and scope permissions, but never tell you why, or what an examiner cites when the control is missing. The map below closes that gap. Each control lists the obligation it satisfies and what "passing" looks like.

  • Immutable run trail (plan, tool calls, decisions). Obligation: DORA ICT risk management and response-and-recovery records (Articles 6 and 11); EU AI Act record-keeping (Article 12); SOC 2 CC7 (system operations). Examiner: reconstruct a named run from event to outcome.

  • Human approval gates on high-impact actions. Obligation: EU AI Act human oversight (Article 14); SOC 2 CC8 (change management); SR 11-7 governance. Examiner: who approved, when, and the package they saw.

  • Least-privilege tool and credential scope. Obligation: DORA protection and prevention (Article 9); SOC 2 CC6 (logical access); ISO/IEC 42001 AI management system controls. Examiner: each identity's permission set and its last scoping review.

  • Guardrails enforced at the tool boundary. Obligation: EU AI Act accuracy, robustness, and cybersecurity (Article 15); DORA Article 9; OWASP LLM05 and LLM06 in practice. Examiner: the policy check per call, and the rule version that fired.

  • Model, prompt, tool, and policy versioning. Obligation: SR 11-7 and OCC model risk management; ISO/IEC 42001 documented design. Examiner: a past run's version manifest, reproducible end to end.

  • Tested failure cases before and after deploy. Obligation: DORA resilience testing (Article 25); SR 11-7 validation; EU AI Act Article 15. Examiner: what was tested, what failed, what changed before promotion.

Precision matters in front of an examiner. DORA Article 6 sets the ICT risk management framework, Article 9 the protection-and-prevention duties, Article 11 the response-and-recovery records, and Article 25 the testing programme. The EU AI Act adds Article 12, automatic logging over a high-risk system's lifetime, and Article 14, human oversight. SR 11-7 and the OCC guidance supply the US backbone for model inventory, validation, and change control. ISO/IEC 42001 gives a certifiable management system, and SOC 2 (with ISAE 3402) turns your controls into a report a customer's auditors can rely on.

The value of the map is that it converts a governance debate into an evidence conversation. You stop arguing about whether to log; you produce the record a specific rule asks for, in the form the rule expects.


The audit trail is the spine, and it is not a log file

The map reveals the pattern: nearly every obligation points at the same artifact. DORA wants records from before and during a disruption; the AI Act wants automatic logging of a high-risk system's events; SOC 2 wants the controls observable. When an agent acts, the only thing a regulator or auditor can inspect after the fact is the record of the action, so the record has to be complete. That record is the difference between an agent that runs and a governed ai agent.

One distinction carries the whole section. An ai agent audit trail is not a log file of model outputs. It is a structured, append-only, attributable chain that reconstructs the full decision: the plan, every tool call with its payload and result, the data read and changed, the reasoning and retrieved context, and every human approval. Application logging assumes a fixed call graph. An agent decides its call graph at runtime, so the trail has to be instrumented at the tool boundary, where the agent meets the world, and each event signed and hashed so nothing can be edited silently.

Tool-boundary instrumentation is what makes one trail usable by an EU AI Act examiner, a DORA reviewer, and a SOC 2 auditor at once. Build it anywhere else and you get a transcript instead of a record.


Permissions and least privilege as a compliance position

Least privilege is not a security slogan; it is the control that makes every other control smaller. An agent should run on its own service identity, with the minimum permission set its job requires, and no shared or human credential. An agent that can call ten tools holds the union of ten permission sets, so every tool added expands the blast radius. Scope the union down at the start.

This shows up as access control in the obligations. SOC 2 CC6 asks you to restrict logical access and prove it works. DORA Article 9 asks you to protect assets and prevent unauthorized access. ISO/IEC 42001 asks for lifecycle controls. A broad shared token fails all three, because the firm cannot say which identity performed which action.

Two defaults do most of the work. Separate read and write capabilities, because many agent workflows are read-only by nature: document intake, case triage, reconciliation review, exception flagging. Route every write through a guardrail that checks scope, threshold, and counterparty before execution. Policy checks belong at the tool boundary, not upstream where the agent can reason around them.


Human oversight is EU AI Act Article 14, not a preference

Human-in-the-loop ai agents are not a design aesthetic. For high-risk systems they are EU AI Act Article 14: the requirement that natural persons can effectively oversee the system, understand its capabilities and limits, and intervene or halt it. DORA points the same way, and SR 11-7 expects human judgment around consequential model outputs.

The obligation shapes the design in two concrete ways. First, the human sits at the decision points where the cost of being wrong is high, irreversible, or regulated: payments and trades above a threshold, changes to customer or KYC records, and external communications that carry the firm's name. Low-stakes, reversible, read-only work should not wait for a human, or reviewers start rubber-stamping and the control quietly dies.

Second, the handoff has to be decision-grade. The agent delivers a decision package, not a request for a vote of confidence: the proposed action, the data behind it, the policy rule, and the exact result on approval. Time-box it so a missed review declines or escalates rather than silently executing, and write every approve, reject, and timeout to the trail with the reviewer's identity. That turns human review from a workflow nicety into an oversight record an Article 14 examiner will accept.

The placement varies with the action: approve before execution for irreversible writes, review after a draft for communications and filings, and escalate only on exceptions for high-volume, low-risk flows. What stays constant is that the approval itself is a recorded governance event, not a conversation.


The audit evidence pack: what an examiner actually requests

To make the map concrete, here is the artifact an examiner requests. It is not a policy document. It is the evidence pack for a single named run.

Scenario: a credit-limit-increase exception agent. It is high risk under the EU AI Act's Annex III creditworthiness category, and in scope for DORA because it sits on a lending system. The examiner asks: "show me the complete decision record for case 4471, the limit increase approved on 19 August." The pack has seven pieces, each tied to the obligation above.

  1. The run manifest. A signed chain hash over the ordered event sequence for case 4471. It proves the trail has not been edited since the run. Obligation: DORA Article 11 recordkeeping, ISO/IEC 42001 evidence, SOC 2 CC7 integrity.

  2. The plan snapshot. What the agent intended to do before the first tool call. Obligation: EU AI Act Article 12 logging and Article 13 technical documentation.

  3. The tool-call log. Every API and system call, with exact payload, result, timestamp, and the service identity that made it. Obligation: SOC 2 CC6 access, DORA Articles 6 and 9.

  4. The guardrail evaluation. The policy check that ran before the write: the threshold rule, its version, and the pass result. Obligation: EU AI Act Article 15, DORA Article 9, OWASP LLM05 and LLM06 in practice.

  5. The approval record. The reviewer, the timestamp, the version of the decision package they saw, and the decision. Obligation: EU AI Act Article 14, SOC 2 CC8.

  6. The version manifest. Model version, prompt version, tool version, and policy version in force for that run. Obligation: SR 11-7 and OCC model risk management, ISO/IEC 42001 documented design.

  7. The data change record. Before and after values for the customer's credit limit, with the identity that changed it. Obligation: SOC 2 change management, DORA protection of data integrity.

The pack is only as strong as its weakest item. If the tool-call log is complete but the approval record is a screenshot sitting in someone's inbox, the examiner stops there and starts sampling for more gaps. The pack has to be exportable and machine-readable, not a PDF of dashboards, and retained for the regulatory retention horizon.

Every control in the map exists so that, when the examiner names a case, the firm can produce these seven pieces in a day rather than a quarter.


How Kolega makes the controls the default

The map matters because a toolchain either produces this evidence or it does not. Kolega builds the toolchain so the evidence is a byproduct, not a project.

Kolega Studio is where governance gets prototyped, not shipped. It is a visual, hosted prototyping surface: it turns a stakeholder conversation into a working application people can click through. A team can sketch the controls there, a decision package, an approval gate, a scoped tool, and test the operating model before funding a real build. Studio is deliberately not where regulated production systems are built, so the prototype is where the control model is tried, and the real build happens elsewhere.

Kolega DevSec keeps the shipped code scannable. The guardrail row in the map is a security boundary as much as a governance one. It is a code remediation platform: it finds the vulnerabilities that matter, reproduces them, writes and tests the fix, and opens a pull request the client's team reviews and merges. Deep semantic analysis across data-flow and control-flow catches SQL injection, broken authentication and authorization, and race conditions. The agent proposes the fix; it never decides, because a human sits on the merge.

Kolega Code is where the prototype becomes a production build. A prototype that looks governed in Studio but drops its trail in a real system fails the audit. It is the production engine: a terminal-native multi-agent harness that plans the task, runs specialist sub-agents in parallel, and consolidates the result for review. Every run is evidence. Transcripts, phase journals, and diffs are written to disk, so the build is journaled, reviewable, and resumable from the first real build.

CAM is the proof mindset that feeds the trail. Certified Agentic Migration moves regulated workloads and data between systems and proves the move was faithful. It runs five loops, Semantic discovery, Contract synthesis, Verified implementation, Adversarial regression, and Evidence and certification, in two modes: controlled migration and adversarial transfer. You can start with a Tape health-check, Migration assurance, or a Certified migration. Agents do the labor; deterministic machinery does the checking. Validators compiled from a human-signed contract, cryptographic commitments over every delivery, and an append-only, hash-chained evidence log mean every claim in the certificate resolves to an artifact an auditor can re-verify. The same instinct applies to agent governance: keep the trail append-only and tamper-evident, retain the evidence, and let the record stand on its own. When Kolega treats an agent's audit trail the way CAM treats a migration, the trail stops being a log and becomes proof.


A governance checklist grounded in delivery

Here is the checklist from the map, restated with the Kolega delivery path, so it reads as something you can ship rather than a generic standard.

  • Identity and scope: every agent runs on its own service identity with least-privilege permissions. Kolega DevSec catches broken authentication and authorization in the code, and its fix arrives as a pull request the client's team reviews and merges.

  • Tool-boundary audit: every plan, tool call, data change, and decision is recorded append-only and attributable. Kolega Code makes every run evidence: transcripts, phase journals, and diffs written to disk, so the build is journaled, reviewable, and resumable.

  • Human oversight: high-risk and irreversible actions stop for a sign-off with a decision package. Kolega Studio is where you prototype that approval gate and decision package before committing to a real build.

  • Guardrails: policy checks run before every call and cannot be overridden by the prompt. DevSec scans the shipped code for SQL injection and race conditions, writes the tested fix, and opens a PR, so the guardrail code is implemented and human-reviewed.

  • Versioning and testing: model, prompt, tools, and policy are versioned as one release and evaluated against failure cases. Code's journaled runs make the build reviewable and resumable, and DevSec adds reproduce-and-fix evidence before merge.

  • Escalation and review: timeouts and exceptions have defined, audited outcomes, and permissions are re-assessed on a schedule. The approval record and the firm's review cadence produce the ongoing evidence, and when that build replaces a legacy system, CAM proves the cutover was faithful.

If you cannot produce the evidence pack for a named run, the agent is not governed, it is just running. Build it in from the first prototype, map each control to its obligation, and let the audit trail answer the examiner before the meeting even starts.

Simple 3 click setup.

Deploy Kolega.dev.

Find and fix your technical debt.

No credit card required · 7-day free trial