SessionGraph: Local Coding Agent Session Indexing, MCP Search & Execution Graphs

SessionGraph (`npx sessiongraph`) is a local-first indexing engine and desktop visualizer that aggregates coding agent sessions across 40+ harnesses—including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and Antigravity—into one searchable graph exposed via REST API and an MCP `search_sessions` tool.
SessionGraph: Local Coding Agent Session Indexing, MCP Search & Execution Graphs: SessionGraph (`npx sessiongraph`) is a local-first indexing engine and desktop visualizer that aggregates coding agent sessions across 40+ harnesses—including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and Antigravity—into one searchable graph exposed via REST API and an MCP `search_sessions` tool. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 40+ Harness Coverage: Automatically parses local session stores from Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Cline, Roo Code, Pi, Goose, Zed Agent, and Antigravity.
- 100% Local & Private Indexing: Runs via `npx sessiongraph` or native desktop installers (macOS Apple Silicon/Intel, Windows MSI, Linux DEB/RPM/AppImage) with zero cloud upload.
- Cross-Harness MCP Retrieval: Exposes `search_sessions({ query })` over MCP so an active agent in one harness can query past fixes solved in another.
- Local HTTP REST API: Serves programmatic `GET /v1/search?query=...` queries for custom evaluation pipelines, regression audits, and Smoke Monkey Canvas widgets.
import { createAgent } from '@smoke-monkey/harness';const debugAgent = createAgent({agentId: 'sessiongraph-cross-harness-debugger',provider: 'anthropic',model: 'claude-sonnet-4-5',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},mcpServers: {sessiongraph: {command: 'npx',args: ['-y', 'sessiongraph', '--mcp'],},},});async function recoverPriorFix() {const result = await debugAgent.run('Call search_sessions for "invoice retries" to inspect how Codex and Claude Code previously fixed duplicate retry backoff, then apply the pattern here.');console.log('Cross-Harness Context:', result.summary);}recoverPriorFix().catch(console.error);
Watch: Related Video Guides
Why AI Agents Need RAG + Observability
Observability and Evals for AI Agents: A Simple Breakdown
What Is SessionGraph? Solving Multi-Harness Transcript Silos
SessionGraph is a local developer tool launched via npx sessiongraph that reads the on-disk session stores of more than 40 AI coding harnesses, normalizes their tool calls and conversation trees into a unified database, and renders them as an interactive dependency and activity graph. Every query runs locally without transmitting proprietary diffs to external telemetry servers.
Modern engineering teams rarely use a single coding agent. An engineer might prototype in Cursor, run a batch refactor in Claude Code or Codex, and debug an inference server with Pi or Antigravity CLI—leaving critical architectural decisions trapped in incompatible JSONL and SQLite logs.
Supported Harnesses, MCP Tools & Local REST Endpoints
Beyond the desktop graph explorer, SessionGraph turns historical transcripts into live agent memory through two programmatic interfaces: an MCP server and a local HTTP API.
| Interface / Surface | Invocation / Endpoint | Primary Use Case |
|---|---|---|
| Instant CLI Launch | npx sessiongraph | Index local stores and open graph explorer |
| MCP Tool Call | search_sessions({ "query": "invoice retries" }) | Let active agents recall fixes across harnesses |
| HTTP REST Search | GET /v1/search?query=invoice%20retries | Query hits from scripts, CI checks, or dashboards |
| Supported CLIs & IDEs | 40+ harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Cline, Roo, Pi, Antigravity) | Cross-tool history unification |
Because the REST endpoint returns structured JSON ({ data: { hits: [{ session: { title } }], total } }), scripts can extract recurring failure patterns across teams or feed verified fix trajectories into post-training datasets.
Cross-Harness Handoffs Without Context Loss
Instead of copy-pasting markdown summaries when switching from Codex to Claude Code or Smoke Monkey Harness, attach SessionGraph as an MCP server so the new agent retrieves the exact prior debugging trace directly.
Running SessionGraph Locally & Querying via HTTP
Teams can start SessionGraph immediately with Node.js via npx sessiongraph or install native packages for macOS (Apple Silicon / Intel), Windows (MSI), and Linux (x64/ARM64 AppImage, DEB, RPM).
# Launch local session indexer and interactive graph UI
npx sessiongraph
# Query the local index from bash or CI scripts
curl -s "http://localhost:3000/v1/search?query=invoice%20retries" | jq '.data.hits[]'Pair SessionGraph with Smoke Monkey Canvas Execution
While SessionGraph maps retrospective history across third-party CLIs, Smoke Monkey Canvas visualizes live multi-agent topologies in real time—tracking file locks, subagent delegation edges, and verification gates as code changes happen. Connecting SessionGraph's MCP search_sessions tool to a Smoke Monkey Canvas coordinator agent bridges historical institutional memory with live parallel execution.
Frequently Asked Questions
Q:Does SessionGraph upload my coding agent transcripts to the cloud?
No. SessionGraph reads your local harness session files, builds the search index on your machine, and serves both the desktop UI and `/v1/search` REST API locally.
Q:Which AI coding harnesses does SessionGraph support?
It indexes over 40 harnesses including Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI/Chat, OpenCode, Cline, Roo Code, Kilo Code, Pi, Amp, Goose, Zed Agent, Antigravity CLI/IDE, DeepSeek Harness, and Unsloth Studio.
Q:How can an active coding agent search past SessionGraph sessions?
Connect SessionGraph's MCP interface so the agent can invoke `search_sessions({ query: "..." })`, returning matching session titles and context from any indexed harness.
Q:What desktop platforms have native SessionGraph installers?
Alongside `npx sessiongraph`, official binaries are provided for macOS (Apple Silicon and Intel), Windows (MSI), and Linux (x64 and ARM64 AppImage, DEB, and RPM).
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.