Memory Scope
Every memory in AtomicMemory belongs to a scope. Scope is how the engine knows which user’s, agent’s, or application’s memories to read from and write to. Without a scope, the SDK rejects the request — there is no default global namespace. A scope is an object with up to four fields. At least one must be provided:| Field | Type | Description |
|---|---|---|
user | string | The end user this memory belongs to. Typically a user ID or username. |
agent | string | The agent identity, useful when multiple agents serve the same user. |
namespace | string | A logical partition — e.g. an application name or tenant ID. |
thread | string | A specific conversation thread, for session-scoped memories. |
{ user: 'alice', namespace: 'my-app' } and search under { user: 'alice' }, you may get results from other namespaces. Keep scopes consistent across your application for predictable retrieval.
Ingestion
Ingestion is how memories are created. You pass a conversation — a list of role/content messages — and AtomicMemory extracts structured facts, deduplicates them against what’s already known, and stores the result. There are two ingest modes with different performance and fidelity trade-offs.Full ingest — extraction + AUDN-SC mutation
Full ingest — extraction + AUDN-SC mutation
Endpoint:
POST /v1/memories/ingestFull ingest is the standard path. It runs the entire ingestion pipeline:- Extraction — the LLM reads the conversation and extracts discrete factual claims (e.g. “Alex prefers TypeScript”, “Alex lives in Berlin”).
- AUDN-SC mutation — each claim is classified against the existing memory store (see the section below).
- Storage — claims are written, updated, versioned, or discarded according to the mutation decision.
Quick ingest — embedding deduplication only
Quick ingest — embedding deduplication only
Endpoint:
POST /v1/memories/ingest/quickQuick ingest skips extraction and mutation. It embeds the input directly and uses embedding similarity to detect near-duplicates before writing. It is faster and cheaper per call, but it does not understand the semantic meaning of a claim or how it relates to existing memories.Use quick ingest for high-volume, low-stakes capture where speed matters more than memory coherence — for example, logging raw tool outputs or large batches of reference text.AUDN-SC Mutation
When you run a full ingest, AtomicMemory’s engine evaluates every extracted claim against the existing memory store and assigns it one of six mutation labels. This is what keeps your memory store accurate over time instead of growing into a pile of stale and contradictory facts.Add
The claim is new information not yet in the memory store. It is stored as a new memory record.
Update
The claim modifies an existing memory — for example, a user correcting a previously stated preference. The existing record is updated in place.
Delete
The claim indicates that a previously stored memory should no longer be considered true. The record is marked as removed.
No-op
The claim is already accurately represented in the memory store. No change is made.
Supersede
A newer claim replaces an older one. The original record is versioned and marked as superseded; the new claim becomes the current fact. Lineage is preserved.
Clarify
The claim adds nuance or detail to an existing memory without contradicting it. The existing record is enriched rather than replaced.
Claims that cannot pass integrity checks before mutation are assigned a
SKIP sentinel and excluded from the store. This keeps the mutation pipeline fail-closed — ambiguous or malformed claims never silently corrupt your memory state.Retrieval
Memory retrieval returns a ranked list of memories whose content is semantically relevant to your query. All retrieval is scoped the same way as ingestion: pass the same scope fields you used when writing memories. AtomicMemory supports two search modes:- Hybrid search
- Fast search
Endpoint:
POST /v1/memories/searchHybrid search combines vector similarity (semantic matching) with BM25/full-text scoring, then fuses the rankings using Reciprocal Rank Fusion (RRF). This gives you the best of both worlds: semantic recall for paraphrased or conceptually related queries, and keyword precision for exact terms.Hybrid search is the default and recommended mode for most applications.Providers
The SDK is backend-agnostic. You configure one or more providers at initialization time, and all memory operations route through the provider interface. This means you can swap backends — or run multiple in parallel — without changing your application logic. AtomicMemory currently ships two built-in providers:atomicmemory
The HTTP adapter for AtomicMemory Core. This is the recommended provider for all new integrations. Supports the full feature set: full ingest, hybrid search, AUDN-SC mutation, and tiered context packaging.
mem0
An HTTP adapter for Mem0, either OSS (self-hosted) or the hosted Mem0 service. Useful if you are migrating from Mem0 or running a mixed-provider setup.
Local vs. Hosted
AtomicMemory Core can run in two deployment modes, and the SDK works identically in both.| Mode | How to run | Default port | Default API key |
|---|---|---|---|
| Local | Docker image, one command | 17350 | local-dev-key |
| Hosted | AtomicMemory hosted service | Provided at signup | Provided at signup |
Memory Tools (MCP)
The@atomicmemory/mcp-server package exposes AtomicMemory as an MCP server. Any MCP-compatible agent host — including Claude Code, Cursor, Codex, and Hermes — can connect to it and call four tools:
| Tool | Description |
|---|---|
memory_search | Search memories by semantic query and scope |
memory_ingest | Ingest a conversation or text into the memory store |
memory_package | Package and compress memories into a token-efficient context block |
memory_list | List memories with optional filters |