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
- IDE Integration (Trae / VS Code) - Your daily driver
- Code Editor - Lightweight editing sessions
- CLI Tools - Command-line development
- 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:
- User input via CLI or Python API
- Memory Manager routes to Project or Global layer
- Data stored in local SQLite with FTS5 index
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65692f36f2a61a9c8041f93d9984d1ede81a9c1456dfaa32cb4a8e7944748a0
|
|
| MD5 |
170a3a24a463cec6518cdf972e5e44b3
|
|
| BLAKE2b-256 |
0802a01ba57800f0b6cec93df501e445da70df5ee965fb9038cc901e4440101c
|
Provenance
The following attestation bundles were made for pyopenmem-0.1.1.tar.gz:
Publisher:
pypi.yml on openlyco/pyopenmem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyopenmem-0.1.1.tar.gz -
Subject digest:
d65692f36f2a61a9c8041f93d9984d1ede81a9c1456dfaa32cb4a8e7944748a0 - Sigstore transparency entry: 1079353713
- Sigstore integration time:
-
Permalink:
openlyco/pyopenmem@64c90bf3f9fd8912ef2c60165a96199d53d97384 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/openlyco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@64c90bf3f9fd8912ef2c60165a96199d53d97384 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1740880a6d2f59687c338e847a2fe11cfabc98db5539ba65ef0d7f92ea96c60
|
|
| MD5 |
5f1ea6ba7073f0355bda605b20a6a61b
|
|
| BLAKE2b-256 |
8ab1271bda8aec31e13eb95d2d4435fca4bd816ca21c1a1006585de6df4ac986
|
Provenance
The following attestation bundles were made for pyopenmem-0.1.1-py3-none-any.whl:
Publisher:
pypi.yml on openlyco/pyopenmem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyopenmem-0.1.1-py3-none-any.whl -
Subject digest:
c1740880a6d2f59687c338e847a2fe11cfabc98db5539ba65ef0d7f92ea96c60 - Sigstore transparency entry: 1079353720
- Sigstore integration time:
-
Permalink:
openlyco/pyopenmem@64c90bf3f9fd8912ef2c60165a96199d53d97384 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/openlyco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@64c90bf3f9fd8912ef2c60165a96199d53d97384 -
Trigger Event:
release
-
Statement type: