@atomicmemory/sdk package is the typed TypeScript interface for building AI applications on top of AtomicMemory. It gives you a single, consistent API for storing and retrieving agent memories regardless of which backend you run — AtomicMemory Core on your own infrastructure, or a hosted Mem0 instance. Beyond the memory surface, the SDK also ships local embedding generation via Transformers.js, cosine-similarity search primitives, and KV/cache storage adapters, so you can assemble a complete memory pipeline without pulling in extra libraries.
Installation
The SDK requires Node.js 22 or later.Main Exports
The root@atomicmemory/sdk entry point exports everything you need for most use cases:
| Export | Description |
|---|---|
MemoryClient | Primary surface for memory operations — ingest, search, get, delete, package, and list. |
AtomicMemoryProvider | HTTP adapter that connects MemoryClient to an AtomicMemory Core backend. |
Mem0Provider | HTTP adapter that connects MemoryClient to a Mem0 backend (OSS or hosted). |
StorageManager | KV and cache adapters for artifact storage operations. |
EmbeddingGenerator | Local embedding generation via Transformers.js — no external API call required. |
SemanticSearch | Cosine-similarity search primitives for building custom retrieval pipelines. |
Subpath Exports
The SDK is split into focused subpath exports so you can import only what you need and keep bundle sizes in check:| Import path | Contents |
|---|---|
@atomicmemory/sdk | Main entry — includes MemoryClient, providers, and all top-level exports. |
@atomicmemory/sdk/browser | Browser-safe subset: MemoryClient and memory types without storage, embedding, or search surface. |
@atomicmemory/sdk/storage | Storage artifact client and types (ConcreteStorageClient, StoredArtifact, error classes). |
@atomicmemory/sdk/kv-cache | KV and cache adapters (IndexedDB, in-memory) used internally by the embedding cache. |
@atomicmemory/sdk/embedding | EmbeddingGenerator for local embedding inference. |
@atomicmemory/sdk/search | SemanticSearch cosine-similarity primitives. |
@atomicmemory/sdk/utils | Shared utility helpers. |
@atomicmemory/sdk/core | Error types and event primitives. |
@atomicmemory/sdk/memory | Memory types, the MemoryProvider interface, and provider adapters only. |
Quick Example
Explore the SDK
MemoryClient
Full API reference for ingest, search, get, delete, package, and list operations.
Scope
How to route and isolate memories with user, agent, namespace, and thread fields.
Providers
Configure AtomicMemory Core or Mem0 as the memory backend.