agentskit.js

EncryptedMemoryOptions

Auto-generated API reference for EncryptedMemoryOptions.

Interface: EncryptedMemoryOptions

Defined in: encrypted.ts:15

Client-side encrypted ChatMemory wrapper. Keys never leave the caller — the backing store only ever sees an opaque \{ iv, ct \} payload stashed in metadata.ciphertext and metadata.iv; content becomes an empty string so rogue middleware can't peek at it either.

Uses Web Crypto (AES-GCM, 256-bit). Available on Node 20+ and all modern browsers. BYO key material — typically generated per-user during onboarding and stored only on their device.

#Properties

#aad?

optional aad?: Uint8Array<ArrayBufferLike>

Defined in: encrypted.ts:24

Optional AAD — content that binds ciphertext to context (user id, room).


#backing

backing: ChatMemory

Defined in: encrypted.ts:16


#getRandomValues?

optional getRandomValues?: <T>(array) => T

Defined in: encrypted.ts:22

Random source. Defaults to globalThis.crypto.getRandomValues.

#Type Parameters

T

T extends ArrayBufferView<ArrayBufferLike>

#Parameters

array

T

#Returns

T


#key

key: Uint8Array<ArrayBufferLike> | CryptoKey

Defined in: encrypted.ts:18

32-byte raw key (e.g. crypto.getRandomValues(new Uint8Array(32))).


#subtle?

optional subtle?: SubtleCrypto

Defined in: encrypted.ts:20

Override for tests. Defaults to globalThis.crypto.subtle.

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page