Your AI never starts over. Lore keeps sessions coherent for days and millions of tokens — no lossy summary that wipes your file paths and decisions — and turns every session into compounding memory that lives on your machine, in plain Markdown and an open SQLite database. No context files sprawling around. No lock-in. No workflow changes.
$ curl -fsSL https://withlore.ai/install | bashCopied!or npx @loreai/gateway
Building with a team? Folk Lore — shared team memory, coming soon →
Local First
The AI tooling ecosystem is in a war for execution, and your harness is incentivized to lock you in. When closed platforms build "agent memory," they trap your team's architectural decisions inside proprietary vector databases. Switch IDEs or models and your team gets amnesia. Lore is the escape hatch.
The curated team knowledge lands in.lore.md — plain Markdown at the root of your repo, version-controlled, PR-reviewable, and human-readable. The same diff shows up next to the code change it covers.
Everything else Lore keeps for you — raw conversations, distillations, long-term memory, entities, and the vector embeddings themselves — lives in a local SQLite database on your machine. The SQLite file is the vector database: no separate store, no separate bill. Read it with sqlite3, query it, export it, or build your own tools around it. Stop using Lore tomorrow and your data is still there, in plain Markdown and an open SQLite you can read.
When your team is ready, Lore's sync engine works like a private group chat between your SQLite databases — end-to-end encrypted, and only for the content you explicitly allow. The relay never sees plaintext. The keys stay with the participants.
The vector-database route is the lock-in route. The local-first route is the freedom route.Why we chose local-first →
The Problem
There's no error message when your AI forgets. Just worse answers, undone decisions, andhours spent re-explaining.
When the context window fills up, your AI toolcompacts the conversation. In a real 5-day coding session, compaction reduces 2.3 million tokens to an 11K summary — a 200x compression that loses which issues were picked, what alternatives were rejected, and why. It scores 2.4/5 on recall. Lore scores 4.0/5.
Most developers see "Compacting conversation" and start a new session. Thattrades compaction for total amnesia. The new session produces output that looks fine — but it's working from incomplete information, and you can't tell.
The alternative is maintaining context files, key technical learnings, and decision rationales — by hand. It works, but it's a second full-time job. One teamtracked 49 technical learnings manually. Every decision needs the "why" or the AI will refactor it away.
The Solution
Lore sits between your AI client and the upstream API. It captures every message — no client changes needed, just change the base URL. Works with Claude Code, OpenCode, Pi, Codex, and any Anthropic/OpenAI-compatible tool.
Lore replaces compaction entirely. Instead of lossy summaries that forget your file paths and decisions, it distills conversations into timestamped observation logs — the operational details your AI actually needs to keep working. Your manual "Key Technical Learnings"? Lore extracts and maintains them automatically.
Details from every session are searchable — even hundreds of turns later. When the distilled context isn't enough, your agent's recall tool retrieves the exact file path, error message, or decision rationale it needs. In our 2.3M-token benchmark: 2.6x total recall over compaction — 13 perfect scores vs 5.
Why not both?
Other tools force you to solve them separately. Lore treats them as one continuous pipeline.See how Lore compares →
Storing past conversations and searching them later is only half the problem. If your AI still gets compacted mid-session and loses track of what it's doing right now, a memory layer can't help — it doesn't know what's missing until you ask. Memory is only useful if it reaches the AI at the right time.
Compressing conversation history keeps the current session alive, but nothing is extracted from the compression. Start a new session and you're back to zero. Switch tools and the knowledge stays behind. Nothing transfers to other projects, team members, or even other models.
In Lore, context compression is the memory pipeline. Distillation feeds the gradient context manager, which feeds the knowledge curator, which feeds.lore.md— and with Folk Lore, your team. Every conversation makes every future session smarter, across any provider, any tool, any team member. Every new session starts with the relevant facts and gets a fresh injection after the first turn.Read the docs →
Persistence
Your AI won't refactor away deliberate decisions. Lore preserves the "why" behind every choice — the exact thing that prevents a future session from "helpfully" replacing your workaround with the broken approach it was working around.
Learning
Five feedback loops — behavioral pattern detection, semantic clustering, instruction capture, LLM-mediated curation, and adaptive calibration — compound across sessions. Patterns, gotchas, and decisions are automatically curated and exported to.lore.md, git-portable and model-agnostic: knowledge learned in token space, not baked into weights you lose at the next upgrade. What researchers call"harness self-improvement" — Lore does it automatically.
Simplicity
No context files to write. No instructions to maintain. No sessions to carefully manage. Install Lore, point your client at it, and keep working exactly as you do now. It extracts decisions, gotchas, and patterns — and preserves the "why" behind every choice — so you don't have to.
# Start Lore + your AI agent
$ lore run
# That's it. Lore auto-detects your
# agent and configures everything.Cost
Work for days, hundreds of turns, millions of tokens — memory stays sharp. Tested on a real 5-day, 2.3M-token session. And it costs less: avoiding compaction means your prompt cache is never busted, cache warming spans long-running tool calls only when it pays, background work runs at half price via batch APIs, and you can set a daily spend cap.See the cost story →
Search
Nomic Embed v1.5 runs in-process — zero API cost, zero latency, and no separate vector database or background services to deploy and babysit. Hybrid architecture fuses vector similarity with BM25 keyword search for best-of-both-worlds recall, and LLM-powered query expansion finds what you mean, not just what you typed.
Knowledge
Lore maintains both project-level knowledge (architecture, gotchas, conventions) and global preferences that follow you across all projects. Confidence-ranked entries are injected into every session at the right priority — your AI always knows how you like to work.
Compatibility
Claude Code, OpenCode, Pi, Codex — any tool that speaks Anthropic or OpenAI protocols. No new terminal, IDE, or cloud platform to adopt — just a one-line base-URL change. The engine runs locally and is fair source; your data stays on your machine. Switch providers, switch tools, switch machines — your memory travels with you. No vendor lock-in, no walled gardens.* Any provider accessible via an OpenAI or Anthropic-compatible API.
Team
Curated knowledge is exported to .lore.md — plain Markdown in your repo, sorted for clean diffs and tagged with stable IDs. Your team reviews what the AI learned in a pull request, the same way it reviews code. No private database, no black box. Live team sync is coming with Folk Lore.How team memory works →
# Review what your AI learned
$ git diff .lore.md
+ * **Auth**: refresh tokens in the
+ middleware, never per route.Migration
Lore imports conversations from Claude Code, Codex, Aider, Cline, Continue, OpenCode, and Pi — extracting knowledge from your existing sessions so your AI starts with context from day one. No blank slate.
# Import existing conversations
$ lore import
# Auto-detects Claude Code, Codex,
# Aider, Cline, Continue & moreWhat the industry and research are discovering
Andrew Stellman — on why context management is the most important undiscussed skill in AI-driven development.
Gergely Orosz — on Microsoft's internal experience with AI coding tools and the gap between demos and real codebases.
Meta-Harness (Stanford, 2026) — on why optimizing what context the model sees matters as much as the model itself. Lore is this optimization layer for coding agents.
Folk Lore · early access for teams
Lore is free and local today — install it now with curl -fsSL https://withlore.ai/install | bash.Folk Lore brings your team's memory together — shared, searchable, always current. Early access is rolling out. Be part of the myth.
Models will commoditize. The context harness will differentiate.Lore is that harness — the context engine every agent needs to build the future.
No spam. Unsubscribe anytime.
✓ You're on the list. We'll be in touch.
Something went wrong. Please try again.