Production AI agents often fail not because of their autonomy level, but because their governance boundaries remain documented rather than enforced in code.

Architects must distinguish between human-in-the-loop (HITL) and human-on-the-loop (HOTL) models to prevent unauthorized tool execution.

By applying a structured autonomy taxonomy, engineering teams can implement consistent authorization patterns that survive regulatory scrutiny.

In short

  • Enforce governance boundaries in code using OPA and Rego to manage tool-call authorization rather than relying on manual documentation.

  • Map agent deployments to a 5-level autonomy taxonomy to determine whether your architecture requires per-action approval or exception-based auditing.

  • Adopt HITL gateways for lower-autonomy tasks and transition to HOTL for routine workflows to balance operational speed with risk management.

The Autonomy Taxonomy

Most production agents operate between level 3 and 4 of the autonomy taxonomy. Level 3 agents handle routine workflows end-to-end, requiring only audit-based oversight. Level 4 agents manage planning and failure recovery, escalating only anomalies to human operators.

Architects should avoid treating all agents as equal. A level 1 agent, which executes narrow actions with full human review, requires a fundamentally different authorization model than a level 4 agent that manages its own tool use.

Enforcing Governance with OPA and Rego

To secure agent tool calls, integrate Open Policy Agent (OPA) with Rego policies. This approach allows you to define granular permissions that the agent must satisfy before executing any tool.

By decoupling authorization logic from the agent's core planning loop, you ensure that governance remains consistent even as the agent's capabilities evolve. This pattern prevents unauthorized actions by treating tool-call validation as a hard quality gate in the agent's execution path.

Governance is an architectural requirement, not an afterthought. By formalizing the relationship between autonomy levels and authorization, teams can scale AI workflows without sacrificing security or compliance.

Source

Agent Governance Architecture: OPA/Rego Tool-Call Authorization, HITL Gates, and the 5-Level Autonomy Taxonomy

https://javatask.dev/blog/agent-governance-opa-rego-hitl-architecture