Skip to content

teimurjan/lethe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lethe

Λήθη — the ancient Greek personification of forgetfulness.

A memory store for LLM agents that gets better the more you use it. Hybrid BM25 + dense retrieval, cross-encoder reranking, clustered retrieval-induced forgetting (RIF). Every retrieval teaches it which entries are chronic distractors — no fine-tuning, just bookkeeping (Anderson, 1994).

Install

1. Install the CLI

Homebrew installs the lethe CLI:

brew tap teimurjan/lethe
brew install lethe

For the standalone CLI only, use Cargo on any platform with a Rust toolchain:

cargo install lethe-cli

Prebuilt CLI bundles are also available from GitHub Releases.

Verify the installation, then index and search the current project's Claude Code, Codex, and Oh My Pi transcripts:

lethe --version
lethe index
lethe search "query" --top-k 5
lethe                              # TUI

Transcript discovery uses ~/.claude, ~/.codex, and ~/.omp/agent by default and honors each agent's directory override environment variables.

2. Add a coding agent

The CLI works on its own. Install a plugin only if you want recall and recall-global available directly inside a coding agent.

Claude Code

/plugin marketplace add teimurjan/lethe
/plugin install lethe

Recall via skills — lethe indexes your Claude Code transcripts directly and writes nothing into your repos. See plugins/claude-code/README.md.

Codex CLI

codex plugin marketplace add teimurjan/lethe

Then run codex, open /plugins, and install lethe — it wires the recall / recall-global skills into Codex automatically. See plugins/codex/README.md.

Oh My Pi

omp plugin marketplace add teimurjan/lethe
omp plugin install lethe@teimurjan

Restart omp to load the recall / recall-global skills and the background index freshness hook. See plugins/omp/README.md.

Cross-project search and periodic compaction are also available from the CLI:

lethe search "query" --all --top-k 5
lethe dedupe --all

lethe TUI

Python

pip install lethe-memory
from lethe_memory import MemoryStore

store = MemoryStore("./my_memories")
store.add("I prefer window seats on flights", session_id="trip")
for hit in store.retrieve("travel preferences", k=5):
    print(f"[{hit.score:.1f}] {hit.content}")
store.save()

Node

npm install @lethe-memory/lethe
import { MemoryStore } from "@lethe-memory/lethe";
const store = new MemoryStore("./my_memories", { dim: 384 });
await store.add("first entry");
const hits = await store.retrieve("query", { k: 5 });

Benchmark

LongMemEval-S, full 199,509-turn corpus, turn-level NDCG@10:

Stage NDCG@10 Gain
Hybrid BM25 + vector (RRF) 0.241 baseline
+ cross-encoder reranking 0.382 +59%
+ clustered + gap RIF 0.342 +3.4% over RRF-truncation baseline
+ LLM enrichment, covered queries 0.473 +20–25%

Scope. RIF targets chronic-false-positives in long-term conversational memory. On NFCorpus (medical IR) it regresses — workload-specific by design. Full methodology + checkpoints in BENCHMARKS.md.

How it works

License

MIT

About

A memory store for LLM agents. Hybrid BM25 + dense retrieval, cross-encoder reranking, clustered retrieval-induced forgetting (RIF), and an optional LLM enrichment layer at write time.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages