Skip to main content

Fractal memory system for Claude Code

Project description

Oubli

image



Oubli: French for "forgetting." (Also a West African fruit so sweet it makes babies forget their mother's milk.)

A memory system that never forgets. Persistent fractal memory for Claude Code.

Features

  • Core Memory - Essential facts about you (~2K tokens), loaded in every conversation
  • Persistent Storage - Memories survive across sessions, stored locally in LanceDB
  • Smart Import - Import your Claude.ai memory export with one command
  • Auto-Save - Saves memories at session end and before context compaction
  • Auto-Deduplication - Duplicate memories are automatically detected and merged (85% similarity threshold)
  • Fractal Synthesis - Automatically consolidates raw memories into higher-level insights via /synthesize
  • Auto-Synthesis - Synthesis triggers automatically when unsynthesized memories exceed threshold
  • Proactive Memory - Claude searches and saves automatically, no prompting needed
  • Immediate Core Memory Updates - Family, work, and identity changes update Core Memory instantly
  • Quiet Operation - Memory operations happen silently in the background
  • Local-First - No external services, no API keys, your data stays on your machine

Installation

pip install oubli
oubli setup

Then restart Claude Code.

Requirements

Uninstall

oubli uninstall
pip uninstall oubli

What Gets Installed

Component Location Description
MCP Server claude mcp 15 memory tools (save, search, synthesize, etc.)
Hooks ~/.claude/settings.json UserPromptSubmit, PreCompact, Stop
Slash Commands ~/.claude/commands/ /clear-memories, /synthesize
Instructions ~/.claude/CLAUDE.md How Claude should use the memory system
Data ~/.oubli/ LanceDB database + Core Memory file

Usage

After installation, restart Claude Code. Your Core Memory will be automatically loaded in every conversation.

Import Existing Memories

Paste your Claude.ai memory export and ask:

"Import this into my memory"

Claude will parse it into structured memories and optionally create your Core Memory.

Natural Interaction

Just talk naturally:

  • "Remember that I prefer TypeScript over JavaScript"
  • "What do you know about my work?"
  • "I no longer work at Spotify, update your memory"

Slash Commands

  • /clear-memories - Clear all memories (requires confirmation)
  • /synthesize - Run full synthesis workflow: merge duplicates, create insights, update Core Memory

How It Works

           ┌─────────────────────────────────────────┐
           │            CORE MEMORY                  │
           │    (~2K tokens, always in context)      │
           │                                         │
           │  The essential "you" - personality,     │
           │  key preferences, life context, work    │
           └─────────────────────┬───────────────────┘
                                 │ (distilled from)
                                 ▼
Level 1+   ○ "Deeply appreciates jazz guitar, especially fusion"
(insights)  ╱╲
           ╱  ╲
Level 0   ○ ○ ○ ○  Raw memories from conversations
(raw)
  • Core Memory: Always loaded, contains the most important stable facts
  • Level 0: Raw memories from conversations with full context
  • Level 1+: Synthesized insights from multiple raw memories

Data Storage

All data is stored locally in ~/.oubli/:

  • memories.lance/ - LanceDB database
  • core_memory.md - Your Core Memory (human-readable, editable)

MCP Tools

Oubli provides 15 MCP tools for memory operations:

Tool Description
memory_save Save a new memory (auto-deduplicates)
memory_search Search memories by BM25 full-text search
memory_get Get full details including conversation text
memory_get_parents Drill down from synthesis to source memories
memory_list List memories by level
memory_stats Get memory statistics
memory_update Update an existing memory
memory_delete Delete a memory
memory_import Bulk import memories
memory_synthesis_needed Check if synthesis should run
memory_prepare_synthesis Merge duplicates and get groups for synthesis
memory_synthesize Create Level 1+ insight from raw memories
memory_dedupe Manual duplicate cleanup
core_memory_get Get Core Memory content
core_memory_save Save Core Memory content

Development

# Clone and install in development mode
git clone https://github.com/dremok/oubli.git
cd oubli
pip install -e .
oubli setup

# Run tests
python -c "from oubli.storage import MemoryStore; store = MemoryStore(); print(store.get_stats())"

# Check MCP tools
python -c "from oubli.mcp_server import mcp; print([t.name for t in mcp._tool_manager._tools.values()])"

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

oubli-0.2.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

oubli-0.2.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file oubli-0.2.1.tar.gz.

File metadata

  • Download URL: oubli-0.2.1.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for oubli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8d9be012ec8b9637592f92c9a1948f4e6e04ce267015e45cd37ee828cafec5de
MD5 1a89d8e7e5ccbbb399cc578920e325e5
BLAKE2b-256 3eac6103ae3a3cfa713fa39fbe54b6132cc65309671fe6622ac7fda080727376

See more details on using hashes here.

File details

Details for the file oubli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: oubli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for oubli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ca883a88c7488154585126f6faf49555f2c73011e7771bb85816a657146e12d
MD5 03a68738eba7b45883725d57415dddfa
BLAKE2b-256 e42b163a827d74f1f532c6cd3bbb363158bf15f6442a4e9030e2d7064d39f6ea

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