For masked API-key and subscription-token access, abx keeps a reference to your secret, never the secret itself. Use this page to pick a provider, write its URI, and see what the host needs for it to work.
abx auth set <agent> --from URI saves the reference in $ABX_HOME/config.toml (~/.abx/config.toml by default). The value is read just before a VM starts. config.toml is the only file in the home meant for editing, and an older ~/.config/agent-box/config.toml is not read.
abx auth set claude --provider anthropic --mode api-key --from 'op://Development/Anthropic/api-key'
abx auth verify claude
abx claude service-taskA masked credential is usable only after abx auth verify has passed for the active image.
Supported schemes
| Scheme | Syntax | Host tool |
|---|---|---|
keyring:// |
keyring://ACCOUNT |
security (macOS), secret-tool (Linux) |
op:// |
op://VAULT/ITEM/FIELD |
op (1Password CLI) and /usr/bin/awk |
pass:// |
pass://ENTRY |
pass |
gopass:// |
gopass://ENTRY |
gopass |
sops:// |
sops://ABSOLUTE-FILE#KEY |
sops |
systemd-creds:// |
systemd-creds://NAME or systemd-creds:///ABSOLUTE-FILE |
systemd-creds (Linux only) |
References are at most 1024 characters, with no control characters. Entries cannot start with -, contain a backslash, or contain empty, . or .. path segments. A resolved secret must be non-empty, contain no control characters and be at most 8 KiB. Provider output is capped at 256 KiB and each provider command times out after 120 seconds.
Trusted executables and environment
abx resolves provider executables from fixed system directories, never from PATH: /usr/bin, /bin and /usr/local/bin on Linux, plus /opt/homebrew/bin on macOS. A provider runs with a scrubbed environment and only the variables it needs are forwarded:
| Provider | Variables forwarded from the host |
|---|---|
pass, gopass |
GPG_TTY, GNUPGHOME, PASSWORD_STORE_DIR |
secret-tool, gdbus |
DBUS_SESSION_BUS_ADDRESS |
systemd-creds |
CREDENTIALS_DIRECTORY |
op |
OP_SERVICE_ACCOUNT_TOKEN, OP_CONNECT_HOST, OP_CONNECT_TOKEN |
sops |
GNUPGHOME, SOPS_AGE_KEY, SOPS_AGE_KEY_FILE, AWS_PROFILE, AWS_REGION, GOOGLE_APPLICATION_CREDENTIALS |
Every provider also receives HOME, a fixed PATH, and LOGNAME, USER, XDG_CONFIG_HOME and XDG_RUNTIME_DIR when set.
Providers
keyring
keyring://ACCOUNT reads a generic password stored under the service agent-box. The account must start with a letter, digit or _, and may then contain letters, digits, _, ., :, / and -.
- macOS: the macOS Keychain, through
security. - Linux: the Secret Service, through
secret-tool. It is an optional dependency.abxrequires an already-running, unlockedorg.freedesktop.secretsservice on the session bus named byDBUS_SESSION_BUS_ADDRESS, checked throughgdbus. Without one, for example over headless SSH, the command fails.
1Password
op://VAULT/ITEM/FIELD needs at least three path segments. abx runs op run --no-masking once for all 1Password references. The 1Password service-account and Connect variables listed above are forwarded, so unattended use is possible with them.
pass and gopass
pass://ENTRY uses the first line of pass show ENTRY. gopass://ENTRY uses gopass show -o ENTRY. Both depend on GnuPG, so the key must be reachable without an interactive pinentry when abx runs unattended.
SOPS
sops://ABSOLUTE-FILE#KEY decrypts the file with sops decrypt --output-type=json and reads one top-level string key from the result. The path must be absolute and the key must be non-empty and must not contain #. Each file is decrypted at most once per batch.
abx auth set claude --provider anthropic --mode api-key --from 'sops:///home/me/secrets.enc.json#anthropic'systemd-creds
systemd-creds://NAME reads a named user credential with systemd-creds --user cat. systemd-creds:///ABSOLUTE-FILE decrypts a credential file with systemd-creds --user decrypt. A name starts with a letter, digit or _ and then contains letters, digits, _, . or -.
This provider is Linux only, and the installed systemd must support --user. Debian 12 (systemd 252) does not.
Without --from: prompts
If you omit --from for a mode that has a verification probe, abx auth set stores the secret in the OS keyring itself and saves keyring://<agent>:<provider>:<mode> as the reference. It prompts on the terminal, so both stdin and stderr must be a terminal. Otherwise it fails with Keyring setup requires a terminal. Supply --from to save a provider reference.
abx auth set claude- macOS:
security add-generic-passwordprompts for the secret and stores it in the Keychain. - Linux:
secret-tool storeprompts for it. This needs the unlocked Secret Service described above. Without one,abx auth setfails and suggests--from pass://store/entryor--from sops:///path/to/secrets.enc.json#key.
For Claude, the default mode is oauth-token, so abx auth set claude prompts for a claude setup-token token and saves keyring://claude:anthropic:oauth-token. Pass --mode api-key for an Anthropic API key.
Choosing a provider
- macOS desktop:
keyring://(the prompt flow above) is the simplest. - Linux headless or SSH hosts: use
pass://,gopass://,sops://orop://. Usesystemd-creds://only where the installed systemd supports--user. - Linux desktop with an unlocked session:
keyring://works through the Secret Service.
--from does not apply to ChatGPT logins for Codex, Pi and OpenCode. Those are native logins that abx stores under $ABX_HOME/profiles/host/; see host-managed login.