Core concepts
Branches
Organize knowledge by client, project area or workstream.
A branch is a logical partition of retained knowledge. It lets related work share a project while retrieval focuses on the relevant area.
Reading a branch
The scoped SDK recall method accepts a branch name. It retrieves that branch and shared, unfiled knowledge. Omitting the branch searches the user's whole scoped workspace, which supports questions spanning multiple branches.
const memory = client.scope(authenticatedUserId);
const hits = await memory.recall("What did we agree?", 8, {
branch: "client-acme",
});Filing knowledge
A stored statement can belong to multiple branches without duplicating its text. Use branch names that describe the work rather than transient sessions.
await memory.store(
[{ statement: "The pilot starts October 8." }],
"acme-pilot-date-v2",
{ branches: ["client-acme"] },
);Scope is not identity
Derive the scoped user identifier from an authenticated server-side session. Branch organization does not replace user authorization. See authentication.