op:// references, the same format you already use in CI/CD pipelines and .env files. For an overview of all supported vault integrations, see External Vaults.
This integration is in beta. Setup and behavior may change between releases.
Prerequisites
- OneCLI running locally or via Docker
- A 1Password Service Account with access to the vaults containing your secrets
- The
op://references for the secrets you want agents to use (e.g.op://API Keys/Anthropic/credential)
Setup
1
Get your Service Account token
In 1Password, go to Developer > Service Accounts and create a new service account (or use an existing one). Grant it read access to the vaults your agents need. Copy the token. You’ll paste it in the next step.
2
Connect in the dashboard
Open the OneCLI dashboard > Secrets page > 1Password card. Paste your Service Account token and click Connect.OneCLI validates the token, encrypts it (AES-256-GCM), and stores it. The plain-text token is never written to disk.
3
Add hostname mappings
Map each API hostname to an
op:// reference pointing to the secret in your vault:You can add mappings in the dashboard or via the API:
4
Test it
Make a request through the gateway with your agent’s access token:The gateway resolves
op://API Keys/Anthropic/credential from 1Password and injects it as the x-api-key header. Your agent never sees the key.How credentials are resolved
When an agent makes a request and no server-stored secret matches the target host, the gateway checks for a 1Password mapping:- The gateway looks up the hostname in the mapping table
- The
op://reference is resolved via the 1Password SDK using the stored Service Account token - The resolved value is injected as an HTTP header and forwarded to the service
- Resolved values are cached in memory for 60 seconds, then discarded. They are never written to the database.
op:// reference format
1Passwordop:// references follow the pattern:
op://API Keys/Anthropic/credentialpulls the “credential” field from the “Anthropic” item in the “API Keys” vaultop://Dev Tokens/GitHub/tokenpulls the “token” field from the “GitHub” item in the “Dev Tokens” vault
Managing mappings
Troubleshooting
Connection fails with 'invalid token'
Connection fails with 'invalid token'
Make sure you’re using a Service Account token (starts with
ops_), not a personal API token. Verify the service account hasn’t been deactivated in 1Password.Secret resolution returns 'not found'
Secret resolution returns 'not found'
Check that the
op:// reference is correct: vault name, item name, and field name must match exactly (case-sensitive). Also verify the service account has read access to the vault.Credentials not injected after adding a mapping
Credentials not injected after adding a mapping
Resolved values are cached for 60 seconds. If you just rotated a secret in 1Password, wait for the cache to expire or restart the gateway to force a fresh resolution.
macOS: 'would like to access data from other apps' dialog
macOS: 'would like to access data from other apps' dialog
If you’re running OneCLI locally on macOS Sequoia or later, you may see a system dialog about accessing data from other apps. Grant Full Disk Access to your terminal application (System Settings > Privacy & Security > Full Disk Access). This is a one-time setup that persists across sessions.