@personaai/sdkv0.9.0

memory — @personaai/sdk

Generated field tables for memory — do not edit

Generated from sdk/typescript/dist/typedoc.json — do not edit. Regenerate with node platform/scripts/typedoc-resources.mjs.

memory

Auth: Requires Authorization: Bearer <keyId>.<secret> (server-side). For per-user calls add x-persona-external-user-id. See .

Memory is a file-based store: /memories/user/ (shared) and /memories/agent/ (per user-agent). Agents read/write via write_file/read_file.

Example

TypeScript

ts
const list = await userClient.memory.list();await userClient.memory.writeFile({ path: '/memories/user/preferences.md', content: '# Likes\n- concise answers' });

cURL

bash
curl https://api.persona.hasanraiyan.me/api/v1/developer/memory/file?path=/memories/user/preferences.md \  -H "Authorization: Bearer $PERSONA_CREDENTIAL" -H "x-persona-external-user-id: user_123"

Response

json
{  "success": true,  "data": { "path": "/memories/user/preferences.md", "content": "# Likes" }}

MemoryFile

Mirrors memory.service.js's _toFileDto — the wire shape for one memory file.

Source: types/memory.ts:2

Interface

FieldTypeDescription
scope"user" | "agent"— _ types/memory.ts:3_
agentId?stringSet when scope is 'agent'. — _ types/memory.ts:5_
pathstring— _ types/memory.ts:6_
contentstring— _ types/memory.ts:7_
mimeTypestring— _ types/memory.ts:8_
createdAtstring— _ types/memory.ts:9_
updatedAtstring— _ types/memory.ts:10_

MemoryAgentGroup

One agent's group of agent-scoped memory files, as returned by memory.list().

Source: types/memory.ts:14

Interface

FieldTypeDescription
agentIdstring— _ types/memory.ts:15_
agentNamestring | nullnull if the Agent no longer exists. — _ types/memory.ts:17_
filesMemoryFile[]— _ types/memory.ts:18_

MemoryListResult

GET /api/v1/developer/memory — every memory file for the asserted external user.

Source: types/memory.ts:22

Interface

FieldTypeDescription
userFilesMemoryFile[]— _ types/memory.ts:23_
agentMemoriesMemoryAgentGroup[]— _ types/memory.ts:24_

MemoryFileScopeParams

Source: types/memory.ts:27

Interface

FieldTypeDescription
scope?"user" | "agent"— _ types/memory.ts:29_
agentId?stringRequired when scope is 'agent'. — _ types/memory.ts:31_

GetMemoryFileParams

Source: types/memory.ts:34

Interface

FieldTypeDescription
scope?"user" | "agent"— _ types/memory.ts:29_
agentId?stringRequired when scope is 'agent'. — _ types/memory.ts:31_
pathstring— _ types/memory.ts:35_

WriteMemoryFileInput

Source: types/memory.ts:38

Interface

FieldTypeDescription
scope?"user" | "agent"— _ types/memory.ts:29_
agentId?stringRequired when scope is 'agent'. — _ types/memory.ts:31_
pathstring— _ types/memory.ts:39_
contentstring— _ types/memory.ts:40_

DeleteMemoryFileParams

Source: types/memory.ts:43

Interface

FieldTypeDescription
scope?"user" | "agent"— _ types/memory.ts:29_
agentId?stringRequired when scope is 'agent'. — _ types/memory.ts:31_
pathstring— _ types/memory.ts:44_