What is AgentSecrets?
The Zero-Knowledge Difference
How AgentSecrets Works
Installation
Quick Start
Migrating from .env Files
Migrating from Vault / AWS
Migrating from dotenv-vault
Production Checklist
Credential Exposure
What Zero-Knowledge Means
The Proxy Model
The Three-Layer Model
Environments
Agent Identity
Storage Modes
The No get() Principle
Secret-Level Policies
Cloud Overview & Architecture
The Dual-Engine Model
Cloud Resolver Data Plane
Workload & Agent Tokens
Egress Allowlists & Audit Streams
Cloud REST API Reference
Account (init / login)
Server & Self-Hosting (server)
Docs
Shell Autocompletion
Keychain Auth
Secrets
Environments
Credential Proxy
env Injection
Workspaces & Teams
Projects
Agent Identity
Audit & Governance
Integrations Overview
Claude Desktop
Cursor
OpenClaw
HTTP Proxy (Any)
LangChain (Soon)
CrewAI (Soon)
CI/CD Pipeline
SDK Overview
Python SDK
Python API Reference
Python SDK Manual Testing
JavaScript SDK (Soon)
Ecosystem Overview
Zero-Knowledge MCP Server
Server Overview
5-Layer Architecture
Self-Hosting Guide
Authentication & Keys
Workspaces & Teams
Projects & Scope
Environments
Secrets & Sync Protocol
Agent Identity Resolution
Telemetry & Metrics Engine
Audit Log Sync
API Endpoint Reference
Security Overview
Anti-Impersonation & Process Verification
Encryption Model
Zero-Knowledge Sync
Proxy Security Layers
Threat Model
OWASP Top 10 Mitigation
Security FAQ
Third-Party Audit
Reporting Vulnerabilities
Guides Overview
Building on the SDK
Stripe Integration
OpenAI Integration
Multi-Agent Setup
Onboarding Team
CI/CD Pipeline
Publishing ZK MCP
Rotating Credentials
Auditing Team Activity
Dev to Production
Kubernetes Deployment
Monorepo Setup
Production Proxy Hardening
vs .env Files
vs HashiCorp Vault
vs AWS Secrets Manager
vs dotenv-vault
vs Infisical
When Not to Use
Proxy Not Starting
Proxy Not Resolving
Domain Blocked
Sync Conflicts
MCP Not Connecting
Session Token Errors
Proxy Session Authorization
Keychain Storage & Backends
SSRF & Destination Rules
Installation Issues
Error Codes Reference
Frequently Asked Questions
v3.1.x
v3.0.0
v2.1.0
v2.0.0
v1.4.0
v1.3.x
v1.2.0
v1.1.x
v1.0.x
Fundamental ConceptsAgent Identity

Agent Identity

Core Concept: Agent Identity shifts the security perimeter from the environment to the individual agent.

In traditional software, credentials are loaded at startup by a single trusted process. The process is the identity — if the server has the API key, it's authorized. This model worked because applications were deterministic: they executed pre-written code paths, not arbitrary instructions.

AI agents break this assumption. An agent interprets natural language, processes untrusted inputs, and dynamically decides which APIs to call. When three agents share the same Stripe key and one makes a suspicious charge, there's no way to know which agent did it. When a prompt injection tricks an agent into exfiltrating data, there's no way to isolate the compromised agent without shutting everything down.

Agent Identity solves this by making every credential access traceable to the specific agent that requested it.


The Problem with Flat Credential Pools

Most secrets managers treat the runtime environment as a single identity. Every process, every agent, every tool in that environment gets the same level of access.

Loading diagram...

This creates three structural failures:

  1. No attribution: Audit logs show that a credential was used, but not who used it. When a billing spike occurs at 3am, you're left guessing.
  2. No isolation: A compromised agent has access to every credential in the pool. Prompt injection against one agent is a breach of the entire system.
  3. No surgical revocation: To cut off a misbehaving agent, you must rotate the credential itself, immediately breaking every other agent that depends on it.

Three Levels of Identity

AgentSecrets introduces a graduated identity model. Each level adds stronger guarantees while remaining backwards-compatible with the previous one.

FeatureLevel 0: AnonymousLevel 1: DeclaredLevel 2: Issued
IdentificationNoneAgent self-reports nameCryptographic token
Spoofing ResistanceN/ALow (Trust-based)High (Cryptographically verified)
Surgical RevocationNoNoYes
Audit Trace"anonymous""my-agent""my-agent" + footprint
Use CaseLocal PrototypingTrusted DebuggingProduction Systems

Level 0: Anonymous

The default state. The agent makes a request through the proxy without identifying itself. The request is logged, redacted, and allowlisted — but the audit trail shows anonymous as the caller.

Use Anonymous identity only during local development when you are the sole developer running a single agent.

Level 1: Declared

The agent self-reports a name. The proxy logs this name but does not cryptographically verify it.

Declared identity is extremely useful for debugging multi-agent pipelines in trusted environments. You can filter audit logs by agent name, trace request flows, and diagnose which agent is generating unexpected calls. However, because it lacks cryptographic verification, it is vulnerable to spoofing by compromised agents.

Level 2: Issued (Cryptographic)

The agent presents a cryptographic token (prefixed with agt_) issued by a workspace administrator. The proxy validates the token against the workspace before resolving any credentials.

Why use Issued Tokens?

  • Proof of origin: Cryptographically ties the request to a specific registered agent.
  • Instant revocation: A single token can be revoked without affecting other agents.
  • Capability enforcement: Tokens can be rigidly scoped to specific secrets and projects.

Identity as a Security Boundary

Agent Identity is not just an audit feature — it is the foundation for runtime access control. By moving the security boundary to the agent itself, you can establish Zero Trust architectures within your own codebases.

Loading diagram...

Key Security Benefits

  • Capabilities: Restrict an agent named email-sender to only access the SENDGRID_KEY, preventing it from ever touching the STRIPE_KEY even if compromised by prompt injection.
  • Secret Policies: Individual secrets can mandate specific identity levels. For example, a production database credential can be configured to completely reject Anonymous or Declared requests.
  • Revocation without downtime: When you revoke a token, only that agent loses access. Every other agent continues operating without requiring credential rotation or downtime.

Next Steps

To see exactly how to implement Agent Identity in your code, manage tokens, and set capabilities, read the Agent Identity CLI Reference.

Was this helpful?
Thanks for your feedback!
Your feedback helps us improve the platform.