If you’ve ever asked, “Which agent actually made this change?” and realized your logs only say service-account-prod or automation-bot, you’ve already hit the core problem with autonomous AI systems: they can act, but they’re often not individually accountable.
That gets painful fast. An agent opens a PR, rotates a secret, calls an internal MCP tool, or triggers a deploy. Later, you need to answer basic audit questions:
- Which agent performed the action?
- Under whose authority was it operating?
- Was it delegated access, and by whom?
- What exact policy allowed the action?
- Can I prove the event log wasn’t tampered with?
For many teams, the current answer is some combination of shared API keys, broad service accounts, and application logs that weren’t designed for non-human actors. That works right up until you need incident response, compliance evidence, or just confidence that your agents aren’t quietly over-privileged.
The fix is not “more logs.” It’s giving agents real identities.
Why AI agents need cryptographic identity
A useful mental model is: treat autonomous agents less like scripts and more like machine principals with constrained authority.
A proper identity system for agents should give you:
- A unique cryptographic identity per agent
- Verifiable delegation of authority
- Policy-based access control
- Tamper-evident audit trails
- Revocation and approval workflows
Without those pieces, “agent auditing” usually means reconstructing intent from app logs after the fact. With them, you can validate who acted, what they were allowed to do, and whether the action chain was legitimate.
In practice, this usually means issuing each agent its own keypair and signing requests or action attestations. Ed25519 is a strong default here because it’s fast, widely supported, and straightforward to use.
A minimal architecture
At a high level, an auditable agent system looks like this:
- Agent identity: each agent has a public/private keypair
- Delegation layer: a human, service, or parent agent can delegate scoped permissions
- Policy engine: evaluates whether the requested action is allowed
- Execution boundary: tools, APIs, or MCP servers verify identity and authorization
- Audit log: records signed actions, decisions, and delegation chains
You do not need a giant platform to start. If your environment is already built around OAuth, OIDC, SPIFFE, or OPA, those may be the right primitives. The important part is that your agents stop sharing identities.
What “good” looks like in an audit trail
A useful audit event for an autonomous agent should capture more than “request succeeded.” It should include:
- Agent ID / public key fingerprint
- Parent delegation or token exchange chain
- Requested action
- Target resource
- Policy decision and policy version
- Approval requirement, if any
- Timestamp
- Signature or signed envelope hash
For example:
{
"event_type": "tool.invoke",
"agent_id": "agent:code-reviewer:ed25519:9f3c...",
"delegated_by": "user:sre-oncall",
"delegation_chain": [
"user:sre-oncall",
"agent:incident-coordinator",
"agent:code-reviewer"
],
"resource": "mcp://github/pull_request/comment",
"action": "write",
"policy_decision": "allow",
"policy_id": "repo-comment-policy@v12",
"timestamp": "2026-03-28T10:15:21Z",
"signature": "base64..."
}
That’s the difference between “some automation commented on a PR” and “this specific agent, acting through this delegated authority, was allowed by this policy to do exactly this thing.”
Delegation matters more than most teams expect
A lot of agent systems fail at the identity layer because they only model direct permissions. But autonomous systems often act on behalf of users, teams, or supervisor agents.
That means you need delegation, not just authentication.
A common pattern is token exchange and delegation chains similar to RFC 8693, where one principal exchanges or derives a token representing scoped authority for another principal. In an agent environment, that lets you say:
- Alice approved a production investigation
- The incident coordinator agent can inspect logs for 30 minutes
- It can delegate read-only GitHub access to a code analysis agent
- But not deploy, rotate secrets, or access unrelated repos
That chain should be inspectable and logged.
Policy: use OPA if it fits
If you already use Open Policy Agent, keep using it. OPA is a strong choice for evaluating whether an agent should be allowed to perform an action, especially if you want consistent policy across services.
A simple Rego policy might look like this:
package agent.authz
default allow = false
allow if {
input.agent.role == "reviewer"
input.action == "comment"
input.resource.type == "pull_request"
}
allow if {
input.agent.role == "deployer"
input.action == "deploy"
input.resource.env == "staging"
}
require_approval if {
input.action == "deploy"
input.resource.env == "production"
}
Then your execution layer can evaluate:
- Is the agent authenticated?
- Is the delegation chain valid?
- Does policy allow this action?
- Is approval required before execution?
That model works whether your tools are internal APIs, CI jobs, or MCP-connected systems.
A simple example: signed agent actions
Here’s a minimal Python example using Ed25519 to sign an action envelope.
import json
import time
from nacl.signing import SigningKey
signing_key = SigningKey.generate()
verify_key = signing_key.verify_key
action = {
"agent_id": "agent:triage-bot",
"action": "create_issue",
"resource": "github://org/repo",
"delegated_by": "user:alice",
"timestamp": int(time.time())
}
payload = json.dumps(action, separators=(",", ":"), sort_keys=True).encode()
signed = signing_key.sign(payload)
print("public_key:", verify_key.encode().hex())
print("signature:", signed.signature.hex())
print("payload:", payload.decode())
And verification:
from nacl.signing import VerifyKey
public_key_hex = verify_key.encode().hex()
verify_key = VerifyKey(bytes.fromhex(public_key_hex))
verify_key.verify(payload, signed.signature)
print("verified")
This alone is not a complete authorization system, but it gives you a cryptographically verifiable event origin. Add delegation claims, policy evaluation, and immutable audit storage, and you’re in much better shape.
Getting started: a practical path
If you want to improve agent auditability without redesigning everything, start here.
1. Stop sharing agent credentials
Give each agent instance or logical agent role its own identity. Even if you begin with a simple key registry, that’s better than one API key for all automation.
2. Define a standard action envelope
Pick a canonical structure for agent actions:
- agent ID
- action
- resource
- timestamp
- delegation context
- policy decision
- optional approval metadata
Sign it, or at least hash and persist it consistently.
3. Add policy checks at tool boundaries
Your enforcement point should be where the agent actually does something useful:
- call an API
- write to a repo
- invoke an MCP tool
- access a secret
- trigger a deployment
This is where OPA, custom middleware, or an internal authorization service can help.
4. Model delegation explicitly
If an agent acts on behalf of a user or another agent, represent that as first-class data. Don’t bury it in a log message.
5. Log decisions, not just outcomes
Record why access was granted or denied:
- policy name/version
- matched rule
- approval status
- delegator identity
That makes incident review dramatically easier.
Where Authora fits
If you want to build this yourself, the core ingredients are well understood: per-agent keys, delegated authorization, policy enforcement, and durable audit logs.
If you want something more turnkey, this is the area Authora focuses on. Authora Identity provides cryptographic agent identities based on Ed25519, RBAC, delegation chains aligned with RFC 8693-style flows, MCP authorization, policy engines, approval workflows, and audit logging, with SDKs in TypeScript, Python, Rust, and Go.
That said, the broader point is more important than any single vendor choice: agents need real identities, not reused service credentials.
As teams move from “AI that suggests” to “AI that acts,” identity becomes the control plane for trust. If you can’t prove which agent did what, under what authority, and why it was allowed, you don’t really have an auditable autonomous system.
And if you can, a lot of security and compliance problems become much more manageable.
-- Authora team
This post was created with AI assistance.
Top comments (0)