MemoryClient constructor, and every call to memory.ingest(), memory.search(), and the rest of the API routes through that provider. Swapping backends — for example, moving from a local AtomicMemory Core instance to a hosted deployment, or evaluating Mem0 alongside Core — requires changing only the constructor configuration.
Available Providers
AtomicMemory Core
The recommended backend for self-hosted deployments. Connects to a running AtomicMemory Core instance over HTTP. Supports full ingest with AUDN-SC extraction, hybrid semantic search, claim versioning, and tiered context packaging.
Mem0
An HTTP adapter for Mem0, compatible with both the Mem0 OSS server and the hosted Mem0 API. Useful if you are already running Mem0 and want to evaluate or migrate to AtomicMemory tooling.
AtomicMemory Provider
Pass anatomicmemory key inside the providers object to connect to an AtomicMemory Core instance. The apiUrl must point to the base URL of your Core deployment, and apiKey must match the CORE_API_KEY set on the server.
Base URL of the AtomicMemory Core instance, without a trailing slash. For local Docker deployments this is typically
http://127.0.0.1:17350.Bearer token to authenticate with Core. Must match the
CORE_API_KEY environment variable set on the server. For local development the default value is local-dev-key.Request timeout in milliseconds. Defaults to
30000 (30 seconds). Increase this for large ingest payloads or slow LLM providers.Production configuration
For production, read credentials from environment variables and never hardcode them:Mem0 Provider
Pass amem0 key inside the providers object to connect to a Mem0 server. The same MemoryClient API surface works identically — no application code changes are needed when switching between atomicmemory and mem0.
Base URL of the Mem0 API. Use
https://api.mem0.ai for the hosted Mem0 service, or the URL of your self-hosted Mem0 instance.API key for authenticating with the Mem0 service.
Switching Providers at Runtime
Because the provider is just a constructor argument, you can select the active backend at application startup using environment variables:Implementing a Custom Provider
If you need to connect to a backend that is not natively supported, you can implement theMemoryProvider interface exported from @atomicmemory/sdk/memory and pass it through the provider registry. Custom providers receive the same scope routing, error normalisation, and type safety as the built-in adapters.
MemoryProvider TypeScript interface in @atomicmemory/sdk/memory for the full method signatures.