Skip to main content
Credentials are stored in ~/.action-llama/credentials/<type>/<instance>/<field>. Each credential type is a directory containing one file per field. Reference them in your agent’s config.toml by type name (e.g. "github_token") for the default instance, or use "type:instance" for a named instance (e.g. "git_ssh:botty").

Built-in Credentials

Agent runtime credentials

Webhook secrets

Infrastructure credentials

These are used by CLI commands (provisioning, deployment) and are not injected into agent containers.

How Credentials Work

  1. Configuration: List credential types in your agent’s config.toml:
  2. Storage: Credential values live in ~/.action-llama/credentials/<type>/<instance>/<field>. Each field is a plain text file.
  3. Injection: When an agent runs, the credentials it requires are made available at a credentials path and key values are injected as environment variables. In Docker mode, credentials are mounted at /credentials/<type>/<instance>/<field>. In host-user mode, they are staged to a temp directory (path set via AL_CREDENTIALS_PATH) and chowned to the agent user.
  4. Git identity: The git_ssh credential includes username and email fields (prompted during al new/al doctor). These are injected as GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL and GIT_COMMITTER_NAME/GIT_COMMITTER_EMAIL env vars at runtime, so git commit works without requiring git config.
  5. LLM credentials: The LLM credential (e.g. anthropic_key) does not need to be listed in the agent’s credentials array — it is loaded automatically based on the [models.*] config and mapped into the selected harness.

Named Instances

Each credential type supports named instances. For example, you could have webhook secrets for multiple GitHub orgs:
Or multiple SSH keys:
By default, just reference "git_ssh" — this resolves to the default instance. To use a named instance, use colon syntax: "git_ssh:botty".

Managing Credentials

al creds add

Add or update a credential interactively. Runs validation for the credential type (e.g. API key format, GitHub API check):

al creds rm

Remove a credential:

al creds ls

List all stored credentials grouped by type:

al creds types

Browse available credential types interactively. Shows all 26 built-in types with their fields, environment variables, and descriptions. Offers to add the selected credential immediately.

al doctor

Scan all agents in a project and prompt for any missing credentials:

During al new

The al new command prompts for the Anthropic credential during initial setup. Other credentials are configured per-agent by al doctor or al creds add.

Manually

Write credential files directly:

Anthropic Auth Methods

Three auth methods are supported:
  • api_key — Standard API key (sk-ant-api-...). Set authType = "api_key" in model config.
  • oauth_token — OAuth token (sk-ant-oat-...). Set authType = "oauth_token".
  • pi_auth — Use existing pi auth credentials (~/.pi/agent/auth.json). Set authType = "pi_auth". No credential file needed. This is only supported with the pi harness.

Webhook Secrets

Webhook secrets use named credential instances. For example, to set up a GitHub webhook secret for your org:
Or manually:
The gateway automatically loads secrets from all credential instances (e.g. github_webhook_secret:MyOrg, sentry_client_secret:MyOrg) and uses them to verify incoming webhook payloads. No global configuration is needed.

VPS Credential Sync

When deploying to a VPS, credentials are transferred to the remote server via SSH. The remote layout mirrors the local one: ~/.action-llama/credentials/{type}/{instance}/{field}. No external secrets manager is needed — same trust model as SSH access.

Troubleshooting

”Bad credentials” or “401 Unauthorized”

For GitHub tokens, ensure the token has the required scopes (repo, read:org, workflow).

Credential not found at runtime

Agents only receive credentials listed in their config.toml:
If a credential is missing from this list, the agent won’t have access to it. Add it and re-run.