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
Getting StartedMigrating from Vault / AWS

Migrating from HashiCorp Vault / AWS Secrets Manager

This guide walks you through migrating credentials from HashiCorp Vault or AWS Secrets Manager to AgentSecrets. You can run both in parallel during transition or completely migrate your workflow to AgentSecrets to take advantage of zero-knowledge local encryption and runtime boundary injection.


Key differences in the model

Vault and AWS Secrets Manager follow the retrieve-and-use model: your application requests a credential value at runtime, receives it, and uses it. This works well when your application is trusted code doing predictable things.

The retrieve-and-use model breaks down when the "application" is an AI agent or when developers want to eliminate plaintext secrets from process memory:

Vault / AWS Secrets ManagerAgentSecrets
How the credential is usedRetrieved as a value, passed to the API callKey name passed to proxy, value injected at transport layer
Value in agent memoryYes — after retrievalNever
Prompt injection riskPresent — agent holds the valueEliminated — agent never receives it
Audit log contains valuePossible in verbose/debug modesStructurally impossible — no value field in schema
Built forApplication codeAI agents & zero-knowledge dev environments

If your AI agent currently calls Vault or AWS Secrets Manager to retrieve credentials before making API calls, the retrieved value is in agent context. AgentSecrets eliminates that retrieval step.


Transition strategies

You can choose the level of migration that matches your infrastructure needs:

Option A: Complete Migration

Move all application and agent secrets to AgentSecrets, utilizing the local OS Keychain for storage and --storage-mode flags to manage execution environments. This completely eliminates plaintext secrets in config files or environment variables on developer machines.

Option B: Parallel Run

Keep infrastructure credentials (like database passwords) in your existing manager while routing external API credentials (such as Stripe, OpenAI, or GitHub keys) through AgentSecrets to protect executing processes and AI agents from credential leakage.


Step-by-step migration for agent credentials

1Identify which credentials your agents use

List the credentials your agents currently retrieve from Vault or AWS Secrets Manager to make API calls.

2Store them in AgentSecrets

agentsecrets secrets set STRIPE_KEY=sk_live_... agentsecrets secrets set OPENAI_KEY=sk-proj-... agentsecrets secrets set GITHUB_TOKEN=ghp_...

3Authorize the domains your agents call

agentsecrets workspace allowlist add api.stripe.com agentsecrets workspace allowlist add api.openai.com agentsecrets workspace allowlist add api.github.com

4Update your agent code

Before (retrieving from Vault):

import hvac import requests vault_client = hvac.Client() secret = vault_client.secrets.kv.read_secret_version(path="stripe") stripe_key = secret["data"]["data"]["key"] response = requests.get( "https://api.stripe.com/v1/balance", headers={"Authorization": f"Bearer {stripe_key}"} )

After (using AgentSecrets):

from agentsecrets import AgentSecrets client = AgentSecrets() response = client.call( "https://api.stripe.com/v1/balance", bearer="STRIPE_KEY" )

5Start the proxy and test

agentsecrets proxy start

Run your updated agent code and verify it works. Then inspect the logs:

agentsecrets proxy logs --last 10

Running both in parallel during transition

You do not need to migrate everything at once. Your application code can continue using Vault or AWS Secrets Manager while your agent code uses AgentSecrets:

# Application code — still using Vault db_password = vault_client.get_secret("DATABASE_PASSWORD") # Agent code — using AgentSecrets agent_client = AgentSecrets() response = agent_client.call("https://api.stripe.com/v1/balance", bearer="STRIPE_KEY")

Both run in the same codebase without conflict. Migrate agent credentials to AgentSecrets incrementally as you update each agent's code.

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