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
CLI ReferencePerformance & Latency

Proxy Performance and Local Latency

Adding an intermediary proxy to your application's network path naturally raises questions about latency, memory usage, and performance overhead.

The AgentSecrets proxy is designed from the ground up in Go to minimize request overhead, ensuring that security does not come at the expense of speed.


Expected latency overhead

The local proxy introduces a loopback network hop. Because this communication occurs entirely within the host machine over the loopback interface (127.0.0.1), network transit time is sub-millisecond (typically 0.1ms to 0.3ms).

The total latency profile of a proxy request is divided into three components:

  1. Local Loopback Transit: The application sends the request to the proxy (~0.2ms).
  2. Secret Decryption: The proxy resolves the reference name, fetches the cipher from the OS Keychain, and decrypts it. Because the decrypted keys are securely cached in the proxy daemon's RAM, this step takes < 0.05ms for cached keys, and 5ms to 15ms for uncached keys requiring hardware Keychain/Secure Enclave decryptions.
  3. Outbound Transit & TLS: The proxy opens an outbound TLS connection to the remote API.

Local vs remote resolution

A common misconception is that the local proxy makes a remote network call to the AgentSecrets cloud servers to resolve secrets on every API request. It does not.

  • Offline Decryption: All decryption keys and credentials reside locally. Decryption is performed entirely on your local machine using your cryptographic private key.
  • Asynchronous Syncing: The proxy synchronizes domain allowlists, project settings, and credential revocation lists with the cloud backend asynchronously in the background. This synchronization occurs out-of-band and never blocks your application's API request path.
  • Connection Reuse: The proxy maintains persistent HTTP keep-alive connections to common API gateways (like api.openai.com and api.stripe.com), avoiding the expensive TLS handshake overhead (usually 50ms - 150ms) on subsequent calls.

Benchmarks

The following benchmarks compare the latency of direct API calls against calls routed through the AgentSecrets local proxy. Testing was performed on an AWS c6i.xlarge instance (Ubuntu 22.04 LTS) targeting https://api.stripe.com/v1/balance.

Request TypeDirect ConnectionProxy ConnectionAdded Overhead
Cold Start (No cached TLS connection)165.4 ms166.8 ms+1.4 ms
Warm Start (Active Connection Pool)42.1 ms42.4 ms+0.3 ms
p95 Latency48.2 ms48.7 ms+0.5 ms
p99 Latency112.0 ms113.1 ms+1.1 ms
Loading diagram...

Optimizing for high-frequency agent calls

For high-throughput applications making hundreds of API calls per minute (such as autonomous swarm agents or high-frequency trading services), you can optimize loopback connection performance:

1Enable Connection Keep-Alive

Ensure that your application's HTTP client is configured to reuse TCP connections when talking to the proxy. In Node.js, use an Agent with keepAlive: true. In Python, use a requests.Session or httpx.AsyncClient.

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