Encrypt stored values
AES-256-GCM protects the stored content and checks that encrypted data has not been altered.
Vault memory stores credentials, tokens, and other sensitive values with encryption and controlled access. Keep them separate from ordinary conversation memory, and let authorized parts of your application retrieve them when needed.
Vault memory
Scheduling integration
Return a sensitive value only to the authorized operation. Keep it out of casual conversation and logs, and review vault access.
Example permission check with no stored credential. Connect access rules and key custody to your deployment.
An agent may need a service credential to do its work. The vault gives that credential a named, encrypted record with a sensitivity level, so access can be managed separately from the rest of its memory.
AES-256-GCM protects the stored content and checks that encrypted data has not been altered.
Mark entries by sensitivity so your application can apply the appropriate access policy.
Connect the vault’s encryption keys to the key management and lifecycle policies for your deployment.
Keep a record reference for authorized operations, and handle decrypted values only within your application’s protected execution path.
The vault engine records operations for auditing, including access and security events.
The secure vault interface checks user permissions and clearance before allowing operations.
Use a signed capability scoped to vault writes. This server-side example stores an internal-sensitivity value and keeps its returned record ID for later reference.
// Run server-side with credentials scoped to this Mind.
const endpoint = process.env.AKASHA_URL;
const capability = process.env.AKASHA_CAPABILITY;
if (!endpoint || !capability) throw new Error("Configure your Mind connection");
async function request(method: string, path: string, body?: unknown) {
const headers: Record<string, string> = {
"Content-Type": "application/json",
"x-akasha-capability": capability!,
};
if (process.env.AKASHA_TOKEN) {
headers.Authorization = "Bearer " + process.env.AKASHA_TOKEN;
}
const response = await fetch(new URL(path, endpoint), {
method, headers,
body: body === undefined ? undefined : JSON.stringify(body),
});
if (!response.ok) throw new Error("Mind request failed: " + response.status);
return response.json();
}
const value = process.env.SERVICE_CREDENTIAL;
if (!value) throw new Error("Supply the credential from your secret store");
const stored = await request("POST", "/v1/memory/vault", {
key: "service.credential",
data_b64: Buffer.from(value, "utf8").toString("base64"),
sensitivity: "internal",
});
// Keep stored.id as the reference. Do not log the credential.
// Base64 is transport encoding; the vault engine handles encryption.Use a dedicated vault for the credentials and protected values behind your agent’s work.