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
Comparisonsvs dotenv-vault

AgentSecrets vs dotenv-vault / dotenvx

dotenv-vault (and its successor dotenvx, by the same author) encrypts .env files so they can be safely committed to git. dotenvx replaced dotenv-vault entirely in 2025 — the vault Pro tier shut down in February 2026.

What dotenvx Does Well

dotenvx is a genuine improvement over plaintext .env files. It encrypts individual values inline using ECIES with AES-256, so an AI agent scanning your project directory sees KEY=encrypted:BASE64... instead of your Stripe key. It also markets itself as "Ready for Agents", which is fair — encrypted files prevent casual leakage to coding assistants.

The Runtime Gap

Encryption at rest solves half the problem. At runtime, dotenvx still needs to decrypt:

dotenvx run -- npm start

This decrypts every value into the process environment block (process.env, os.environ). Once loaded, any code running in that process — including AI agents, third-party dependencies, or compromised plugins — can read every secret by inspecting environment variables.

If a LangChain agent running under dotenvx run -- is prompted to import os; print(os.environ), the decrypted credentials are right there in memory.

Where AgentSecrets Differs

Concerndotenvx / dotenv-vaultAgentSecrets
Encryption at restECIES inline in .env fileAES-256-GCM in OS keychain
Delivery to processDecrypts into os.environ (plaintext in memory)Transport-layer injection via proxy (never enters agent context)
AI agent visibilityEncrypted on disk, plaintext in memoryNever plaintext — not on disk, not in memory
Per-secret constraintsNoneDomain + method restrictions (secrets policy set)
Agent identityNoneCryptographic tokens (agent register)
Process verificationNonekeychain-auth daemon (binary hash check)
Team syncPaid Armor product ($36/yr+)Built-in E2E encrypted sync

The Core Difference

dotenvx moves secrets from plaintext on disk to encrypted on disk — then decrypts them into memory at runtime. AgentSecrets moves secrets out of disk and out of memory entirely, keeping them in the OS keychain and injecting them at the transport layer. For traditional apps this distinction may not matter. For AI agents that dynamically execute untrusted instructions, it is the difference between exposed and not exposed.

Using Them Together

You can use dotenvx for non-sensitive configuration (feature flags, public URLs) alongside AgentSecrets for actual credentials. There is no conflict — AgentSecrets only needs the proxy port or the env subcommand, both of which coexist with any .env loading strategy.

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