Skip to main content

Vault

The Anima Vault gives each agent an isolated, encrypted credential store. Use it to hold website logins, API keys, payment card details, and identity data — so agents can authenticate with external services at runtime without secrets ever appearing in your code or environment variables.

Provision a vault

Before an agent can store credentials, provision its vault:
from anima import Anima

anima = Anima(api_key="ak_...")

anima.vault.provision(agent_id="ag_01abc123")
Check vault status at any time:
status = anima.vault.status(agent_id="ag_01abc123")
print(status.provisioned)  # True

Credential types

TypeFieldsUse case
loginusername, password, URIs, TOTPWebsite logins
secure_notenotesAPI keys, tokens, free-form secrets
cardcardholder, number, expiry, CVVPayment card details
identityname, email, phone, addressPersonal or business identity data

Create a credential

credential = anima.vault.create_credential(
    agent_id="ag_01abc123",
    name="CRM Login",
    type="login",
    username="bot@company.com",
    password="s3cur3-p4ssw0rd",
    uris=["https://crm.company.com"],
)
print(credential.id)

Get a credential

cred = anima.vault.get_credential(
    agent_id="ag_01abc123",
    credential_id=credential.id,
)
print(cred.username, cred.password)

List credentials

all_creds = anima.vault.list(agent_id="ag_01abc123")
for c in all_creds:
    print(f"{c.name} ({c.type})")

Search credentials

results = anima.vault.search(
    agent_id="ag_01abc123",
    query="crm",
)

Update a credential

anima.vault.update_credential(
    agent_id="ag_01abc123",
    credential_id=credential.id,
    password="new-p4ssw0rd",
)

Delete a credential

anima.vault.delete_credential(
    agent_id="ag_01abc123",
    credential_id=credential.id,
)

TOTP

For credentials that have a TOTP secret configured, retrieve the current one-time code:
totp = anima.vault.get_totp(
    agent_id="ag_01abc123",
    credential_id=credential.id,
)
print(totp.code)  # 6-digit code valid for the current 30-second window

Password generation

Generate a strong password before creating a new account:
password = anima.vault.generate_password(
    length=24,
    uppercase=True,
    lowercase=True,
    numbers=True,
    special=True,
)
print(password.value)

Deprovision

Remove an agent’s vault and all stored credentials:
anima.vault.deprovision(agent_id="ag_01abc123")
Deprovisioning is permanent. All credentials in the vault are deleted and cannot be recovered.

Security

  • All credentials are encrypted at rest using AES-256-GCM.
  • Each agent’s vault is fully isolated — one agent cannot access another agent’s credentials.
  • Vault access is scoped to the agent’s API key.