moraine
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 10 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
This tool provides a unified, local database and search server that indexes your AI coding agent traces in real-time. It gives your agents a searchable long-term memory via an MCP server while providing you with a UI to monitor all their activity, tool calls, and conversations.
Security Assessment
The overall risk is rated as Low. The codebase is written in Rust, and an automated scan of 12 files found no dangerous patterns, hardcoded secrets, or requests for excessive permissions. However, you should note that the recommended installation method relies on piping a remote shell script directly into your shell (`curl | sh`), which is standard but requires caution if you prefer to audit code before execution. The tool is designed to be fully local, meaning your conversation data does not leave your machine. By default, it does not make external network requests, though it naturally requires local system access to read your agent trace files and run a local database.
Quality Assessment
The project is actively maintained, with its most recent push occurring just today. It uses the permissive Apache-2.0 license and has a clear description. With only 10 GitHub stars, it is a very new and relatively untested tool in the broader open-source community. The developers explicitly warn that the tool is under active development, meaning features and database schemas are subject to breaking changes.
Verdict
Safe to use, though you should inspect the installation script beforehand and expect potential breaking changes as the project matures.
Unified realtime agent trace database & search MCP
Moraine indexes all of your Claude Code and Codex traces in realtime into a searchable, unfied database.
🤖 Your Agents Get: a searchable long-term memory.
🌝 You Get: a unified record of everything they've done across providers. Tools, Tokens, and Talk.
Specifically, Morine provides:
- The Dataplane to Your Agentic Era: the database is yours, take inspiration from our tooling and schema definitions and build your own apps ontop of moraine's DB.
- Agent memory via MCP: agents search and retrieve context from past conversations
- Unified trace database: every conversation turn, tool call, and token count in one place — query it however you want
- Monitor UI: browse sessions, check ingestion health, inspect what your agents have been doing
- Continually Optimized Search Tooling: improvements to realtime search performance are an ongoing effort in the project, and we're aiming to drive down real-time search latency as much as can.
- Fully local: nothing leaves your machine, unless you want it to (and set up a remote db instance).
| :warning: WARNING |
|---|
| Moraine is under active development, so features or schemas may change or move around whenever Y changes in vX.Y.Z. |
Quickstart
Install moraine (prebuilt bundle) to ~/.local/bin.
curl -fsSL https://raw.githubusercontent.com/eric-tramel/moraine/main/scripts/install.sh \
| sh
Afterwards, just make sure to have ~/.local/bin on your path (e.g. in your .zshrc, .bashrc, etc.).
Start the stack and confirm it is healthy:
which moraine
moraine up
moraine status
Open the monitor UI at http://127.0.0.1:8080.
Run a Claude Code or Codex session as you normally would, you'll see row counts and the ingest heartbeat move as your sessions are indexed.
Use moraine status --output rich --verbose for a detailed breakdown.
Connect an Agent (MCP)
While Moraine can be used for many purposes, a direct one is the search tooling we've built into a custom
BM25 search MCP, which will allow your agents to self-review past conversations across agent harnesses.
To wire it into Claude Code, add this to your .mcp.json:
{
"mcpServers": {
"moraine": {
"command": "moraine",
"args": ["run", "mcp"]
}
}
}
Or add to Codex:
codex mcp add conversation-search -- moraine run mcp
For the full tool contract and integration guidance, see docs/mcp/agent-interface.md.
Query the Database Directly
Moraine's ClickHouse tables are yours to query. The MCP search path is optimized for fast agent retrieval, but the underlying database holds the complete trace of every session — conversation turns, tool calls, token usage, timestamps, and more.
Connect to ClickHouse and explore:
clickhouse client -d moraine
-- sessions and their row counts
SELECT session_id, count(*) as events
FROM conversation_events
GROUP BY session_id
ORDER BY events DESC
LIMIT 10;
-- token usage across sessions
SELECT session_id,
sum(input_tokens) as input,
sum(output_tokens) as output
FROM conversation_events
WHERE input_tokens > 0
GROUP BY session_id
ORDER BY output DESC
LIMIT 10;
See sql/ for the full schema and view definitions.
Watched Sources
By default, Moraine watches:
| Source | Path |
|---|---|
| Codex | ~/.codex/sessions/**/*.jsonl |
| Claude Code | ~/.claude/projects/**/*.jsonl |
Configurable in ~/.moraine/config.toml under [[ingest.sources]].
Common Commands
| Command | What it does |
|---|---|
moraine up |
Start all services (ClickHouse, ingestor, monitor) |
moraine status |
Health check + ingest heartbeat |
moraine logs |
View service logs |
moraine down |
Stop everything |
Configuration
Default config lives in config/moraine.toml. Runtime config is resolved in order:
--config <path>flagMORAINE_CONFIGenv var (andMORAINE_MCP_CONFIGfor MCP)~/.moraine/config.toml
To customize, copy config/moraine.toml to ~/.moraine/config.toml and edit.
Moraine stores all runtime state under ~/.moraine. If ClickHouse is not already installed, moraine up auto-installs a managed build.
Install From Source
Requires a Rust toolchain (cargo, rustc):
git clone https://github.com/eric-tramel/moraine.git ~/src/moraine
cd ~/src/moraine
for crate in moraine moraine-ingest moraine-monitor moraine-mcp; do
cargo install --path "apps/$crate" --locked
done
Further Reading
- Operations runbook:
docs/operations/build-and-operations.md - Migration notes:
docs/operations/migration-guide.md - System internals:
docs/core/system-architecture.md - MCP tool contract:
docs/mcp/agent-interface.md
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found