Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@contextberg/agent-history) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@contextberg/agent-history
Review all your AI coding agent conversation histories in one place.
AI coding agents like Claude Code, Cursor, and Codex write history to local JSONL files or SQLite databases after every conversation. These logs are packed with reasoning for bug hunting, architectural decision-making, and error recovery logs. However, without a cross-tool way to reference them, most histories lie dormant and unread.
@contextberg/agent-history reclaims that history via both a browser-based UI and an MCP server.
Supported Tools
| Tool | Source |
|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl |
| Cursor | ~/.cursor/projects/ |
| OpenClaw | ~/.openclaw/agents/ |
| Codex | ~/.codex/sessions/ |
| Hermes | ~/.hermes/state.db |
| GitHub Copilot | 🚧 Contributions Welcome |
Quick Start
npx @contextberg/agent-historyThe browser will open automatically. No installation required.
To install globally:
npm install -g @contextberg/agent-history
agent-historyUsing as an MCP Server
Add it to your configuration file (e.g., Claude Desktop):
{
"mcpServers": {
"agent-history": {
"command": "npx",
"args": ["-y", "@contextberg/agent-history", "--mcp"]
}
}
}Once configured, you can bring past session content into your agent's context by calling the get_agent_history tool.
Roadmap
coming soon
Contributing
Contributions are welcome! Adding support for new agent tools is the most common way to contribute.
Quick Start:
git clone https://github.com/contextberg/agent-history
cd agent-history
npm install
npm run dev # Starts API server (3847) + Vite (5173) simultaneously → opens http://localhost:5173Adding a new tool:
Simply implement the IReader interface in a new file and register it in three places.
export interface IReader {
readonly source: AgentSource;
isInstalled(): Promise<boolean>;
read(options?: ReaderOptions): Promise<AgentSession[]>;
}- Create
src/readers/<toolname>.tsand implementIReader. - Add to the
AgentSourcetype (src/readers/types.ts). - Register in the reader list of
AgentHistoryService(src/readers/index.ts). - Add to the MCP schema enum (
src/mcp/server.ts).
Keep all source-specific logic strictly within the reader layer.
License
MIT — see LICENSE. Built by Contextberg.