Chapter 9. Agentic AI Governance: autonomy, tools, human-in-the-loop
Up to this chapter, Kovcheg mostly *answered*. Now it *acts*: creates tickets, drafts and sends customer decisions, calls internal APIs, reaches into systems via MCP servers. This is a qualitative jump in risk. While the model generates text, the worst case is a wrong answer (ch. 3, 7). Once the model takes actions, its "power and visibility become the attack surface" (in OWASP Agentic's phrasing): an injection from an email (ch. 3) stops being a bad reply and becomes an executed money transfer.
And here's the uncomfortable part: the industry isn't ready. Per the 2026 Saviynt report, only 5% of security leaders are confident they could contain a compromised agent (ch. 8). This chapter covers the autonomy plane: how to let an agent do useful work on its own while explicitly bounding the scope of that autonomy, requiring approval for irreversible actions, and intercepting dangerous behavior before it causes damage.
The customer's business goal
Kovcheg's autonomy is graduated by action risk. Promises to the business:
- The agent does on its own whatever is cheap to undo; anything irreversible/expensive goes through a human.
- An injection or hallucination never turns into an executed harmful action.
- Any agentic task can be stopped, and its unfinished actions frozen.
Driver: threat or regulator
- OWASP Top 10 for Agentic Applications (announced at Black Hat Europe 2025): excessive agency, tool misuse, memory poisoning, hijacking via injection.
- OWASP LLM: LLM06 (Excessive Agency), LLM01 (Prompt Injection — the hijacking vector).
- EU AI Act: Art. 14 (human oversight) for high-risk — a human must be able to intervene.
- Cascading failure: a chain/swarm of agents amplifies a single error into a systemic one.
Architectural pattern
Bounded Autonomy & Policy-Gated Action Loop — every agent action passes through a deterministic policy gate that decides: auto-execute / require human confirmation / deny. Autonomy isn't an on/off switch — it's graduated by the action's risk class. This is a direct application of the ch. 3 finding (out-of-band policy, CaMeL): the safety of an action is decided outside the model — by a deterministic policy over provenance and action class that can't be talked past with an injection.
agent plan → tool selection
│
▼
[classify action risk] → read | reversible-write | irreversible | financial
│
▼
[OPA policy gate] ── auto ──► execute (least-priv, short-lived creds)
├── HITL ──► approval queue ──► (human) ──► execute | reject
└── deny ──► block + audit (ch. 4)
▲
[kill-switch flag] ── interrupts the loop immediately (ch. 8)Engineering stack & providers
- Orchestration: LangGraph, CrewAI, or a custom state-machine runner (explicit states are a CLAUDE.md-level architectural requirement).
- Tool protocol: MCP (Model Context Protocol) with governance over servers and scopes.
- Policy: OPA (Rego) — the action gate; feature flags — the kill-switch (ch. 8).
- HITL: an approval queue + audit trail (ch. 4).
Engineering implementation
### Step 1. An action catalog with risk classes
Every tool action gets a class and a required mode:
actions:
search_customer: {risk: read, mode: auto}
create_ticket: {risk: reversible-write, mode: auto}
update_limit: {risk: irreversible, mode: hitl}
transfer_funds: {risk: financial, mode: hitl, second_approver: true}
### Step 2. The policy-gated loop
Before calling a tool, the agent asks OPA: is this allowed, for whom, under what conditions (amount, customer, time, data provenance from ch. 3). The verdict is logged (ch. 4).
### Step 3. Least-privilege tools via MCP
MCP servers with minimal scopes, short-lived revocable credentials, an allow-list of tools per agent role. MCP servers go into the AIBOM (ch. 8) — they're supply-chain components.
### Step 4. Human-in-the-loop for the irreversible
Irreversible/expensive actions go to an approval queue; without confirmation (two, for financial actions) they don't execute. This is an explicit state transition, not "the model decided it was fine."
### Step 5. Memory governance
Isolation and validation of agent memory (defense against memory poisoning per OWASP Agentic), TTLs and write permissions. Poisoned memory is a way to smuggle an injection across sessions.
### Step 6. Limits and the kill-switch
A per-task limit on steps/cost (ties to ch. 5); exceeding it triggers a stop and escalation. The kill-switch (ch. 8) interrupts the loop immediately and freezes unfinished actions.
Where it breaks
- HITL fatigue. Too many confirmations → a human rubber-stamps "OK" without looking, oversight becomes formal. Fix: HITL only for genuinely irreversible actions, batching, clear context in the confirmation request.
- Injection bypasses the gate through task logic. The agent is "convinced" the action is legitimate (indirect injection from data, ch. 3). What saves you isn't a guard model but a provenance policy: "the action was provoked by an untrusted source → deny."
- Composition of safe actions = a dangerous result. Each individually is permitted, the chain is harmful. A single step's gate can't see this — it needs task/session-level invariants.
- Gate latency kills the agent's "liveness"; a tradeoff between autonomy and control.
- Multi-agent. Accountability diffuses across the swarm; tracing causality (ch. 4) and stopping it (ch. 8) get harder.
Standards and mapping
- OWASP Top 10 for Agentic Applications; OWASP LLM: LLM06, LLM01.
- EU AI Act: Art. 14 (human oversight), Art. 15 (robustness).
- ISO/IEC 42001: operations and incident management for AI.
- NIST AI RMF: Manage (oversight, intervention).
Lab and artifact
Give the Kovcheg agent 4 tools of different risk classes (from the catalog above) via MCP; set up the OPA gate, an approval queue with dual confirmation for financial actions, step/budget limits, memory isolation, and the kill-switch; run a red-team exercise: an indirect injection from an email (the ch. 3 case) trying to trigger update_limit/transfer_funds. Artifact: an action catalog with risk classes + rego gates + an HITL log + a red-team report against OWASP Agentic.
Maturity checklist
- L1: an agent with an allow-list of tools, action logging.
- L2: a risk-class policy gate, HITL for the irreversible, step/budget limits, MCP with least privilege.
- L3: memory governance, a kill-switch with drills, an out-of-band provenance policy, protection against compositional attacks, anti-rubber-stamp measures in oversight.
Sources
- [OWASP Top 10 for Agentic Applications (Promptfoo)](https://www.promptfoo.dev/docs/red-team/owasp-agentic-ai/)
- [CaMeL: Defeating Prompt Injections by Design (MIT/arXiv)](https://css.csail.mit.edu/6.5660/2026/readings/camel.pdf)
- [AI Agent Kill Switches: can you actually stop one in 2026?](https://nerdleveltech.com/ai-agent-kill-switch-containment)
- [Shadow AI Agents: the insider threat (CSA)](https://cloudsecurityalliance.org/blog/2026/05/26/shadow-ai-agents-the-insider-threat-you-re-not-monitoring-yet)
How it actually works — engineering breakdowns
Standalone howto from practice, showing this control plane on real code and a working artifact.
- How to Control What AI Agents DoControlling agent actions: input/output split and least-privilege.
- Enterprise code bastion: Claude works on code with no file or shell accessA sandbox for the agent — the boundary of authority.
- Async MCP Server with Job Queue: Why Polling, Not BlockingMCP server mechanics: a job queue behind the agent's tools.
Read next
Putting AI into production under regulatory risk?
Designing the control plane for your system: privacy, access, guardrails, audit, EU AI Act / ISO 42001 compliance — as working architecture, not a policy PDF.
Email meThe transition engine
Next Move Engine — the system that takes a team to an autonomous delivery loop.
Next Move Engine →