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
Credential Proxy Overview
Secrets Management
Environments
env Injection
Workspaces & Teams
Projects
Agent Identity
Audit & Governance
account (init / login / logout)
server (get / set / status / reset)
secrets (set / list / delete / push / pull)
proxy (start / stop / status / logs)
call (inject requests via proxy)
env (execute commands with secrets)
workspace (list / create / switch / roles)
project (list / create / use / update)
environment (list / switch / copy / merge)
agent (register / list / tokens)
agent policy (set / get / delete)
logs (list / watch / export / verify)
mcp (serve / install / config)
status (system & session diagnostics)
Aliases & Shortcuts
docs (interactive terminal viewer)
Shell Autocompletion
keychain-auth (daemon & security)
Ecosystem Overview
Zero-Knowledge MCP Server
Integrations Overview
Claude Desktop
Cursor IDE
OpenClaw
HTTP Proxy (Any Client)
LangChain (Native)
CrewAI (Native)
CI/CD Pipeline
SDK Overview
Python SDK
Python API Reference
Python SDK Manual Testing
JavaScript SDK (Soon)
ZK-MCP Integration Guide
Server Overview
5-Layer Architecture
Self-Hosting Guide
Self-Hosting Operations Manual
Server Data Migration
Authentication & Keys
Workspaces & Teams Backend
Projects & Scope Backend
Environments Backend
Secrets & Sync Protocol
Agent Identity Resolution
Telemetry & Metrics Engine
Audit Log Sync
API Endpoint Reference
Cloud Overview & Architecture
The Dual-Engine Model
Cloud Resolver Data Plane
Workload & Agent Tokens
Egress Allowlists & Audit Streams
Cloud REST API 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.x
v2.1.0
v2.0.0
v1.4.0
v1.3.x
v1.2.0
v1.1.x
v1.0.x
CLI Referencecall (inject requests via proxy)

call

agentsecrets call — full flag reference

agentsecrets call --url URL --bearer KEY_NAME agentsecrets call --url URL --method POST --bearer KEY_NAME --body '{...}' agentsecrets call --url URL --header Header-Name=KEY_NAME agentsecrets call --url URL --query param=KEY_NAME agentsecrets call --url URL --basic KEY_NAME agentsecrets call --url URL --body-field path=KEY_NAME agentsecrets call --url URL --form-field field=KEY_NAME

Makes a single authenticated request through the proxy. All six injection styles are supported. Multiple injection flags can be combined in one call.


Authenticating the Call Command

To authenticate requests through the proxy, the call command needs an active Agent Token. You can provide this in three ways:

  1. Direct Token Value: Pass the raw cryptographic token using the --token flag:
    agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY --token tVwXyZ_4kR9mNpQ9aBcDeFgHiJkLmNoPqRs
  2. Environment Variable: Set the AS_AGENT_TOKEN environment variable in your session:
    export AS_AGENT_TOKEN=tVwXyZ_4kR9mNpQ9aBcDeFgHiJkLmNoPqRs agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY
  3. Keychain Token Reference (Recommended): Instead of exposing raw tokens in your scripts or command history, pass the agent's name with the _TOKEN suffix (e.g. billing-processor_TOKEN). AgentSecrets will intercept this reference and resolve the actual token securely from your OS Keychain:
    # Via flag agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY --token billing-processor_TOKEN # Via environment variable export AS_AGENT_TOKEN=billing-processor_TOKEN agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY

CLI Flags

--bearer

Injects as Authorization: Bearer <value>.

--basic

Injects as Authorization: Basic <base64(username:password)>. Expects a secret containing username:password.

Injects as a custom header Header-Name: <value>. Must be in Header-Name=KEY_NAME format.

--query

Injects as a query parameter ?param=<value>. Must be in param=KEY_NAME format.

--body-field

Injects into a JSON body field at the specified path. Must be in json.path=KEY_NAME format.

--form-field

Injects into a form field. Must be in field=KEY_NAME format.

--url

The target API URL (required).

--method

The HTTP method to use (default: GET).

--body

The request body to send (JSON string).

--token

The agent token or Keychain token reference (e.g., billing-processor_TOKEN). If omitted, reads the AS_AGENT_TOKEN environment variable.

--output

Specifies the terminal output format. Supports text (default) or json.

  • When --output json is passed, the CLI returns a structured JSON payload containing status_code, response headers, and parsed body for programmatic consumption:
    agentsecrets call --url https://api.stripe.com/v1/balance --bearer STRIPE_KEY --output json
    Output:
    { "status_code": 200, "headers": { "content-type": "application/json", "request-id": "req_12345" }, "body": { "object": "balance", "available": [{"amount": 10000, "currency": "usd"}] } }

Response Redaction

All responses returned by agentsecrets call pass through the proxy's real-time redaction engine:

  • Body Redaction: If an upstream API reflects sensitive credentials in its response body, they are automatically replaced with [REDACTED].
  • Header Redaction: Sensitive headers returned by upstream APIs (e.g. Set-Cookie, Authorization, X-API-Key) are redacted before terminal printing or SDK parsing.
Was this helpful?
Thanks for your feedback!
Your feedback helps us improve the platform.