Skip to content
synunsPublic

About

Version-controlled memory for AI agents — Doltgres-backed, MCP-native. Human notes in Obsidian, agent memory in flint.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation


◯ ─────────── ◯

flint logo

F L I N T

◯ ─────────── ◯

Long-term memory for AI coding agents.
Your agents get smarter with every session — Claude Code, Codex, Gemini, Copilot, Cursor, and more.

English | 한국어

Go 1.26 DoltgreSQL MCP 8 harnesses v0.36.1 v0.37.0 v0.38.0

Quick Start · How It Works · Commands · Agents

Every AI coding agent you've used forgets everything between sessions. It relearns your architecture, rehashes decisions you already settled, rediscovers pitfalls you documented months ago. A brilliant colleague with amnesia.

flint fixes this. When your agent learns something — a decision, a convention, a gotcha — flint stores it in Doltgres, a database where every change is a commit. Next time a session starts, flint injects that accumulated context back in. The agent picks up where it left off instead of starting from scratch.

It adds up. Week one, it learns the stack. By week four, it remembers why you chose gRPC over REST. Three months in, it knows the migration order, which tests are flaky, and the deployment checklist — because it wrote all of that down.

Humans take notes in Obsidian. Agents take notes in flint — the stone you strike to make fire and tools.

v0.36.1 · auto-update · go install · end-to-end release pipeline · full changelog v0.37.0 · auto-update · go install · end-to-end release pipeline · full changelog v0.38.0 · auto-update · go install · end-to-end release pipeline · full changelog


Quick Start

# Install (builds flint into GOPATH/bin)
git clone https://github.com/synuns/flint.git && cd flint
make install

# Start Doltgres, migrate the schema
flint setup

# Load demo data (seed target must be explicit)
make seed FLINT_SEED_DSN=postgresql://flint:flint-dev@localhost:5434/flint

Or download a release binary — binaries, checksums, and the plugin zip are attached automatically.

Claude Code

/plugin marketplace add synuns/flint
/plugin install flint@flint

The plugin needs the flint binary on your PATH. Hooks and the MCP server both call it.

Install via go install

go install github.com/synuns/flint/cmd/flint@latest

Module path github.com/synuns/flint (v0.22.0+) — version comes from build info; flint update covers binary refresh afterwards.

Other agents (Codex, Gemini, Cursor, OpenCode)

flint setup --mcp

Detects installed harnesses (Codex, Gemini, OpenCode, Copilot, Cursor, Qwen, Devin, Cline) and registers the MCP server via each native CLI. File-based harnesses (Windsurf, Zed, Amp, VS Code, Continue, Goose, Trae) get a doctor check + adapter docs. Anything not installed gets skipped. Exit 0 regardless.

What flint setup does

Runs docker compose up -d to start Doltgres on port 5434, migrates the schema, and prints next steps. Default DSN is postgresql://flint:flint-dev@localhost:5434/flint — override with FLINT_DSN. Tear down with flint teardown.

Configuring exposure

flint setup --exposure normal|minimal controls how much context hot injects at session start. minimal keeps it to a single headline. Three hooks: SessionStart (session-start), PostCompact (compact), Stop (session-end).

Full walkthrough: docs/QUICKSTART.md


How It Works

flint architecture diagram

Each session cycles through four phases:

Phase What happens
Inject Hook fires flint hot at session start — streams a budgeted [flint] context block
Work Agent reads and writes via CLI or MCP
Record flint write appends JSONL with hash dedup
Verify flint audit inspects dolt_log; flint restore --drill rehearses recovery

flint session lifecycle: memory compounds


Beyond local agents — the bridge

flint's surfaces (hooks, stdio MCP, localhost Doltgres) assume the agent runs on your machine — that's deliberate (ADR-0013). For AIs that don't — a cloud assistant, a phone app — use the bridge instead of a connector:

flint brief [query]        # masked, read-only context block — paste it into any chat

brief searches active knowledge only (pending never leaves the machine), masks secret patterns ([REDACTED:…]), and carries the [flint] data-block marker so the receiving AI treats it as data, not instructions (ADR-0015). To bring an assistant's answer back, feed it to flint write knowledge with a confidence below conf_floor (low-confidence writes are classified pending), or use flint import (always pending) — it lands in the same review queue as any unreviewed writer, and flint approve promotes it. Remote live writes are off the table by design.


Commands

Command What it does
flint setup Start Doltgres, migrate, print seed/plugin next steps
flint update Self-update to the latest release (checksum-verified, --check dry-run)
flint tuning Inspect/override threshold keys (list/get/set/reset)
flint write <kind> Record knowledge from stdin (idempotent)
flint import [path] Convert rule files (CLAUDE.md etc.) to pending knowledge (--commit)
flint read <query> Search active knowledge
flint hot --session <id> Inject context at session start
flint brief [query] Masked, read-only brief to paste into any external AI (the bridge)
flint done --session <id> Wrap up a session
flint approve --id n Promote pending to active
flint maintain Curate: check thresholds, invalidate, merge
flint audit --limit n Show last n commits
flint backup Dump to SQL with sha256 checksum (--encrypt age at-rest, --mask redacted diagnostics)
flint restore --file f Restore from backup (--drill to rehearse)
flint profile Profile verdict: evidence + recommendation, --apply normal|minimal
flint status Schema version, pending count, hot p95
flint mcp MCP server (read·write·hot·pending·approve tools)

Exit codes: 0 success · 1 error (or silent no-results on read) · 2 storage failure · exit 3 — invalid input (valueless trailing flags, bad --status / --as-of values, schema violations on write).

flint read uses word-by-word fallback search when the phrase query returns nothing.

Operations: docs/RUNBOOK.md · Tuning: docs/TUNING.md · Metrics: docs/METRICS.md


Agents & Adapters

Every adapter below runs locally — MCP support means MCP clients that can spawn the flint binary. AIs without a local runtime use the bridge instead.

Agent Method
Claude Code Plugin: hooks + /flint command
Codex MCP (docs/adapters/codex.md)
Gemini MCP (docs/adapters/gemini.md)
Copilot MCP (docs/adapters/copilot.md)
Cursor MCP (docs/adapters/cursor.md)
OpenCode MCP (docs/adapters/opencode.md)
Qwen Code MCP (docs/adapters/qwen.md)
Devin CLI MCP (docs/adapters/devin.md)
Cline MCP (docs/adapters/cline.md)
Windsurf MCP (docs/adapters/windsurf.md)
Zed MCP (docs/adapters/zed.md)
Amp MCP (docs/adapters/amp.md)
VS Code MCP (docs/adapters/vscode.md)
Continue MCP (docs/adapters/continue.md)
Goose MCP (docs/adapters/goose.md)
Trae MCP (docs/adapters/trae.md)
OpenClaw Adapter (docs/adapters/openclaw.md)
Hermes Adapter (docs/adapters/hermes.md)

Adapter docs: docs/adapters/


flint/
├── cmd/flint/          # entry point
├── lib/                # store · query · db · cli · backup · mcp
├── flint-plugin/       # Claude Code plugin
├── docs/               # PLAN · RUNBOOK · TUNING · ADR · adapters
└── docker-compose.yml  # Doltgres on 5434

Human notes in Obsidian. Agent memory in flint.

F L I N T

About

Version-controlled memory for AI agents — Doltgres-backed, MCP-native. Human notes in Obsidian, agent memory in flint.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages