Skip to main content
Glama

AI coding agents are amnesiac and ungoverned. Every task restarts by re-reading the same files, long sessions drift onto stale assumptions, and nothing warns the agent when a change is about to break a contract or cross a boundary.

OpenLore fixes both halves, and then gets out of your way. A one-time static analysis builds a live knowledge graph of your repo β€” call structure, types, tests, decisions, IaC. From then on your agent is already oriented at the start of every task and its changes are certified before they land β€” automatically, deterministically, with no LLM in the hot path, so the same question returns the same grounded answer and the agent is told when a fact goes stale instead of served a confident guess.

Install once, then forget it

npm install -g openlore && openlore install

That is the only command most people ever run. It auto-detects your agent (Claude Code, Cursor, Cline, Continue, Pi, AGENTS.md), wires it, registers the MCP server, and builds the index β€” no API key, no config, no prompts. After that, it's on in the background and you don't think about it:

  • πŸ”„ Every task starts oriented, automatically β€” a compact architecture digest is injected into your agent's context at the start of each session, and your agent calls orient() and the other tools itself over MCP. You don't type anything.

  • 🌱 Every repo, not just this one β€” install wires your user account too, so each new git repo you open indexes itself in the background on first touch. "Install once" is literal.

  • 🩹 Always fresh β€” a file watcher re-indexes as you edit and converges to a full analysis; anything it can't recompute in time is marked explicitly stale, never silently wrong.

  • πŸ›‘οΈ Changes get checked before they land β€” the governance tools (and openlore review on a PR) run deterministically with no API key.

The CLI below exists for humans and CI β€” prove, review, doctor, features. The everyday path is: install, then let your agent use it.

Zero config. Run openlore features to see every opt-in capability (embeddings, the commit gate, the spec store…), whether it's on, and the one command to enable it. openlore doctor verifies the wiring.


Related MCP server: Paparats: Local Semantic Code Search

What you get

Two things, both deterministic and local:

🧠 Memory β€” your agent starts every task already oriented

  • Orient in one call β€” orient(task) returns the relevant functions, callers, specs, tests, and insertion points (~430Β΅s p50 on a 15k-node graph) instead of a dozen exploratory file reads.

  • Survives refactors β€” anchored notes and decisions carry forward when a symbol is renamed or moved, instead of orphaning.

  • One graph for everything β€” application code, Infrastructure-as-Code, and architectural decisions share one graph, so a single query spans all three.

  • Told when a fact is stale β€” every response carries a brief, factual freshness note (the Epistemic Lease) once a cached fact has aged or the repo moved, so a long session can't drift onto a confident guess.

πŸ›‘οΈ Governance β€” guardrails on what the agent changes

  • Breaking-change verdict β€” certify_public_surface classifies every changed export breaking / non-breaking / potentially-breaking and names the consumers each break hits. Never silently "safe."

  • Sensitive-boundary check β€” change_impact_certificate flags when a diff opens a new path into a boundary you declared (reachable after the change, not before).

  • Grounded claims β€” verify_claim returns confirmed / refuted / unverifiable with a citation, before an agent asserts "X is dead" or "Y is safe to change."

  • One commit gate β€” openlore enforce blocks on findings you mark blocking. Advisory by default, no API key.

The one line to remember: an agent's expensive failure mode isn't ignorance β€” it's confidence. A model that doesn't know a function exists will go look. A model that "knows" a stale fact builds on it, and you pay at review time. OpenLore is built so the agent can be told "that fact is stale" and "this change opens a path you said was sensitive" β€” deterministically, with no second model guessing about the first.


Value Scorecard β€” does it pay for itself?

OpenLore only earns its place if an agent with it reaches a correct answer for less total cost than the same agent without it. We measure that and publish it β€” wins and losses. Numbers from the Spec 14 benchmark (claude -p, sonnet, N=4 medians, pinned SHAs), measured 2026-06-01.

Scenario

Cost Ξ”

Round-trips Ξ”

Verdict

Large/unfamiliar repo Β· deep "how does X flow through Y" (its target)

βˆ’7% to βˆ’21%

βˆ’26%

βœ… helps β€” and the win grows with repo size

Small/familiar repo Β· shallow "who calls X"

task-dependent (Round 1: +43%)

+38%

❌ often adds overhead β€” measure first

The win scales with codebase size (round-trips without β†’ with):

Repo (size)

Cost Ξ”

Round-trips

excalidraw (~640 files)

βˆ’21%

25 β†’ 16

tokio (~790 files)

βˆ’21%

17 β†’ 13

okhttp

βˆ’13%

13 β†’ 11

django (~3k files)

βˆ’7%

21 β†’ 15

gin (110 files, smallest)

+4% (β‰ˆeven)

10 β†’ 9

Re-confirmed live 2026-06-03: the deep-task win reproduces (okhttp βˆ’13%); the small/familiar case is task-dependent, not a flat loss (chalk βˆ’32% win vs. express +59% loss). Don't guess from our repos β€” run openlore prove --estimate on yours (seconds, no API key).

Honesty contract. We never publish a savings number the benchmark didn't produce, we always show the losses next to the wins, and every claim traces to a command you can run. Methodology: docs/AGENT-BENCHMARKS.md.


Is OpenLore for you?

βœ… Strong fit

A codebase too big to hold in your head β€” and the model's. Private or niche code the model never memorized. Long sessions where stale assumptions compound. Polyglot repos, or code plus the IaC that deploys it.

πŸ€” Try it, measure

Mid-size repos and mixed workloads. Run openlore prove --estimate (seconds, no key) before you commit.

❌ Probably not

A small repo the model already knows, answering shallow questions β€” your agent's built-in search is cheaper, and we publish the measurement that says so. Also: OpenLore locates and certifies, it never edits your code.


What your agent reaches for (you rarely type these)

Once wired, your agent calls these over MCP on its own. The default surface is the substrate preset β€” 15 tools: the navigation core, the highest-value governance reads (recall, verify_claim, blast_radius), and the spec composites. The lean navigation preset (10 tools) and the full 83 tools (--preset full) are one flag away.

When the agent needs to…

Tool

Start any task

orient(task) β€” functions, callers, specs, insertion points in one call

Find which file/function handles X

search_code

Know the blast radius of a change

analyze_impact β€” risk + up/downstream chain + governing decisions

Trace how request X reaches function Y

trace_execution_path

Pick the tests a change should run

select_tests β€” backward reachability to the reaching tests

Find dead code / what dies if X is deleted

find_dead_code β€” cross-language reachability

Check a whole diff before commit

blast_radius β€” callers, tests, specs that drift

Tell if a diff opens a sensitive boundary

change_impact_certificate

Tell if a change breaks a consumer's API

certify_public_surface β€” verdict, consumers named

Verify a fact before asserting it

verify_claim β€” deterministic verdict + citation

Record an architectural choice

record_decision before writing the code

Full reference β€” all 83 tools: docs/mcp-tools.md. Ships as a Claude Code Skill at skills/openlore-orient/.


OpenLore vs. alternatives

Everyone in this category answers the same first question: how does the agent see the codebase without reading it file by file? LSP toolkits answer with symbols, graph MCP servers with a parsed graph, search platforms with an index. OpenLore answers it too β€” then keeps going into the second question almost nobody answers: what happens when the agent starts writing? A retrieval layer makes an agent informed; it doesn't make it safe. That second half β€” governance on the same graph, no LLM in the loop β€” is what OpenLore is for.

Agent built-ins

LSP toolkits

Graph MCP

Search platforms

OpenLore

Structural context instead of file reads

❌ grep

βœ“ symbols

βœ“ graph

βœ“ index

βœ“ call graph + IaC + decisions on one graph

Local, no API key, deterministic

Partial

βœ“

βœ“

❌ hosted

βœ“ no LLM in the hot path

Cross-session memory anchored to code

❌

Partial

βœ“ notes

❌

βœ“ carried across renames

Told when a cached fact goes stale

❌

❌

❌

❌

βœ“ Epistemic Lease

Breaking-change verdict over a diff

❌

❌

Partial

❌

βœ“ per export, consumers named

"Did this diff open a sensitive path?"

❌

❌

❌

❌

βœ“ differential, pre-commit

Cost effect published with the losses

❌

❌

❌

❌

βœ“ βˆ’26% round-trips on deep tasks

Use the other tool when it's the right one: symbol-level edits (rename across files) are an LSP toolkit's home turf β€” OpenLore is deliberately read-only, and the two compose. Org-wide search across hundreds of repos is a search platform. Just-fast-graph-retrieval is a smaller graph MCP server. And a small, familiar repo with shallow questions is cheaper with your agent's built-in search. OpenLore also exports SCIP, so it sits alongside these tools, not against them.

Comparisons reflect each project's publicly documented capabilities as of July 2026; a correction PR is always welcome.


What it costs

Measured on a fresh clone of ripgrep with published openlore@2.1.6:

What it costs

On ripgrep (232 files)

One-time index build

13.6 s, entirely local β€” no API key, no network

Disk

27 MB under .openlore/ (gitignorable; rebuildable from source)

Per-query latency

~430 Β΅s p50 in-process via the MCP server

Your source code

never leaves the machine β€” no account, no telemetry (opt-in only)

Lock-in

none β€” delete .openlore/ and nothing about your repo has changed

Large monorepos take minutes rather than seconds, stated plainly in Known limitations. Platform: Linux and Windows are exercised in CI; macOS is supported.

Fully local β€” nothing phones home. No account, no network call; your source, the index, and every query stay on your machine. The only diagnostics that exist are opt-in and local-only, off by default and never transmitted: OPENLORE_TELEMETRY=1 records tool calls, agent identity, latency, error messages, decision titles, and lease events to the gitignored .openlore/telemetry/ directory, and OPENLORE_LLM_LOGS=1 stores prompts and responses (after secret redaction) in the gitignored .openlore/logs/ directory. β†’ docs/configuration.md


Languages, Infrastructure-as-Code & contracts

Languages: TypeScript Β· JavaScript Β· Python Β· Go Β· Rust Β· Ruby Β· Java Β· C++ Β· Swift Β· C# Β· Kotlin Β· PHP Β· C Β· Scala Β· Dart Β· Lua Β· Elixir Β· Bash β€” call graphs ride the same primitives for every language. β†’ docs/language-support.md

Infrastructure-as-Code: Terraform/HCL Β· Kubernetes Β· Helm Β· CloudFormation Β· Ansible Β· Pulumi Β· AWS CDK Β· CDKTF Β· Dockerfile Β· Docker Compose Β· GitHub Actions Β· Azure Bicep Β· Serverless Framework β€” IaC resources project onto the same graph as application code, so orient, search_code, and analyze_impact answer "what's the blast radius of changing this security group / IAM role / base image / CI job?" with zero new tooling. β†’ docs/iac.md

Interface contracts: OpenAPI 3.x Β· Swagger 2.0 β€” each declared operation projects onto the same graph, bound to the route handler that serves it and the function that calls it, so orient and analyze_impact cross the API boundary. Matching is literal, and everything unbound is disclosed. β†’ docs/contracts.md


Known limitations

We'd rather you know these up front.

  • Static analysis only. Polymorphic dispatch, event channels, and routeβ†’handler bindings are recovered (provenance-labeled synthesized). What isn't: reflective invocation with a non-literal target (getattr(o, name)()), eval, and DI/plugin registries with no visible binding β€” silently absent from the graph.

  • LLM spec quality varies. Generated spec prose reflects the model's understanding β€” review complex business logic. Structure, format, coverage, and drift are checked deterministically.

  • Keyword (BM25) search answers first; local semantic follows in the background. orient/search_code work immediately with no key. Background builds then add on-device vectors (CPU-only, ~23 MB model) when the optional package is installed; opt out with "embedding": { "provider": "none" }.

  • Large monorepos analyze one package at a time after the first full build (openlore analyze --shard <name>); the initial index is still a full analysis.

  • Incremental updates converge or flag, never silently diverge. When a change exceeds the per-save budget, the rest is marked explicitly stale and self-heals on later edits or a background re-analyze.


Documentation

Start here: the documentation index maps every task to the one canonical page that answers it. The essentials:

I want to…

Doc

Install & wire my agent (one command)

install.md

Understand why wiring an agent helps

agent-setup.md

See all 83 MCP tools + parameters

mcp-tools.md

Run the full CLI reference

cli-reference.md

Configure .openlore/config.json (incl. enforcement.policy)

configuration.md

Choose / configure an LLM provider (optional)

providers.md

Fix a setup problem

TROUBLESHOOTING.md

Read the benchmark methodology + per-task numbers

AGENT-BENCHMARKS.md

Search code by meaning (semantic / GraphRAG)

semantic-search.md

Pick the tests a change should run

test-impact-selection.md

Find dead code / coverage gaps

reachability-dead-code.md Β· coverage-gaps.md

Detect spec ↔ code drift

drift-detection.md

Enforce architecture / import rules

architecture-invariants.md

Gate commits / wire CI & PR review

ci-cd.md Β· preflight.md

Understand IaC & cross-domain impact

iac.md Β· cross-domain-impact.md

See declared API contracts in the graph

contracts.md

Query across repos (federation)

federation.md

Share the index as a bundle

shareable-bundle.md

Export to Sourcegraph / SCIP tools

scip-export.md

Read the internals

ARCHITECTURE.md Β· ALGORITHMS.md Β· PHILOSOPHY.md


Development

npm install
npm run build
npm run test:run  # 5500+ unit tests, one-shot (npm test is watch mode)
npm run typecheck

New contributor? See CONTRIBUTING.md for setup, MCP wiring, and the commit gate. Please also read our Code of Conduct; to report a vulnerability, see SECURITY.md.


Community

If OpenLore saves your agents from re-reading the same files β€” or catches one risky change before it lands β€” star the repo. It's the signal that tells us to keep building, and it helps other engineers find it.


  • OpenSpec β€” spec-driven development framework

  • AGENTS.md β€” system prompt for direct LLM prompting

  • Examples β€” BMAD, Vibe, GSD, drift-demo, spec-kit integrations

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Self-hosted semantic code search for AI coding agents. Indexes many repositories at once with tree-sitter AST chunking, local llama.cpp embeddings and Qdrant, so Claude Code, Cursor, Codex and any MCP client can find code by meaning, trace usages and callers, and read the git history behind each chunk. No API keys, and your code never leaves your machine.
    2
    18
    34
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides persistent codebase memory and semantic context for AI agents via AST-aware chunking and symbol graph indexing.
    1
    -