Vault
The Anima Vault provides encrypted credential storage for AI agents, with a critical security guarantee: the LLM never sees raw secrets. Each agent gets its own isolated, per-agent-encrypted vault for logins, API keys, payment cards, and identity data. Agents reference credentials through opaque tokens, and the CLI or browser extension performs the last-mile substitution at execution time.Overview
Agents often need to authenticate with external services — CRMs, booking platforms, merchant sites. The vault stores these credentials securely and makes them available to the agent at runtime, without exposing secrets in code, environment variables, or the model’s context. The core idea:Use, never see
Every agent surface reads credentials masked; there is no reveal path an agent can call. Agents exercise secrets through three mechanisms, all of which keep the plaintext out of the model:- Server-side use — Anima makes the outbound call and injects the credential on the server; the secret never reaches the agent’s host.
- Browser autofill — the extension fills logins directly into web forms.
- Local injection —
anima vault exec/anima vault proxysubstitute secrets into a local process at the last moment (see below).
brokered credentials are use-only for everyone, forever. And when an agent needs a secret it doesn’t have, it asks a human through credential requests instead of chat.
Provisioning
Before an agent can store credentials, its vault must be provisioned:Credential Types
CRUD Operations
Create a credential
Create a login with a generated password
For account provisioning, don’t supply a password at all — ask the vault to generate one server-side in the same call. The password is created inside the vault, stored with the credential, and never returned: the response carries only the credential ref with masked fields. Your code (and, for MCP agents, the model’s context) never sees the secret.length (8–128, default 24) and the character-class
toggles uppercase / lowercase / number / special (all default true).
generatePassword is only valid for login credentials and is mutually
exclusive with login.password.
At fill time — for example when the Anima Chrome extension signs in to
provision an account — the agent mints a single-use, audit-logged vault token
(POST /vault/token, scope autofill) and exchanges it for the credential
(see Ephemeral Tokens below). The plaintext is revealed
exactly once, to the component that needs it.
Retrieve a credential
List and search
Update and delete
REST endpoints
TOTP Support
For credentials with TOTP (Time-based One-Time Password) configured:Password Generation
For agent flows, prefer the atomic create-with-generated-password above — it generates and stores the password in one call and never returns the plaintext. The standalone generator remains available for interactive use. Note that it returns the generated password to the caller, so it should not be used in flows where the secret must stay inside the vault:Credential Sharing
Share a credential from one agent to another, with a scoped permission and optional expiry. Sharing is one credential to one target agent at a time.POST /vault/share takes credentialId, sourceAgentId, targetAgentId, a permission, and either expiresAt or expiresInSeconds. Revoke with a shareId.
Permissions:
Ephemeral Tokens
An ephemeral token is a short-lived, single-use handle to a credential. The agent puts the token in a command; the CLI or extension exchanges it for the real value at the moment of execution.POST /vault/token takes credentialId, a scope, and an optional ttlSeconds (and agentId / taskId). The token value (vtk_<hex>) is returned only at creation time.
Scopes:
Token security:
- Tokens use the
vtk_prefix with 32 bytes of entropy. - Only the token’s hash is stored — the raw token is never persisted.
- Tokens are single-use: consumed on first exchange.
- Configurable TTL (10–3600 seconds).
- Scope-bound: a token scoped to
autofillcannot be used forexport.
Secret Redaction
Output from any command that used injected credentials is scanned and redacted before it returns to the LLM, so a secret that appears in a response body or error message never lands in the model’s context.anima vault redact fetches the agent’s credentials, replaces any matching secret value in stdin with [REDACTED], and can take extra literal strings via --pattern.
Template Substitution
For structured references inside a block of text, use the template syntax and let the CLI resolve it at execution time:{{vault:...}} templates (and vtk_ tokens) in input and exchanges them for real credentials before the command runs.
Zero-Knowledge Execution
Ephemeral tokens, template substitution, and redaction protect against accidental plaintext exposure. For a tighter boundary — where the agent authors the call but can never read the secret — the CLI adds a set of execution primitives. All resolve credentials through SecretRef &anima.json.
anima vault exec
Run a subprocess with resolved secrets injected as environment variables. The agent writes the command; the CLI resolves the anima.json references and spawns the child — the model’s context never sees the values. Output is scrubbed by the redaction engine.
anima vault proxy
A loopback-only HTTPS proxy that injects an Authorization header into outbound requests. The agent holds only a short-lived proxy token (pxt_); the credential lives in the CLI process and is never reachable from the network. Requests to any host not on --allow-host are rejected.
anima vault agent (keystroke injection)
A local daemon that binds to a Unix socket (mode 0600) and — on a user-confirmed hotkey — types a credential into the focused text field. Useful for apps that can’t take a proxy, such as desktop SSH clients or native database UIs.
Revealing plaintext
The CLI never prints secret plaintext.anima vault get always masks secret fields — there is no --unmask flag and no unlock command. To actually view a secret, a human uses the Anima console, where a reveal is audited and step-up gated. Agents and automation should use secrets, never read them: autofill via the browser extension, local injection via anima vault exec / anima vault proxy, or the server-side broker via anima vault use.
anima vault audit
Scan the filesystem for leaked secrets, cross-referenced against the vault inventory. High-confidence key patterns are flagged by heuristic; literal values that match a stored credential are flagged by exact comparison.
MCP vault tools never return plaintext to the model. They hand back a plan that a trusted local process (the CLI, the extension, or the keystroke daemon) executes — the LLM composes intent, and the local process enforces the secret boundary.
Browser Extension
The Anima browser extension performs vault credential autofill for login forms, so an agent can log in without the password ever entering its context:- The agent stores credential data ephemerally.
- The agent asks the extension to fill the detected login form.
- The extension detects the username, password, and TOTP fields.
- Credentials are injected and immediately zeroized from memory.
Access Log
Every credential access — token mints,exec invocations, and masked reads — is recorded in the vault audit log.
Deprovision
Remove an agent’s vault and all stored credentials:Security
- All credentials are encrypted at rest with AES-256-GCM.
- Each agent’s vault is isolated, with its own per-agent encryption key — agents cannot access each other’s credentials.
- Vault access is scoped to the agent’s API key.
- Credential reads are masked by default; plaintext access requires a master-key
reveal(audit-logged) or a single-use vault token exchange. - Vault-generated passwords never appear in any API response, audit log, or webhook payload — only the credential ref leaves the vault.
- See Encryption for the per-agent key-derivation model, and SecretRef &
anima.jsonfor the reference schema used byexecandproxy.
