Moraine


Moraine is a local trace stack for agent work. It indexes sessions from agent
harnesses such as Codex, Claude Code, Qwen Code, Kiro CLI, Kimi CLI, NAC,
OpenCode, Hermes, Pi Coding Agent, and Prime Agent into ClickHouse, serves a
monitor UI, and exposes MCP retrieval over the indexed history.
Agents get searchable long-term memory through MCP. You get a unified local
record of what happened across providers, including tools, tokens, and
conversation history.
Moraine is under active development. Config keys, schemas, and MCP tools can
change across minor releases.
Screenshots
Documentation
Supported Agent Harnesses
Moraine ships session trace ingestion adapters for these agent harnesses:
| Harness | Config value | Session traces ingested |
|---|
| Codex | codex | JSONL session files under ~/.codex/sessions |
| Claude Code | claude-code | JSONL project session files under ~/.claude/projects |
| Kiro CLI | kiro-cli | Paired JSONL transcripts and JSON metadata under $KIRO_HOME/sessions/cli when set, or ~/.kiro/sessions/cli |
| Kimi CLI | kimi-cli | wire.jsonl session traces under ~/.kimi/sessions |
| Qwen Code | qwen-code | JSONL chat records under ~/.qwen/projects/*/chats |
| NAC | nac | Parent sessions and managed-worker episodes from setup-resolved store.db (nac_sqlite format) |
| OpenCode | opencode | SQLite session history from ~/.local/share/opencode/opencode*.db (default on; opencode_sqlite format) |
| Cursor | cursor | Agent transcript JSONL under ~/.cursor/projects (default on); Cursor IDE chat history from state.vscdb SQLite databases (default on; cursor_sqlite format) |
| Hermes | hermes | Live session JSON and trajectory JSONL traces |
| Pi Coding Agent / OMP | pi-coding-agent | JSONL session trees under ~/.pi/agent/sessions and ~/.omp/agent/sessions |
| Prime Agent | prime-agent | Root JSONL sessions under ~/.prime/agent/sessions and RLM child transcripts under ~/.prime/agent/session-artifacts |
Quickstart
uv tool install moraine-cli
moraine setup
moraine up
moraine setup creates or repairs ~/.moraine/config.toml and guides plugin or
MCP registration for detected agent harnesses.
For NAC, setup preserves unrelated config.toml settings, registers
[mcp_servers.moraine], and adds the resolved SQLite store only when its path
is stable and absolute. Relative or per-launch --store-path databases require
the manual source snippet printed by setup.
The monitor UI runs at http://127.0.0.1:8080 by default.
For release bundles, upgrades, project-scoped setup, and other harnesses, see the
Quickstart and Installation.
Connect Agent Harnesses
Use moraine setup to install or update the Moraine plugins for Claude Code,
Codex, and Hermes; install Kiro CLI's global steering and MCP registration; or
register Moraine MCP for supported harnesses such as Qwen Code, NAC, OpenCode,
Cursor, Kimi CLI, Pi Coding Agent, OMP, and Prime Agent. The integrations use
the installed Moraine bundle and the running local stack. For Kiro CLI and Prime
Agent, Moraine also resolves ingest paths from KIRO_HOME and
PRIME_AGENT_CODING_AGENT_DIR, respectively.