Skip to main content

mem0-aerospike

An Aerospike vector-store provider for mem0ai, packaged as a standalone external plugin. Installing this package alongside mem0ai makes provider="aerospike" work in MemoryConfig without any changes to mem0ai itself.

How it works

mem0ai hardcodes provider discovery to the mem0.vector_stores.<provider> and mem0.configs.vector_stores.<provider> module paths, and keeps provider registries on VectorStoreFactory.provider_to_class and VectorStoreConfig._provider_configs. There is no public registration API.

On import mem0_aerospike, the package:

  1. Loads its own configs/vector_stores/aerospike.py into sys.modules as mem0.configs.vector_stores.aerospike.
  2. Loads its own vector_stores/aerospike.py into sys.modules as mem0.vector_stores.aerospike.
  3. Registers "aerospike" in both mem0ai registries.

This is the same runtime-registration pattern used by mem0-tcvectordb and mem0-falkordb. Registration is idempotent and guarded by a mem0ai version check: if the installed mem0ai is outside the tested range, importing the package raises an ImportError instead of silently corrupting mem0ai state.

Install

pip install mem0ai
pip install .            # or: pip install mem0-aerospike once published

Requirements: Python >= 3.11 (driven by the aerospike-sdk preview client).

Note: aerospike-sdk 0.9.0a5 currently depends on aerospike-async via a direct git URL, which blocks PyPI publication. Until that resolves, install aerospike-sdk from source or a private index.

Usage

Recommended — the helper performs registration for you:

from mem0_aerospike import create_memory_config
from mem0 import Memory

config = create_memory_config(
    vector_store={
        "namespace": "test",
        "collection_name": "mem0",
        "embedding_model_dims": 1536,
        "host": "localhost",
        "port": 3000,
    },
    llm={"provider": "openai", "config": {"model": "gpt-4o"}},
    embedder={"provider": "openai", "config": {"model": "text-embedding-3-small"}},
)
m = Memory(config=config)

Direct MemoryConfig construction also works, but import order matters: mem0_aerospike must be imported before the config is validated.

import mem0_aerospike  # noqa: F401  -- registers the provider
from mem0 import Memory
from mem0.configs.base import MemoryConfig

m = Memory(config=MemoryConfig(
    vector_store={"provider": "aerospike", "config": {...}}
))

Configuration

AerospikeConfig fields (all validated by Pydantic v2, extra="forbid"):

Field Default Description
namespace "test" Aerospike namespace
collection_name "mem0" Aerospike set name
embedding_model_dims 1536 Embedding vector dimensions
host "localhost" Seed host
port 3000 Seed port
allow_scans_with_where False Permit filtered queries that do not scope by user_id/agent_id/run_id to fall back to a full scan
max_record_bytes 943718 Client-side record-size guardrail (~0.9 MiB)

Tests

pytest                  # mock-based unit tests, no server needed
pytest -m integration   # requires a running Aerospike server (localhost:3000)

License

Apache-2.0. See LICENSE and NOTICE (Mem0 attribution).

Metadata

Release files for mem0-aerospike 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mem0-aerospike 0.0.1
File Size Uploaded Provenance Actions
mem0_aerospike-0.0.1.tar.gz 27.8 kB With provenance Details for mem0_aerospike-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mem0-aerospike 0.0.1
File Interpreter ABI Platform Actions
mem0_aerospike-0.0.1-py3-none-any.whl Python 3 none any Details for mem0_aerospike-0.0.1-py3-none-any.whl

Total release size: 46.4 kB

Release files / mem0_aerospike-0.0.1.tar.gz

Download URL mem0_aerospike-0.0.1.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9649a5bd315dae6bfe89683ff3d2f9afaaea0050a0bf0ceacb698aa66381bc64
BLAKE2b-256 checksum
How to use checksums
579860396e77fa1620aa038a1a6be94198fb3a7ed528f92d3ee1a052cf904c0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / mem0_aerospike-0.0.1-py3-none-any.whl

Download URL mem0_aerospike-0.0.1-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb89ad9448e92d28a8a883e0264aaaef8bc5684b1fbd3fd0e0701eb1036604c2
BLAKE2b-256 checksum
How to use checksums
1b819f9d81d9fcd63d284990f14fd66f4d7938ddf5d283b7e881cc799eada310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for mem0-aerospike 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mem0_aerospike-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page