How secrets are stored
Secrets are key-value pairs where both the key and the value are strings. Values are encrypted before being written to Infisical. Agentity stores only ciphertext and never has access to your plaintext values at rest.All vault secrets are encrypted at rest. Agentity stores only encrypted ciphertext.
Initialization
You must initialize a vault before you can write secrets to it. Callinitialize_vault with the agent’s agentId before calling save_secret_to_vault. Attempting to write a secret to an uninitialized vault returns an error.
Available operations
All vault operations are available as MCP tools:| Tool | Description |
|---|---|
initialize_vault | Creates an isolated vault namespace for the agent. Must be called once before any other vault operation. |
save_secret_to_vault | Writes an encrypted key-value secret to the agent’s vault. |
get_secret_from_vault | Reads and decrypts a secret from the agent’s vault by key. |
agentId and an intent object. The intent is recorded in your audit log.
Common use cases
- Virtual card details — Store
pan,cvv,exp_year, andexp_monthimmediately after callingcreate_agent_identity. - API credentials — Save third-party API tokens the agent needs to operate.
- Session tokens — Persist short-lived tokens between agent runs.
- Any sensitive string — Anything you would not want stored in plaintext.