Apply SPM memory practices
After this page you can save, ask and verify memory through https://api.spmos.ai/mcp without wasting recall seats.
Prerequisite: Configure an MCP client or a compatible proxy.
- Save durable facts before asking SPM to recall them.
Save useful memory
Save preferences, project decisions, account constraints, recurring workflows, and facts that will matter later. Do not save passwords, access tokens, one-time debugging output, or another user’s content.
Keep each person, workspace, customer, production environment, and test environment in a separate account or namespace. A namespace is an isolation label, not access control.
Use remember for a fact that a future session should find. Make it specific, actionable, scoped, and time-aware. Avoid vague entries such as “we discussed the project.”
Example payload:
{
"text": "For the Polaris project, run focused tests before a full suite.",
"topic": "polaris-workflow",
"idempotency_key": "polaris-change-policy-2026-09"
}
Use a stable idempotency_key when retrying the same write; it prevents duplicate writes.
When a decision changes, save the new state and explain the scope of the old one:
I now prefer TypeScript for frontend work; the earlier JavaScript preference applied only to the legacy dashboard.
Ask one focused recall question
A good recall names one fact, its subject, and the condition that affects the answer. Split multi-part work into one recall per premise.
- Good: “What deployment checks are required before changing the Polaris project?”
- Too broad: “Tell me about the Polaris project.”
- Too narrow:
deployment checks - Two intents: “What checks are required before changing Polaris, and who approved the budget?”
Do not add padding such as “Please tell me.” Ask in the language used to save the memory when possible. Use a small top_k for simple questions and increase it only when several facts are needed.
SPM may refuse with unknown when there is nothing to judge, or insufficient when candidates do not prove the claim. Treat that as a useful result, not as permission to guess. If a compound recall refuses, split it before broadening it.
Choose an interface
Use MCP when your agent can call tools directly:
rememberdurable facts.recallwhen earlier context matters.readfor exact source text or provenance.deletewhen a source must be removed.statuswhen you need readiness without loading content.
The usual path is recall, then read. Pass returned read_tokens[] or source_ids[] exactly as returned. Do not invent identifiers. Send read tokens as an array, batch them when possible, and call read soon because tokens are short-lived. Treat expired or invalid tokens as not_found.
Use Hosted Provider Proxy when an OpenAI- or Anthropic-compatible application already has a model endpoint. Keep the application credential and SPM credential separate. Inspect the request receipt when comparing cost or latency.
Use Local Proxy when the provider credential must stay on your machine. It is a credential-custody option, not an offline memory database; lookup and eligible saved text still use hosted SPM.
Keep context small
Ask for the smallest trustworthy context that lets the agent act correctly. Verify that every premise your task depends on is covered by returned evidence. More memory can bury the relevant fact and increase input cost.
Proxy auto-capture is convenient, but tool output, generated code, logs, and repeated summaries are provisional unless they contain a supported user decision or fact. Exclude sensitive or transient work, save final decisions explicitly with remember, and delete a source captured by mistake.
Handle errors and provenance
unknownorinsufficient: rephrase, save the fact explicitly, or proceed without memory.not_foundfromread: run a freshrecall.- Memory data plane unavailable: retry with backoff; avoid tight loops.
BACKPRESSURE: wait for the indicated retry window.- Stale session or access denied: refresh the session and verify credential scope.
A successful HTTP response does not prove that the requested fact was found. Check the status, evidence count, and evidence references. supported means the support gate passed; it does not independently prove the saved statement or every premise of your task.
Use read when you need exact wording, resolve ambiguity, or need an audit trail. Copy evidence_refs[].read_token exactly. A direct source-ID read still enforces access checks.
Protect users and credentials
Use separate namespaces and credentials for different users. Never rely on a prompt instruction for isolation. Store SPM keys in a secret manager or protected environment variable. Do not commit keys, read tokens, or full source text to Git, tickets, or logs. Use separate keys for development, evaluation, and production, and grant only the scopes a client needs: memory:read, memory:write, or deletion.
For an application serving many people, one SPM key can route each person with user_partition. Enable memory:partition and pass the same partition on every remember, recall, and read call:
{
"text": "I prefer concise status updates.",
"idempotency_key": "user-123-status-style-2026-09",
"user_partition": "user-123"
}
status and delete do not accept user_partition; use returned source IDs instead. Your application must authenticate users and authorize partition and source-ID access. A partition-capable application key is not end-user authorization.
Test that a user can see their own memory, another user cannot see it, and an unpartitioned request does not become a shared catch-all. Treat the tenant’s default space as a separate intentional shared area. A tenant is an isolated customer or account boundary.
Measure quality honestly
Keep a private test set with answerable questions, unsupported questions, wrong-attribute questions, changed or deleted facts, and multi-premise questions. Track useful evidence, safe UNKNOWN responses, unsupported evidence, cross-user leakage, latency, provider token cost, and the complete recall-then-read flow. A system that invents support is worse than one that honestly says UNKNOWN.
A reliable daily workflow is: use the correct account and namespace, recall only what matters, accept unsupported results, read for exact wording, remember durable decisions, delete accidental sources, and inspect receipts when cost or latency changes.
Correct and review memory
Use the owner-control surfaces when a fact changes. Edit a source in place while keeping its previous text as a version, attach feedback to the source, and review lessons through pending, verified, and rejected states. Commit a session as a summary plus turns before distilling it into pending lessons. Keep the original evidence and verify a lesson before treating it as durable memory.
For long-running agents, use reusable delegated keys only with the narrowest scopes, a short TTL, depth no greater than 3, and team confinement when shared partitions are involved. Membership alone does not grant authorization.
Verify
Watch the same thing in the console: Recall playground — sign in with the same account.
spm doctor
Expected: ready.