Go · SQLite · Zero dependencies

One binary.
One service.

Persistent memory for AI agents. No PostgreSQL, no Redis, no Docker required. A single ogm binary that runs anywhere Go runs. Unix philosophy: do one thing well.

ogm serve
$ ./ogm serve --port 8080
2025/08/05 22:30:01 ogm v1.4.2 starting...
2025/08/05 22:30:01 sqlite: opened ogm.db
2025/08/05 22:30:01 migrations: applied 12
2025/08/05 22:30:01 fts: rebuilt index (1847 entries)
2025/08/05 22:30:01 http: listening on :8080
2025/08/05 22:30:01 mcp: stdio ready
─────────────────────────────────────
$ ./ogm harness install opencode
wrote ~/.config/opencode/mcp.json
done. restart opencode to activate.
─────────────────────────────────────
$ curl localhost:8080/api/health
{"status":"ok","version":"1.4.2"}
 
# zero config. zero deps. just run.
Memory Lifecycle

Three operations.

Observe what happens. Commit what you learned. Recall when you need it.

memory_observe

Observe

Record immutable episodes. What happened, when, in what context. The raw material of experience.

memory_commit

Commit

Durable conclusions distilled from episodes. Versioned, supersable, feedback-scored.

memory_recall

Recall

Full-text search across everything. Episodes, memories, entities, relations, traits. Find what matters.

Domain Model

Not key-value.

A proper domain model for agent knowledge. Entities, relations, traits, ontology.

01

Episodes

Immutable observations. Raw experience.

02

Memories

Versioned conclusions. Supersable.

03

Entities

Named things with temporal versions.

04

Relations

Typed connections between entities.

05

Traits

Scoped knowledge about entities.

06

Ontology

Allowed types and predicates.

Stack

One binary. All layers.

Everything compiled into a single Go binary. No external dependencies, no runtime containers.

ogm (single binary) Transport REST API · MCP stdio · MCP HTTP · CLI Application use cases · business logic Domain pure types · zero external imports Repository interfaces SQLite modernc.org/sqlite REST MCP CLI opencode claude-code hermes ~15MB · CGO_ENABLED=0
Architecture

Strict layering.

Domain purity enforced by test. No infrastructure leaks into business logic.

transport REST, MCP stdio, MCP HTTP, CLI
application business logic, use cases
domain pure types, zero external imports
repository persistence interfaces
infrastructure SQLite adapter
Features

What's inside.

SQLite Storage

Pure Go SQLite via modernc.org/sqlite. No CGO. Forward-only migrations.

MCP Protocol

Built-in MCP server. Both stdio and streamable HTTP. No bridge needed.

Multi-Agent

Project-scoped API keys. Multiple agents, isolated namespaces.

Legal Hold

Prevent data deletion. Compliance-ready memory retention.

Backup & Restore

CLI tools for backup, restore, integrity check, vacuum, FTS rebuild.

Admin Console

Server-rendered management interface. No frontend build step.

Stack

Built with.

Go 1.26+
SQLite (modernc)
MCP Protocol
CGO_ENABLED=0
Docker (multi-stage)
Get Started

Three install methods.

Docker

git clone https://github.com/ardiannurcahya/ogm-lightweight.git cd ogm-lightweight docker compose up -d --build # verify curl --fail http://127.0.0.1:8080/health {"status":"ok"}

Prebuilt Binary

# download from releases VERSION=v0.1.0 ARCH=amd64 curl -LO "https://github.com/ardiannurcahya/ogm-lightweight/releases/download/${VERSION}/ogm-lightweight-${VERSION}-linux-${ARCH}.tar.gz" # extract and run tar -xzf ogm-lightweight-*.tar.gz ./ogm-lightweight -config config.json

From Source

git clone https://github.com/ardiannurcahya/ogm-lightweight.git cd ogm-lightweight go build -trimpath -o ./bin/ogm-lm ./cmd/server ./bin/ogm-lm -config config.example.json
Harness Integration

One command to connect.

Built-in harness connector. No external bridge needed. Supports OpenCode, Claude Code, and Hermes.

OpenCode opencode.json Claude Code .claude/mcp.json Hermes hermes.config.json MCP stdio MCP stdio MCP stdio ogm-lightweight ogm-lm single binary ~15MB · CGO_ENABLED=0 6 MCP tools SQLite memory.db ogm-lm --h opencode harness install
OC OpenCode
opencode.json
{ "mcp": { "ogm": { "type": "local", "command": ["ogm-lm", "mcp", "-config", "/path/to/config.json"], "environment": { "MEMORY_MCP_CREDENTIAL": "{env:OGM_API_KEY}", "MEMORY_MCP_PROJECT_ID": "{env:OGM_PROJECT_ID}" } } } }
CC Claude Code
.claude/mcp.json
{ "mcpServers": { "ogm": { "command": "ogm-lm", "args": ["mcp", "-config", "/path/to/config.json"], "env": { "MEMORY_MCP_CREDENTIAL": "${OGM_API_KEY}", "MEMORY_MCP_PROJECT_ID": "${OGM_PROJECT_ID}" } } } }
6 MCP Tools
memory_recall Search knowledge
memory_observe Record episodes
memory_commit Save conclusions
memory_feedback Correct stale data
memory_forget Archive memories
memory_inspect View provenance