Version 1.0 Production-Ready • 100% Local SQLite

Permanent Memory & Codebase Knowledge Graphs for AI Coding Agents

Eliminate context window amnesia. OGM-Slim combines Tree-Sitter AST call-graph indexing with bi-temporal episodic memory ranking to empower Claude Desktop, Cursor, and autonomous AI agents with instant, high-precision recall.

$ npm install -g ogm-slim
OGM-Slim Knowledge Graph & Memory Visualizer
Dataset: default 129 symbols 210 relations 10 clusters
< 5ms
Graph Query & Hybrid Search Latency
100% Local
Embedded SQLite WAL • Zero External DBs
12 Native Tools
Standard Model Context Protocol (MCP 1.5)
10+ Languages
Parallel Tree-Sitter AST Call-Graph Engine
ENGINEERING EXCELLENCE

Built for Serious AI Pair Programming

Everything your AI agent needs to understand massive multi-package codebases and maintain continuous operational learnings.

Cross-File AST Call Graph

Instantly maps symbols, functions, methods, structs, and interfaces across multiple files and packages. Automatically detects downstream callers, dependencies, and type contracts.

  • Louvain modularity community detection
  • PageRank hub centrality ranking
  • SHA-256 incremental hash cache

Bi-Temporal Agent Memory

Separates raw observation logs (Episodes) from verified architectural conclusions (Memories). AI agents anchor bug fixes, runbooks, and design decisions directly to symbol keys.

  • Composite ranking: BM25 + Confidence + Recency
  • Automatic memory superseding & invalidation
  • Citations graph linking memories to proof logs

Native Model Context Protocol (MCP)

Zero friction connection with Claude Desktop, Cursor, Roo-Code, and Antigravity. Equipped with 12 atomic tools for real-time querying, observing, committing, and indexing.

  • 100% compliant with standard MCP 1.5 specification
  • Stdio & SSE transport support
  • Isolated multi-dataset project namespaces

Ultra-Fast Local SQLite WAL

Zero cloud subscriptions or external databases required. All data resides in a single, high-performance embedded SQLite database using Write-Ahead Logging for lightning-fast reads.

  • Single file portability (`~/.ogm/ogm.db`)
  • Zero memory leaks with parallel worker pooling
  • Full-text FTS5 BM25 search index
THE ARCHITECTURAL DIFFERENCE

Why Vector RAG Alone Fails for Code

Code is a deterministic graph of call hierarchies and exact contracts, not just loose text similarity.

Capability Naive Prompting / Context Window Vector Embeddings (Vector RAG) OGM-Slim Engine
Cross-File Call Graph ❌ Impossible (Token limits) ⚠️ Inaccurate text chunks ✅ Deterministic AST Call Hierarchy
Memory Retention ❌ Lost upon session close ⚠️ Loose similarity recall ✅ Bi-temporal Provenance + BM25
Bug Regression Prevention ❌ AI repeats same mistakes ❌ No structured conclusion ✅ Anchored Memories to Symbol Keys
Storage & Setup None ❌ Heavy external cloud/vector DB ✅ 100% Local SQLite WAL (<5ms)
Integration Protocol Manual Copy-Paste ⚠️ Custom API wrappers ✅ Standard MCP 1.5 Protocol (12 Tools)
12 ATOMIC MCP TOOLS

Seamlessly Integrated into Your AI Agent

Claude and Cursor automatically invoke these tools to navigate codebases and record operational memories.

codebase_index Index local directory with AST parser
codebase_search Search symbols by name, file, or kind
codebase_get_callees Inspect downstream caller/callee relations
codebase_symbol_info Get signature, contract, & docstrings
memory_observe Record immutable raw observation episode
memory_commit Commit structured durable solution memory
memory_recall FTS5 hybrid search across agent memory
memory_inspect Get full provenance trace & citations
memory_invalidate Archive or supersede outdated memory
dataset_list List isolated codebase workspaces
dataset_stats Get symbol, relation, and cluster counts
dataset_delete Cascade purge codebase dataset
QUICKSTART

Get Running in Under 60 Seconds

Choose your preferred setup: Claude Desktop, Cursor, CLI, or TypeScript Library.

claude_desktop_config.json
{
  "mcpServers": {
    "ogm-slim": {
      "command": "npx",
      "args": ["-y", "ogm-slim", "mcp"]
    }
  }
}
Cursor • Settings > Features > MCP Servers
Name: ogm-slim
Type: command
Command: npx -y ogm-slim mcp
Terminal
# 1. Index your current project codebase
ogm-slim index . --project my-app

# 2. Launch the visualizer dashboard & REST API
ogm-slim serve --port 8765

# 3. Open browser at http://localhost:8765/admin
app.ts
import { indexCodebaseDirectory, recallMemories, commitMemory } from 'ogm-slim';

// Index codebase into knowledge graph
await indexCodebaseDirectory('./src', 'my-project');

// Recall relevant memories with hybrid ranking
const results = await recallMemories('WASM lifecycle', 'my-project');
console.log(results);

Supercharge Your AI Coding Agent Today

Free & Open Source under the MIT License. Zero vendor lock-in.