# Cortex-Mem: A Production-Ready Memory Framework for Autonomous AI Systems

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/sopaco-cortex-mem
Generated for open source discovery and AI-assisted research.

Cortex-Mem is a production-ready, AI-native memory framework built in Rust, providing intelligent long-term memory for autonomous systems. It features a hierarchical three-tier memory architecture for efficient information management, from extraction and search to automated optimization. This framework empowers AI agents to remember, learn, and personalize interactions across sessions, transforming stateless AI into context-aware partners.

GitHub: https://github.com/sopaco/cortex-mem
OSRepos URL: https://osrepos.com/repo/sopaco-cortex-mem

## Summary

Cortex-Mem is a production-ready, AI-native memory framework built in Rust, providing intelligent long-term memory for autonomous systems. It features a hierarchical three-tier memory architecture for efficient information management, from extraction and search to automated optimization. This framework empowers AI agents to remember, learn, and personalize interactions across sessions, transforming stateless AI into context-aware partners.

## Topics

- Rust
- AI
- memory-management
- embodied-agent
- openclaw
- LLM
- vector-database
- autonomous-systems

## Repository Information

Last analyzed by OSRepos: Wed Aug 12 2026 08:06:58 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 1

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction
Cortex-Mem is a production-ready, AI-native memory framework built in Rust, designed to provide autonomous systems with intelligent long-term memory. It moves beyond simple chat history, offering a sophisticated, hierarchical three-tier memory architecture, from extraction and search to automated optimization. This framework empowers AI agents, such as those in Embodied-AI and OpenClaw, with the ability to remember, learn, and personalize interactions across sessions.

At its core, Cortex-Mem utilizes a hybrid storage architecture, combining virtual-filesystem durability with high-performance vector-based semantic search. It comes with out-of-the-box support for SKILL, CLI, API, MCP, and an insights dashboard, making it a comprehensive solution for building truly intelligent, context-aware applications.

## Why Use Cortex-Mem?
Cortex-Mem transforms stateless AI into an intelligent, context-aware partner. Before Cortex-Mem, AI often forgets user details, lacks personalization, and repeats questions, leading to robotic and impersonal interactions. With Cortex-Mem, AI agents remember user preferences and history, provide deeply personalized interactions, learn and adapt over time, and maintain context across multiple conversations. This allows them to build rapport and feel like a true assistant.

It is ideal for developers building LLM-powered chatbots and agents, teams creating personalized AI assistants, and open-source projects requiring a robust memory backbone. Cortex-Mem has also demonstrated superior performance and token efficiency in benchmarks, achieving significantly higher scores with fewer tokens compared to other systems.

## Installation
To get started with Cortex-Mem, you will need:
*   **Rust** (version 1.86 or later)
*   **Qdrant** vector database (version 1.7+)
*   An **OpenAI-compatible** LLM API endpoint for memory extraction and analysis
*   An **OpenAI-compatible** Embedding API endpoint for vector search

The simplest way to install the core components is via `cargo`:

sh
# Install the CLI for command-line management
cargo install --path cortex-mem-cli

# Install the REST API Service for application integration
cargo install --path cortex-mem-service

# Install the MCP server for AI assistant integrations
cargo install --path cortex-mem-mcp


Cortex-Mem applications are configured via a `config.toml` file, which specifies details for Qdrant, LLM, embedding services, and the data directory.

## Examples
The `cortex-mem-cli` provides a powerful interface for direct interaction with the memory system. All commands require a `config.toml` file and can use the `--tenant` flag for multi-tenant isolation.

### Add a Memory:
Adds a new message to a session thread.
sh
cortex-mem --config config.toml --tenant acme add --thread thread-123 --role user "The user is interested in Rust programming."


### Search for Memories:
Performs a semantic vector search across the memory store.
sh
cortex-mem --config config.toml --tenant acme search "what are the user's hobbies?" --thread thread-123 --limit 10


### List Memories:
Retrieves a list of memories from a specific URI path.
sh
cortex-mem --config config.toml --tenant acme list --uri "cortex://session" --include-abstracts


### Get a Specific Memory:
Retrieves a specific memory by its URI.
sh
cortex-mem --config config.toml --tenant acme get "cortex://session/thread-123/memory-456.md"


### Session Management:
Create and close conversation sessions. Closing a session triggers memory extraction and indexing.
sh
# Create a new session
cortex-mem --config config.toml --tenant acme session create thread-456 --title "My Session"

# Close a session
cortex-mem --config config.toml --tenant acme session close thread-456


## Links
*   [GitHub Repository](https://github.com/sopaco/cortex-mem)
*   [Documentation](https://github.com/sopaco/cortex-mem/tree/main/litho.docs/en)
*   [MIT License](https://github.com/sopaco/cortex-mem/blob/main/LICENSE)