1Password Secrets
Give your AI secure access to 1Password. Never copy-paste an API key into a chat window again. Your AI reads secrets directly from the vault when it needs them. Works with Claude Code, OpenClaw, and any MCP-compatible AI app. Also ships as a Node.js module you can import into your own tools. Fully headless via service accounts … no desktop app, no biometrics, no popups.Teach Your AI to Use 1Password Secrets
Open your AI and say:What It Does
- Your AI can read and write secrets … API keys, tokens, credentials. No more pasting.
- Works in Claude Code out of the box … the connection point hooks up automatically.
- Secrets stay off disk … Config files use references, real values only exist in memory.
- Debug without exposing secrets … Test connectivity and preview values safely.
Technical Documentation
How It Works
- On startup, the resolver service walks
openclaw.jsonand resolvesop://references in memory - On first secret request, the tool reads the service account token from disk
- It creates a 1Password SDK client (cached for the session lifetime)
- Secrets are resolved via
client.secrets.resolve("op://Vault/Item/field") - The SDK talks directly to 1Password’s servers over HTTPS
- Secret values exist in memory only … never written to disk or logs
--expires-in). It survives reboots. No desktop app needed.
Quick Start
1. Install the tool
2. Set up 1Password
Create a custom vault and service account (service accounts can’t access built-in vaults):3. Save the service account token
4. Enable the tool
Add to~/.openclaw/openclaw.json:
5. Test
Using op:// References in Config
The tool resolves op://vault/item/field strings in openclaw.json at startup. The real key never appears on disk.
apiKey in memorySearch.remote. Leave "remote": {} empty. The tool resolves the OpenAI key from 1Password and sets process.env.OPENAI_API_KEY at startup; memory search picks it up from the env var.
AI Tools
op_read_secret … Reads a secret value from 1Password. Parameters: item (required), vault (optional), field (optional, default “api key”).
op_list_items … Lists all items in a vault so your AI can discover available secrets. Parameters: vault (optional).
op_write_secret … Creates or updates a secret. Requires write_items permission on the service account. Parameters: item (required), value (required), vault (optional), field (optional).
CLI Commands
Limitations
auth-profiles.jsoncannot useop://refs. This file is loaded by a separate subsystem that the tool can’t hook into. Auth provider tokens must remain as real values in that file.op_write_secretrequireswrite_itemspermission on the service account. The default setup usesread_itemsonly.- Secrets are resolved in memory only. If OpenClaw reloads config from disk mid-session,
op://refs need to be resolved again.
Configuration
Config inopenclaw.json under plugins.entries.op-secrets.config:
| Key | Type | Default | Description |
|---|---|---|---|
defaultVault | string | "Agent Secrets" | Default vault for tool calls |
tokenPath | string | ~/.openclaw/secrets/op-sa-token | Path to service account token file |
Security
- Service account tokens grant access only to specific vaults you configure
- The token file is
chmod 600… only the owning user can read it - Secret values are never logged, cached, or written to disk by the tool
op://references in config files are safe to commit to version control
Using 1Password in Your Own Projects
Option 1: Use theop CLI (simplest, any language)