scope and
project.
Use scope when your API key serves more than one user, tenant, organization, or
workspace. Use project when you want to group related memories inside that
scope.
For Context Vault, there is one additional field: workspaceId. The workspace
is the hard company/team boundary. scope is a hard lane inside that workspace.
project is a soft grouping inside the selected scope.
Scope
scope is the isolation key. A search with one scope only returns memories saved
with that same scope.
user_123org_acmeworkspace_42tenant_kakiyo
scope, the memory belongs to the default area for that API key.
Named scopes are not included unless you pass that scope again during search,
update, delete, feedback, or history calls.
Project
project is a filter inside the selected scope. It is useful for product areas,
repositories, support queues, or customer workspaces.
Context Vault Semantics
For company knowledge bases:| Field | Meaning | Example |
|---|---|---|
workspaceId | Hard company, team, customer, or tenant boundary | acme_workspace_id |
scope | Hard lane inside the workspace | hr, engineering, billing |
project | Soft grouping inside the scope | onboarding, api-platform |
scope when retrieving the wrong lane would be risky. Use project when
you only need a helpful filter or collection label.
Context Vault search also supports multi-scope retrieval with scopes.
scopes is provided, MemContext searches those named lanes inside the
workspace. It does not search other workspaces.
Which Field Should I Use?
| Need | Use | Example |
|---|---|---|
| Separate end users | scope | user_123 |
| Separate customer tenants | scope | tenant_acme |
| Separate internal workspaces | scope | workspace_support |
| Group a codebase, app, or workflow | project | dashboard, api, crm |
| Search all default memories for key | omit both | no scope, no project |
Common Patterns
For a SaaS product:scope on save and search:
