Skip to main content

Memory System for AI-powered Development

Project description

OpenMem

Project-level Memory system for AI-powered development.

Why OpenMem?

The Problem We Solved

While using AI-powered development tools like OpenClaw, we experienced a critical issue: important conversations and decisions were frequently lost. The trigger-based memory system missed crucial context daily - technical decisions, problem-solving insights, and creative breakthroughs disappeared into the void.

Our Development Environment Has Evolved

The IDE is no longer just a code editor. It's become our primary workspace where we:

  • Discuss architecture with AI
  • Debug complex problems
  • Capture fleeting insights
  • Make critical technical decisions

Only polished outcomes become documentation (MD/Word/PDF). But the golden moments - the sparks of insight during live problem-solving - deserve to be preserved too.

Our Solution: Full Recording + Smart Organization

Instead of relying on imperfect triggers, we record everything and organize intelligently. This approach:

  • ✅ Never misses important context
  • ✅ Captures the complete thinking process
  • ✅ Turns conversations into actionable knowledge
  • ✅ Works across all development scenarios

Four Usage Scenarios

  1. IDE Integration (Trae / VS Code) - Your daily driver
  2. Code Editor - Lightweight editing sessions
  3. CLI Tools - Command-line development
  4. AI Assistant (OpenClaw) - Enhanced memory for your AI partner

Why We Built This

We're developers who faced the same pain point. After replacing our own OpenClaw memory with this system and seeing dramatic improvements, we knew we had to share it.

Learn from OpenClaw, Evolve Beyond

OpenClaw showed us the way. We're continuing that evolution - breaking context limitations, preserving knowledge, and making every conversation count.


Features

  • 🎯 Project-level Memory - Independent memory space per project
  • 🔍 Full-text Search - Chinese tokenization (jieba) + FTS5 + BM25 ranking
  • 🌐 Global/Project Layers - Flexible like Poetry
  • 📦 Template Init - minimal / standard / full
  • ⚙️ Config Inheritance - extends global config
  • 📝 Rules Generation - Auto-generate IDE-readable rules
  • 🔒 Encrypted Backup - Local encrypted storage (future)
  • ⏮️ Version Control - Git-like versioning (future)
  • 🖥️ IDE Support - Trae IDE + VS Code

Security & Privacy

Data Storage

  • All data is stored locally on your machine
  • Raw data in SQLite database (plain text for fast FTS5 search)
  • No data is ever sent to external servers

Backup

  • Encrypted backup feature is planned for future release
  • Encryption algorithm: Fernet (symmetric encryption)
  • Key management: User-provided passphrase

Privacy

  • Zero network requests by default
  • Your data stays on your machine
  • You control when and how to share

Current Status

Feature Status Notes
CLI (init/add/search/list/status) ✅ Done Core commands working
Project/Global layers ✅ Done Like Poetry config
Full-text search (FTS5 + BM25) ✅ Done jieba for Chinese
Config inheritance ✅ Done extends global config
Template init ✅ Done minimal/standard/full
Python API ✅ Done from openmem import
Encrypted backup 🔜 Planned v0.2
Git-like version control 🔜 Planned v0.2
IDE rules auto-generation 🔜 In Progress Trae/VS Code support
LLM summarization 🔜 Planned v0.3

Architecture

graph TD
    A[User Input] --> B{CLI or API}
    B -->|CLI| C[Memory Manager]
    B -->|API| C
    C --> D{Scope Check}
    D -->|Project| E[Project DB<br/>.memory/]
    D -->|Global| F[Global DB<br/>~/.memory/]
    E --> G[SQLite + FTS5]
    F --> G
    G --> H[BM25 Ranking]
    H --> I[Search Results]

Data Flow:

  1. User input via CLI or Python API
  2. Memory Manager routes to Project or Global layer
  3. Data stored in local SQLite with FTS5 index
  4. Search uses BM25 for relevance ranking

Installation

pip install openmem

Or development mode:

pip install -e .

Quick Start

Initialize

# Project-level Memory
omem init

# Global Memory (shared across projects)
omem init --global

# Select template
omem init --template=standard
omem init --template=full

# Non-interactive mode
omem init -y

Basic Usage

# Add memory
omem add "Use JWT for authentication" --type decision --tags auth,security

# Search
omem search auth
omem search auth --scope both

# List
omem list --type decision

# Status
omem status
omem status -v

Python API

from openmem import MemoryManager

# Auto-select (project first, fallback to global)
memory = MemoryManager()

# Explicit project path
memory = MemoryManager(project_path="/path/to/project")

# Global memory only
memory = MemoryManager(project_path=None)

# Add memory
memory_id = memory.add(
    content="Use JWT for authentication",
    type="decision",
    tags=["auth", "security"],
    priority=8
)

# Search with filters
results = memory.search(
    query="authentication",
    scope="project",      # "project" | "global" | "both"
    memory_type="decision",
    tags=["auth"],
    limit=10
)

# List memories
memories = memory.list(
    memory_type="decision",
    tags=["auth"],
    limit=50
)

# Update and delete
memory.update(memory_id, content="New content")
memory.delete(memory_id)

memory.close()

Documentation


License

MIT

Project details


Download files

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

Source Distribution

pyopenmem-0.1.1.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

pyopenmem-0.1.1-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file pyopenmem-0.1.1.tar.gz.

File metadata

  • Download URL: pyopenmem-0.1.1.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyopenmem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d65692f36f2a61a9c8041f93d9984d1ede81a9c1456dfaa32cb4a8e7944748a0
MD5 170a3a24a463cec6518cdf972e5e44b3
BLAKE2b-256 0802a01ba57800f0b6cec93df501e445da70df5ee965fb9038cc901e4440101c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyopenmem-0.1.1.tar.gz:

Publisher: pypi.yml on openlyco/pyopenmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyopenmem-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyopenmem-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyopenmem-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1740880a6d2f59687c338e847a2fe11cfabc98db5539ba65ef0d7f92ea96c60
MD5 5f1ea6ba7073f0355bda605b20a6a61b
BLAKE2b-256 8ab1271bda8aec31e13eb95d2d4435fca4bd816ca21c1a1006585de6df4ac986

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyopenmem-0.1.1-py3-none-any.whl:

Publisher: pypi.yml on openlyco/pyopenmem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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