Coding and ops agents are already consuming your platform — cloning repos, running terraform plan, hitting internal APIs — usually on borrowed human credentials, which means unbounded permissions and an audit trail that says a person did it.
Tier: Advanced · Hands-on time: ~90 minutes
The 2026 platform consensus is that agents become a first-class platform persona: their own identities, scoped RBAC, quotas, egress rules, and audit trails, provisioned through golden paths like any other workload. This playbook builds that persona for your first two agent workloads, so "an agent did something weird" is a queryable fact instead of a forensic mystery.
Skip the ceremony for a purely local agent touching nothing shared — the persona starts mattering the moment shared systems, credentials, or spend are involved.
Inventory and classify what is already running. For each agent workload: what it reads, what it can write, whose credentials it uses today, and its blast radius if prompt-injected. Classify into tiers: read-only, propose-only (writes PRs/plans, humans apply), and act-with-approval. Fully autonomous write access is not a starting tier for anything.
Mint identities — one per agent workload, never shared. Pattern: a dedicated ServiceAccount / IAM role / Git machine-user per agent use case (e.g., agent-ci-reviewer, agent-incident-investigator), bound via OIDC/workload identity where possible so there are no long-lived secrets to leak. Naming convention matters: agent-* prefixes make every downstream log, policy, and dashboard filterable in one grep.
Scope permissions to the tier, mechanically. Read-only tier gets read-only roles (and NOT cluster-wide: namespace-scoped, resource-enumerated). Propose-only gets write access to branches/PRs but no merge, plan but no apply. Act-with-approval gets execution rights only through the approval-gated pipeline (pb-37 pattern). Have AI draft the Role/ClusterRole/IAM JSON from your tier descriptions — then review every verb; models over-grant reflexively (* verbs, list secrets) because permissive YAML "works".
Add the quota and egress walls. Per agent identity: K8s ResourceQuota/LimitRange on any namespace it can schedule into; API rate limits at your gateway; LLM token budgets via gateway virtual keys (pb-30); NetworkPolicy/egress rules so an agent that reads internal docs cannot also POST to arbitrary external hosts. Egress control is your strongest structural defense against prompt-injection exfiltration — an injected agent that cannot reach out cannot leak out.
Enforce the persona with policy-as-code. Kyverno/OPA rules that make the paved road mandatory: workloads labeled persona=agent must run with an agent-* ServiceAccount, must carry an owner annotation, must have a NetworkPolicy, cannot mount secrets outside an allowlist, cannot run in privileged mode. Now "agents follow the rules" is admission control, not a wiki page.
Make audit a first-class output. Route all agent-identity activity (K8s audit log, cloud CloudTrail-class logs, Git audit, gateway logs) into your SIEM/log stack keyed on the agent-* identities. Build the two dashboards that matter: "what did agent X do in the last 24h" and "which agent identities are approaching quota/budget". Add alerts for out-of-pattern behavior: an agent identity touching a resource class it never touched before, auth failures (scope-probing), or egress denials.
Package it as a golden path. Turn steps 2–6 into a template (pb-35): a team requesting "agent access" gets identity + scoped role + quotas + egress policy + dashboards by filling five parameters, with tier upgrades requiring platform review. Onboarding the third agent should take minutes.
An agent with a human's credentials is invisible; an agent with its own identity is governable. Identity is the foundation every other control — quota, egress, audit, revocation — hangs from.
persona=agent pod with a human ServiceAccount or missing NetworkPolicy is rejected.Prompt injection turns any agent permission into an attacker permission — scope, egress rules, and approval gates are sized for the injected worst case, not the demo case.
agent-* identity in one log query.