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
IntegrationsOpenClaw

Using AgentSecrets with OpenClaw

AgentSecrets integrates natively with OpenClaw (v2026.2.26 and later) to provide secure credential management. This integration supports both interactive AI assistant capabilities (via the AgentSecrets skill) and non-interactive workflow injection (via the SecretRef exec provider).


1Interactive AI Assistant Skill

The agentsecrets skill for OpenClaw (published on ClawHub) is an assistant profile that configures the rules, prompts, and CLI dependencies for the OpenClaw AI assistant. It empowers the assistant to interact with AgentSecrets directly on the host machine.

Because OpenClaw assistants execute local terminal commands, the assistant can autonomously manage your credentials lifecycle. It can inspect configuration status, list key metadata, perform diffs, and sync changes (push/pull) with your cloud backend. The agent never sees the decrypted secret values, upholding the zero-knowledge security model.

Installation

  1. Install the skill from ClawHub:

    openclaw skill install agentsecrets
  2. Verify that the skill is registered and active:

    openclaw skill list | grep agentsecrets # agentsecrets active

Autonomous Assistant Capabilities

Once the skill is active, the assistant understands how to execute AgentSecrets CLI commands on your behalf to manage your workflow. It can run:

  • Status queries: Runs agentsecrets status to verify the active project, workspace, and environment context.
  • Secret listing & diffs: Runs agentsecrets secrets list and agentsecrets secrets diff to inspect keys (names only) and detect drifted configurations.
  • Syncing: Runs agentsecrets secrets pull and agentsecrets secrets push to synchronize local OS Keychain states with the remote sync service.
  • Environment switches: Runs agentsecrets environment switch <env> to swap active contexts.
  • Secure API calls: Runs agentsecrets call --url <url> --bearer <key> to execute API requests with secure credential injection at the transport boundary.

Sensitive write operations like setting a key (agentsecrets secrets set) require direct user password confirmation and cannot be fully automated without human gating. The assistant will guide you to run the set command in your local terminal.


2Workflow Secret Injection (SecretRef)

For non-interactive workflow steps and automated tasks, OpenClaw supports the SecretRef system. When a step configuration references a key via SecretRef, OpenClaw automatically invokes the AgentSecrets exec provider to resolve and inject the key.

Setup Steps

  1. Store the credential in the local OS Keychain:

    agentsecrets secrets set STRIPE_KEY=sk_live_...
  2. Add domain authorization to your workspace allowlist:

    agentsecrets workspace allowlist add api.stripe.com
  3. Reference the credential in your OpenClaw workflow YAML file:

    steps: - name: fetch-charges skill: standard-http inputs: url: https://api.stripe.com/v1/charges auth: secret_ref: STRIPE_KEY

Behind the scenes, when this step executes, OpenClaw runs agentsecrets exec internally. The AgentSecrets binary reads the secret reference, resolves the value from the OS Keychain, performs the injection, and returns the response safely. Plaintext values are never written to any OpenClaw configuration file or workflow log.


3Environment Injection (Process Spawning)

If you are running legacy OpenClaw workflows that do not support SecretRef and instead look up keys from environment variables, you can spawn the OpenClaw process using the agentsecrets env wrapper:

agentsecrets env -- openclaw run my-workflow

This resolves the credentials from your local OS Keychain and injects them as standard environment variables directly into the child process at launch time.

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