Skip to main content
Glama

Why

Coding agents are fast and confident, and they forget your codebase after every session. So they guess. They rename a function three services still call. They call a helper that does not exist. They loosen a test until it passes.

OpenLore solves both halves. It gives the agent a map of your code, and it checks the agent's work against that map, inside the loop, while the agent works.

Related MCP server: Paparats: Local Semantic Code Search

Intelligence: your agent knows the code

OpenLore builds a graph of every function, who calls it, which tests assert on it, which decisions govern it, and which infrastructure deploys it. The graph stays current as files change, and OpenLore hands the agent the part that matters:

When

Your agent gets

A session starts

A short brief on the repository, then what changed since its last session

You send a prompt

The functions, callers, and tests behind the code you named

It first touches a file

Who calls into it, the decisions tied to it, and the tests that assert on it

A sub-agent starts

A brief for that sub-agent's own task

Its context is compacted

A handoff of the work in flight, computed from the repository

The agent can also ask. "Who calls this?" "What breaks if I change it?" "Is this function dead?" verify_claim answers confirmed, refuted, or unverifiable, with the file and line as proof.

Two details make these answers safe to build on:

  • Facts expire. Every answer carries an epistemic lease. When the code it described changes, the agent gets a short, factual freshness note and checks again instead of acting on an old belief.

  • Memory follows the code. Notes and decisions are anchored to symbols. A rename carries them along. A change to the code marks them stale.

Governance: the agent's work gets checked

OpenLore watches the agent's edits as they happen:

When

What OpenLore catches

Before an edit

An import or call that does not resolve, or an edit to a generated or vendored file

After an edit

A weakened test: a skipped test, a removed assertion, a changed expected value, an added @ts-ignore

Before the agent stops

You get one receipt: what changed, which tests reach it, which exports and API contracts it breaks, and who uses them

Every finding carries proof and one action: the agent fixes it, records a decision, or raises it to you. When there is nothing new, OpenLore says nothing.

When you want rules, turn them on:

  • openlore enforce is one commit gate for every finding. Set each one to blocking, frozen, advisory, or off. Frozen accepts today's debt and blocks only new findings. Outputs SARIF.

  • Architecture rules. Declare "the domain layer must not import infrastructure." The agent can ask before it writes the import and get a yes or no.

  • Sensitive areas. Mark auth or billing as a protected surface. A change that opens a new path into it gets flagged.

  • Decisions. The agent records design choices with openlore decisions record. They sync into your specs at commit, so the reason stays next to the code.

  • Pull requests. openlore review writes a structural review of a branch. No LLM, no API key.

Everything is advisory until you choose to block.

Install

Works with Claude Code, Codex, Pi, Cursor, Cline, Continue, and any MCP client.

npm install -g openlore && openlore install

openlore install finds the agents on your machine, wires each one, and builds the index. New repositories index themselves the first time you work in them.

Pi: pi install npm:openlore. See the Pi guide.

Claude Code plugin: claude plugin marketplace add clay-good/OpenLore, then claude plugin install openlore@openlore. See the plugin README.

Any MCP client:

{ "mcpServers": { "openlore": { "command": "npx", "args": ["-y", "openlore", "mcp"] } } }

Claude Code gets every moment above through hooks. Codex gets the edit, stop, and compaction moments. Pi gets the edit checks through its own extension. Every MCP client gets the full tool set. Needs Node.js 22.22 or later. openlore doctor checks the setup.

How it compares

Other tools give the agent context, or they scan its code for security issues. OpenLore does the first, and checks the agent's work against the structure of your code.

Sourcegraph MCP

Augment Context Engine

CodeGraph

Serena

Semgrep Guardian

OpenLore

Runs on your machine, no account

✓

✓

partly

✓

Infrastructure and API contracts in the code graph

Terraform

✓

Checks edits while the agent works

security rules

✓

Catches calls to code that does not exist

✓

Catches a weakened test

✓

Names who a breaking change breaks

✓

Memory tied to code, marked stale when code changes

notes

✓

Tells the agent when an answer has expired

partly

✓

Commit gate with a policy per finding

policies

✓

Design decisions recorded and synced to specs

✓

Sourcegraph is the pick for searching hundreds of repositories at once, and OpenLore exports SCIP so the two work together. Semgrep and OpenLore check different things and run well side by side.

Based on each project's public documentation, November 2026. Corrections are welcome.

One graph for everything

  • 21 languages: TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C#, C++, Swift, Ruby, PHP, and more.

  • 13 infrastructure formats: Terraform, Kubernetes, Helm, CloudFormation, Pulumi, CDK, Dockerfile, GitHub Actions, and more.

  • API contracts: OpenAPI, protobuf, and GraphQL, linked to the handlers that serve them and the code that calls them. See contracts.

Ask "what is affected if I change this IAM role?" and get one answer across code, infrastructure, and APIs. Spec frameworks like OpenSpec are supported, and none is required.

Private by default

Everything runs on your machine. No account, no telemetry, and your code never leaves it. Delete .openlore/ and your repository is as it was.

Two diagnostics exist, both off by default and both kept on your machine. OPENLORE_TELEMETRY=1 records tool calls, agent identity, latency, error messages, decision titles, and lease events to .openlore/telemetry/. OPENLORE_LLM_LOGS=1 keeps the prompts and responses of the optional spec-generation commands, with secrets redacted, in .openlore/logs/. See configuration.

Tools

Your agent calls these on its own. The default set has 15 tools, led by orient, search_code, blast_radius, and verify_claim. Run with --preset full for all 84 tools, including test selection, dead-code detection, and architecture checks. See the tool reference and CI and review.

Learn more

Documentation · Install guide · CLI · Configuration · Troubleshooting · Architecture · Roadmap

Development

npm install
npm run build
npm run test:run  # 5500+ unit tests

See CONTRIBUTING.md and SECURITY.md.

If OpenLore saves your agent a wrong turn, a star helps others find it. MIT licensed.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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.
      18
      36
      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
      -