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
Server & BackendAgent Identity Resolution

Agent Identity

In agentic workflows, it is critical to distinguish between actions taken by human developers and actions taken by AI agents. The API provides endpoints to declare agent identities, issue cryptographically scoped agent tokens, and audit their execution.


Agent Registration

Before an AI agent can execute tools or requests under its own name, it must be registered within a workspace or project:

  • Endpoints:
    • Workspace-scoped agent: POST /api/workspaces/{workspace_id}/agents/
    • Project-scoped agent: POST /api/workspaces/{workspace_id}/projects/{project_id}/agents/
  • Payload:
    { "name": "Claude-Codebase-Assistant", "label": "development-token", "expires_in_days": 30 }
  • Response: Returns the registered agent details along with an initial agent token:
    { "status": "success", "message": "Agent created", "data": { "agent": { "id": "agent-uuid", "name": "Claude-Codebase-Assistant", "project_id": null, "token_count": 1, "active_token_count": 1, "last_used_at": null, "created_at": "2026-05-20T22:00:00Z" }, "token": "raw_token_secret_string", "token_id": "token-uuid" } }

Token Issuance & Lifecycle

Once registered, further cryptographic tokens can be issued, listed, or revoked:

  • Issue Token: POST /api/workspaces/{workspace_id}/agents/{registration_id}/tokens/ (Accepts label and expires_in_days)
  • List Tokens: GET /api/workspaces/{workspace_id}/agents/{registration_id}/tokens/
  • Revoke Token: DELETE /api/workspaces/{workspace_id}/agents/{registration_id}/tokens/{token_id}/

Auditing by Identity

When the credential proxy forwards requests to external APIs, it signs the audit log with the active token:

  1. The proxy matches the requests to the current active agent.
  2. The proxy sends the audit log containing the agent_id or token signature to the backend: /api/internal/audit/logs/.
  3. The workspace administrator can view precisely which agent used which credentials, and quickly revoke access for compromised or misbehaving agents without affecting other teammates.
Was this helpful?
Thanks for your feedback!
Your feedback helps us improve the platform.