Agent Governance 00: Tiered Governance Lab

This is a series of posts on AI Agent Governance

Part Title
Post 00 Why I’m building a tiered governance lab for AI agents
Post 01 OAuth for the infrastructure person
Agents work on behalf of humans.

The problem I keep feeling

I’ve been working with K8s and load balancers for years. I understand TLS, routing, firewalling, etc. But authn & authz never came easily to me, and I’m feeling like AI agents are going to require me to step it up.

It’s pretty clear that AI agents mean robust governance is required. It’s also clear that it’s not just scale but the nature of agentic work: they work on behalf of humans, can be ephemeral, spin up sub-agents and call other agents and services. I know the basics behind SAML, Kerberos, and OAuth, but it’s clear that these alone won’t be enough.

I was reading about the “on behalf of” (OBO) pattern and felt that familiar intimidation of unknown fields. So this demo/blog series is an attempt to learn AI agent governance, demo it, and be able to teach it to others.

The core idea: tier by blast radius

AI agents are so numerous, complex, and dangerous that manually architecting, plumbing, and stitching together different pieces won’t be enough. I need to implement this governance via policy, ideally with code, ideally via GitOps. I think it’s the inevitable goal of a complex and large-scale AI agent environment. I find policy boring, don’t love coding, and grew up manually plumbing systems together. Time to get over it.

After chatting with AI, I settled on three tiers, organized by blast radius:

Tier Example agent What it touches The risk if it goes wrong
1 Knowledge agent Docs service, read-only Returns wrong answer. Low impact.
2 Ticket agent Ticket service, reads and writes internal records for the invoking rep Corrupts internal data. Medium impact.
3 Refund agent Billing service, moves money above a threshold Real money leaves. High impact.

The governance gets heavier as the blast radius grows. Tier 1 gets a scoped identity and a rate limit. Tier 2 gets per-agent credentials, a policy engine making explicit decisions, and a full audit log. Tier 3 gets short-lived tokens, a delegation chain that carries both the user’s identity and the agent’s identity, and a human approval step before anything moves.

The fictional scenario I’m using to keep it concrete: an internal support operation. Three humans — a support rep, a support manager, a finance approver. Three agents, one per tier, calling three deliberately boring mock services. I want the complexity in the governance layer, not in the application code.

What I’m building

Here’s the target architecture, roughly:

  • K8s cluster (kind or k3s, running locally or in a cloud VM) — where the agents, mock services, and most of the governance infrastructure lives.
  • Keycloak — in the cluster, handling human identity and agent registration. User store lives here.
  • F5 BIG-IP APM — running outside the cluster as a BIG-IP VE. The human login experience goes through APM. APM federates to Keycloak, so identities are managed in Keycloak but users authenticate through APM’s login page.
  • A gateway — in the cluster, in the path of every agent-to-tool call. This is where identity gets checked and policy gets enforced. I’m starting with a neutral open-source Envoy-based gateway so the demo isn’t tied to any vendor.
  • OPA — the policy engine. Tier rules live here as declarative policy, not buried in gateway config.
  • SPIFFE/SPIRE — workload identity for agent pods. No static secrets in the cluster.
  • OpenTelemetry — traces across the whole delegation chain, so you can reconstruct who called what on behalf of whom.

The phases:

Phase What gets built
0 Scope, capability spike, threat model (this phase)
1 Cluster, Keycloak, workload identity, APM federation
2 Agents and tools — the ungoverned baseline
3 Gateway + tier 1
4 Tier 2: per-agent credentials and policy
5 Tier 3: token exchange, delegation chain, approval gate
6 Failure demos — what stops a stolen token, a tier jump, an unsanctioned action
7 Publish and teach

What Phase 0 actually involved

Before writing a single line of config, I did a capability spike: checking which OAuth features my BIG-IP APM version actually supports. This matters because the whole design depends on it, and I didn’t want to build toward a feature that doesn’t exist.

The short version of what I believe so far:

APM at 21.1.0 supports Dynamic Client Registration (RFC 7591) natively. That’s the mechanism for agents to register themselves and get credentials. Good.

APM at 21.1.0 does not support Token Exchange (RFC 8693) as a native grant type. Token exchange is what lets you trade a user’s token for a narrower, delegation-scoped token that carries both user and agent identity. That’s essential for tier 3.

So the architecture shifted. Keycloak — which does support token exchange — will handle agent registration and all token issuance. APM sits in front as the human authentication layer and as a network-level front door (TLS, rate limiting, keeping the admin and data paths separate). Agents interact with Keycloak directly for DCR and token transactions. Users see APM’s login page.

I’ll document all of this in detail in the next few posts. For now: verify your platform’s capabilities before you design around them.

Why I’m doing this in public

I feel like an infrastructure person learning identity over and over. A decade ago I got pretty good at setting up and troubleshooting SAML and Kerberos, and I administered ADFS so was relatively confident with things like forms-based auth, cert-based auth, MFA plugins, etc. After years at F5 I’ve handled a few cases where I’ve set up OAuth from scratch, but even now I’m intimidated by auth flows.

The point of doing it in public is exactly that. If you’re a solutions architect, a platform engineer, or a Kubernetes person who also finds the identity layer confusing, I want this series to be useful to you. Not just the working version — the confused version, the wrong version, the “I had it backwards” version too.

Updated: