Pure Go • Zero CGO • SQLite STRICT • MCP 2025-03-26

Deterministic Vector-Less Memory Engine for AI Agents.

Stop wasting tokens and time on non-deterministic vector searches for literal stack traces. ogm-lightweight delivers 100% explainable recall using FTS5 BM25, exact term triggers, and temporal graph traversal in a single Go binary.

$0.00 Embedding API Cost
<1.2 ms Query Latency
100% Deterministic
28.4 MB RAM Footprint
ogm-lm — bash — 80x24
Loading terminal...

Core Data Model

ogm-lightweight structures persistent agent context into six canonical abstractions for 100% explainability.

Episode

Immutable raw observation capturing error logs, terminal outputs, code diffs, and verification outputs.

Memory

Durable conclusion backed by evidence episodes, containing confidence scores, status, and version history.

Entity

Named codebase item (symbol, repository, file, package) with temporal version tracking.

Relation

Typed connection linking entities together (e.g., checkout.go → SQLITE_BUSY → Bounded_Retry).

Trait

Scoped key-value knowledge attached directly to memories for instant metadata filtering.

Ontology

Registry of allowed entity types and relation predicates enforced across agent sessions.

Exposed Agent Memory Tools

AI agents interact with ogm-lightweight via six standardized Model Context Protocol (MCP) tools.

memory_recall

Multi-Signal Recall

Searches memories using FTS5 BM25, exact term triggers, and graph traversal. Returns ranked exact matches in <1.2ms.

memory_observe

Observe Evidence

Ingests raw observations (terminal command outputs, compiler errors, code changes) as immutable evidence episodes.

memory_commit

Commit Conclusion

Saves durable memory conclusions linked to supporting episode IDs with assigned confidence scores.

memory_feedback

Feedback & Correct

Allows agents to correct, invalidate, or adjust stale conclusions when new workspace evidence emerges.

memory_forget

Archive & Forget

Soft archives obsolete memories by default. Explicit hard-delete requires project owner token credentials.

memory_inspect

Inspect Provenance

Returns complete stored provenance, explain scores, and confidence fields without revealing configured secrets.

End-to-End Agent Workflow

Watch how ogm-lightweight ingests raw observations, redacts sensitive API credentials, indexes structured memory episodes into SQLite STRICT, and performs multi-signal recall.

Live Pipeline Controller

1

Observation Ingest

Agent captures raw code edits, stack traces, and command logs via memory_observe.

RAW EVIDENCE
2

Secret Redaction

Regex & AST sanitizer scrubs OpenAI API keys, JWT tokens, and DSN passwords automatically.

SECURITY FIRST
3

STRICT SQLite Index

Atomic transaction indexes text with FTS5 BM25 and updates temporal graph relations.

ZERO-CGO STORAGE
4

Multi-Signal Recall

Combines BM25 weights, exact trigger matches, and graph depth-2 traversal for exact solutions.

1.1ms RECALL
Live Telemetry — Step 1 Ingestion
// Telemetry loading...

Temporal Knowledge Graph

Click any node below to inspect relationships between code repositories, files, error episodes, conclusions, and traits.

One-Line Harness Connector CLI

Install agent-side MCP connectors and skill policies in one command using the native ogm-lm CLI utility.

Fast Connector Install

Automatically configures environment variables in ~/.config/ogm-lightweight/env with 0600 permissions.

harness-install.sh
# Short aliases for quick harness setup
ogm-lm --h opencode --apply
ogm-lm --h claude-code --apply

Harness Diagnostics & Doctor

Verify project API keys, selected harness target, skill paths, and exposed MCP tool lists without modifying state.

doctor.sh
# Safe preview & diagnostic modes
ogm-lm harness doctor --harness opencode
ogm-lm harness print --harness claude-code

Multi-Signal Score Calculator

Adjust the multi-signal sliders to observe how ogm-lightweight computes composite memory relevance scores deterministically.

Weight Tuning

FTS5 BM25 Term Weight 0.85
Exact Term Trigger Bonus 1.00
Graph Traversal (Depth 2) 0.60
Confidence Score 0.90
Stale / Deprecated Penalty 0.00

Score Telemetry

0.942
COMPOSITE SCORE
ScoreExplanation.json
Calculating...

Secret Redaction Engine

Test ogm-lightweight's real-time regex & AST sanitizer. Type or select a preset to see secrets scrubbed before database persistence.

...

Benchmark Comparison

Compare ogm-lightweight against Pinecone / Vector DBs and Naive RAG setups for AI coding agent persistent memory.

Metric Feature ogm-lightweight Vector DB (Pinecone / Qdrant) Naive File RAG
Embedding API Cost $0.00 (Zero Cost) $500+/mo OpenAI $0 - $50/mo
Stack Trace Recall 100% Deterministic ~65% (Fails line numbers) ~50% (Token truncations)
Recall Latency < 1.2 ms 120 - 250 ms 45 - 90 ms
Memory Footprint 28 - 35 MB RAM 4 GB+ RAM 500 MB RAM
Architecture 1 Binary, 1 SQLite File Multi-container Cloud Python + FAISS

Connect to Your AI Coding Client

Select your AI coding client to copy the auto-generated MCP configuration.

~/.gemini/config/mcp_config.json
Loading MCP config...

Routed to ogm-lightweight.svclabs.cloud

This static website and REST/MCP server endpoints are reverse-proxied using Caddy on ogm-lightweight.svclabs.cloud.

/etc/caddy/Caddyfile
ogm-lightweight.svclabs.cloud, http://ogm-lightweight.svclabs.cloud {
    root * /var/www/ogm-lightweight
    file_server
    encode gzip
}
/etc/systemd/system/ogm-lm.service
[Unit]
Description=OGM Lightweight Memory Engine
After=network.target

[Service]
ExecStart=/usr/local/bin/ogm-lm serve --port 8080
Restart=always
User=ogm