Skip to main content

NeuroMem - Brain-inspired memory system for AI agents with multi-modal storage

Project description

isage-neuromem

NeuroMem is a brain-inspired memory management engine for SAGE (Structured AI Graph Engine). It provides flexible memory collection abstractions with support for vector databases, key-value stores, and graph structures, designed specifically for RAG (Retrieval-Augmented Generation) applications.

Installation

From PyPI

pip install isage-neuromem

For Development

# Clone the repository
git clone https://github.com/intellistream/NeuroMem.git
cd NeuroMem

# Quick start (recommended)
./quickstart.sh

# Or manual installation
pip install -e .
pip install pre-commit  # For contributors
pre-commit install

Quick Start

from sage.neuromem import MemoryManager

# Create memory manager
manager = MemoryManager()

# Create a collection
config = {
    "name": "my_collection",
    "backend_type": "VDB",
    "description": "My vector database collection"
}
collection = manager.create_collection(config)

For more examples, see examples/.

Features

  • Multiple Backend Support: VDB (Vector Database), KV (Key-Value), Graph
  • Flexible Storage Engine: Pluggable storage backends for vectors, text, and metadata
  • Powerful Search Engine: Multiple index types (FAISS, BM25s, etc.)
  • Collection Management: Create, load, store, and manage memory collections
  • Memory Manager: Centralized management of multiple collections

Architecture

sage/neuromem/
├── memory_manager.py          # Central manager for collections
├── memory_collection/         # Collection abstractions
│   ├── base_collection.py
│   ├── vdb_collection.py
│   ├── kv_collection.py
│   └── graph_collection.py
├── search_engine/             # Index implementations
│   ├── vdb_index/
│   ├── kv_index/
│   └── graph_index/
├── storage_engine/            # Storage backends
│   ├── vector_storage.py
│   ├── text_storage.py
│   └── metadata_storage.py
└── utils/                     # Utility functions

Quick Start

from sage.neuromem import MemoryManager

# Create manager
manager = MemoryManager()

# Create a VDB collection
config = {
    "name": "my_collection",
    "backend_type": "VDB",
    "description": "My vector database collection"
}
collection = manager.create_collection(config)

# Insert data
collection.batch_insert_data(
    texts=["Hello world", "Goodbye world"],
    metadatas=[{"source": "doc1"}, {"source": "doc2"}]
)

# Create index
index_config = {
    "name": "my_index",
    "embedding_model": "mockembedder",
    "dim": 128,
    "backend_type": "FAISS"
}
collection.create_index(index_config)

# Retrieve
results = collection.retrieve(
    "Hello",
    index_name="my_index",
    topk=5
)

Package Structure

NeuroMem is part of the SAGE ecosystem and installed as a namespace package:

  • Package name on PyPI: isage-neuromem
  • Import path: sage.neuromem
  • Namespace: Part of SAGE (Structured AI Graph Engine)

Benchmarks

Comprehensive benchmark suite is available in benchmarks/:

  • Experiment Pipeline: Complete benchmark pipeline for memory operations
  • Evaluation Tools: Performance analysis and metrics
  • Configurations: Pre-configured test scenarios

See benchmarks/README.md for details.

Future Plans

This sub-project is designed as a core memory component of SAGE and may be rewritten in C++/Rust for better performance in the future.

License

Apache-2.0 License - see LICENSE file for details.

Part of SAGE Ecosystem

NeuroMem is a component of the SAGE (Structured AI Graph Engine) project by IntelliStream Team.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isage_neuromem-0.2.0.1-py3-none-any.whl (772.9 kB view details)

Uploaded Python 3

File details

Details for the file isage_neuromem-0.2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for isage_neuromem-0.2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbfb40f302654c750a652a7ab55b9eccf4a51d408402a660fd2a6b634fc06963
MD5 7b042b6287e10025b7e588ec948f7964
BLAKE2b-256 c3041d3e1b43e3507d8b9f383e83b0871f10dd63df37f0731c9a53e25e5720c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page