Skip to content

Team-Deepiri/deepiri-memorymesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepiri MemoryMesh

Drop-in Memory Layer Library for your AI Agent

from memorymesh import Memory

mem = Memory()

mem.store("user likes rust")
mem.query("what does the user like?")
# → ["user likes rust"]

Install

pip install memorymesh

For semantic embeddings (recommended):

pip install memorymesh[embeddings]

Usage

from memorymesh import Memory

mem = Memory()                    # uses ~/.memorymesh/memory.db
mem.store("user prefers dark mode")
mem.store("working on async refactor")

# Query by semantic similarity
mem.query("theme preference")
# → ["user prefers dark mode"]

mem.query("async work", top_k=5)
# → ["working on async refactor", ...]

API

Method Description
Memory(db_path=None, embedder="auto") Create memory. Set embedder="fallback" to skip embeddings model.
mem.store(content) Store a memory (deduped).
mem.query(query, top_k=3) Query by semantic similarity.
mem.all() List all memories.

Philosophy

  • Dead simple – 2 methods: store() and query()
  • Plug-and-play – works out of the box, no config
  • Local-first – SQLite + optional sentence-transformers
  • Zero deps – falls back to deterministic hashing if no model

Works with any AI agent, tool, or assistant.

Device scan & portable packaging

Scan Claude Code, Cursor, and OpenCode data across your machine (not just the repo):

# Discover locations
memorymesh scan

# Ingest all provider messages
memorymesh pull -p myproject

# Build portable package for another machine/provider
memorymesh package build -p myproject -o ./udata.tar.gz

# Import on another machine
memorymesh package import ./udata.tar.gz -p myproject

See docs/U_DATA_PACKAGING.md and docs/STORAGE_PATHS.md.

Export chat & memory

Export everything for a project (messages, summaries, agent state) as plain text, Markdown, or JSON:

memorymesh export -p myproject --format md -o ./export.md
memorymesh export -p myproject --format txt --clipboard
memorymesh export -p myproject --format json --provider cursor

The TUI (memorymesh tui) adds [7] Export. The HTTP API accepts POST /export with {"project":"...", "format":"md", "clipboard": true}.

Cross-provider chat transfer

Move a conversation from one tool to another without dumping the whole project:

memorymesh init

# Workspace Session Bridge — auto-picks the latest session for this cwd
memorymesh resume -p lighthouse --from claude --to cursor -w ~/lighthouse

# Or target any provider pair dynamically
memorymesh resume -p myrepo --from claude --to gemini

# Manual conversation filter still supported
memorymesh transfer -p lighthouse --from claude --to cursor -c e7fcaea3 --push

How it works (novel bits):

  • Correlates sessions by workspace slug (~/.claude/projects/-home-user-repo/ ↔ workspace path)
  • Builds a resume brief (compressed summary + tail turns) instead of 10k+ message dumps
  • Delivers via a dynamic provider registry — handoff paths and import hints resolve per target, with a generic fallback for unknown agents

See docs/INTEGRATIONS.md for transfer, transfer-deliver, and install-push.

About

LLM Cross-provider Context / Memory Bridge Tool

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors