Encrypted secrets management — securely store API keys, passwords, and credentials used by your agents.
For everyone: The Vault is a secure safe for all the passwords and API keys your AI agents need. Instead of putting credentials directly in agent configs (where they could be leaked), you store them in the Vault. The Vault encrypts everything so even if someone accesses the database, they can't read your secrets. Every time anyone looks at or changes a secret, it's logged.
For technical users: The Vault implements AES-256-GCM authenticated encryption with PBKDF2 key derivation (100,000 iterations). Each secret gets a unique random salt and initialization vector. The master encryption key is derived from AGENTICMAIL_VAULT_KEY in the .env file. Platform presets auto-name secrets as skill:<platform>:<key> for automatic discovery by agent tools. Full audit trail via /vault/audit-log.
skill:<platform>:<key> and decrypt them on demand.| Property | Value |
|---|---|
| Algorithm | AES-256-GCM (authenticated encryption with tamper detection) |
| Key Derivation | PBKDF2 with 100,000 iterations |
| Salt | Unique random salt per secret |
| IV | Unique random initialization vector per secret |
| Master Key | Derived from AGENTICMAIL_VAULT_KEY environment variable |
Platform preset secrets follow the naming pattern skill:<platform>:<key>:
skill:openai:access_token
skill:anthropic:access_token
skill:stripe:access_token
skill:stripe:webhook_secret
skill:aws:access_key_id
skill:aws:secret_access_key
Agent tools automatically discover and use secrets matching this pattern.
Click "Add Secret" to open the modal:
Click any secret in the table (or the eye icon) to open the view modal:
Click the trash icon and confirm. Deletion is permanent and immediately revokes access for any services using the secret.
The Vault includes presets for common platforms. Each preset auto-configures the secret name, category, and required fields:
| Platform | Category | Fields |
|---|---|---|
| OpenAI | Skill Credential | API Key (sk-...) |
| Anthropic | Skill Credential | API Key (sk-ant-...) |
| Google Cloud / Gemini | Skill Credential | API Key, OAuth Client ID*, OAuth Client Secret* |
| ElevenLabs | Skill Credential | API Key (xi_...) |
| Telegram Bot | Skill Credential | Bot Token |
| Slack | Skill Credential | Bot Token (xoxb-...), Signing Secret* |
| GitHub | Skill Credential | Personal Access Token (ghp_...) |
| Stripe | Skill Credential | Secret Key (sk_live_...), Webhook Secret* |
| SendGrid | Skill Credential | API Key (SG...) |
| Twilio | Skill Credential | Account SID (AC...), Auth Token |
| AWS | Cloud Storage | Access Key ID (AKIA...), Secret Access Key, Region* |
| Cloudflare | Skill Credential | API Token, Account ID* |
| Notion | Skill Credential | Integration Token (secret_...) |
| HubSpot | Skill Credential | Private App Token (pat-...) |
| SMTP / Email | Deploy Credentials | Host, Port*, Username, App Password |
| Database | Deploy Credentials | Connection String |
* = optional field
| Category | Color | Description |
|---|---|---|
| Deploy Credentials | Indigo | Infrastructure and deployment secrets (SMTP, database connections) |
| Skill Credentials | Green | API keys for agent tools (OpenAI, Slack, GitHub, etc.) |
| Cloud Storage | Blue | AWS, GCP, and other cloud provider credentials |
| API Keys | Amber | General-purpose API keys |
| Custom | Gray | User-defined secrets with custom names |
Rotating a secret re-encrypts it with a fresh salt and initialization vector without changing the actual credential value. This limits the window of exposure if encryption material is compromised.
Click the rotate icon on any secret, or use the "Rotate" button in the view modal.
Click "Rotate All" to re-encrypt every secret in the vault at once. Use after security incidents or as periodic hygiene.
The Audit Log tab records every vault operation. Each entry includes:
| Field | Description |
|---|---|
| Action | encrypt, decrypt, delete, rotate, migrate, read, create |
| Secret | Name or ID of the secret accessed |
| Actor | User or system that performed the action |
| Timestamp | When the action occurred |
| Details | Additional metadata (IP address, etc.) |
Features:
The Status tab shows:
| Method | Endpoint | Description |
|---|---|---|
| GET | /vault/secrets?orgId= | List all secrets (metadata only, not decrypted) |
| POST | /vault/secrets | Create/encrypt a new secret |
| GET | /vault/secrets/:id | Decrypt and retrieve a secret value |
| DELETE | /vault/secrets/:id | Permanently delete a secret |
| POST | /vault/secrets/:id/rotate | Re-encrypt a single secret |
| POST | /vault/rotate-all | Re-encrypt all secrets |
| GET | /vault/audit-log | Query audit log (supports search, action filter, pagination) |
| GET | /vault/status | Vault status and statistics |
POST /vault/secrets
{
"orgId": "org-123",
"name": "skill:openai:access_token",
"value": "sk-...",
"category": "skill_credential"
}
The AGENTICMAIL_VAULT_KEY in your .env may have changed or been corrupted. If you migrated to a new machine, ensure you copied the exact same .env file. Secrets encrypted with a different key cannot be recovered.
Verify the secret follows the skill:<platform>:<key> naming convention. Check the secret name in the vault list — it must match exactly what the agent tool expects.
The AGENTICMAIL_VAULT_KEY environment variable is missing. Add it to ~/.agenticmail/.env and restart the server.
Check the actor column for the user or system that accessed the secret. Review user permissions on the Users page and consider restricting Vault access to fewer users.
Some secrets may have been rotated while others weren't. Check the audit log for which secrets were rotated successfully, then manually rotate the remaining ones.