ThoughtDAG
This server lets you query local agent-session history for artifacts and past conversation content, then inspect full turns.
Check history before editing: ask whether a file, URL, or
arxiv:<id>has any history in local agent sessions.Trace file-specific work: list turns that touched a file, URL, or paper, with observed changes, questions, candidate explanations, optional reads, and deep links.
Search exact phrases: find where exact, case-insensitive words were asked, answered, or attached across local sessions, canvases, and Claude Code/Codex memories.
Replay a turn: retrieve a full turn by session id/prefix and turn number, including question, answer, tool calls, and diffs.
ThoughtDAG
An open-source AI canvas that makes model context visible, editable and testable.
Each exchange becomes a node. Wires are the context. Branch a side question, connect the paths you need, and choose what the model sees next.
Download · Website · Research · Docs · 中文
What it does
Edit the context. Wires decide which conversation paths reach the next question. Disconnect a path and its nodes stay on the canvas. Preview the request before you send it.
Branch from what you read. Ask from a passage in an answer, a PDF, an image or a web page, or clip it into its own node with its source.
Continue earlier work. Open local Claude Code, Codex, DeepSeek Harness and Pi sessions as graphs. Recall brings relevant past discussions into a question, with an optional Jev decision layer to rank excerpts.
Related MCP server: io.github.aytzey/showagent
Get started
Use it as | Start with |
Desktop app (macOS, Windows, Linux) |
|
A plugin inside DeepSeek Harness |
|
CLI and read-only MCP for your agent |
|
From source |
|
The browser demo opens an example canvas without an API key. Local sessions and recall need the desktop app or a local run.
Research
A model's next answer depends on the context it reads in that turn, including tool output, thinking and what earlier turns left behind. These reports measure that context, and ThoughtDAG makes it editable. Methods, data and scripts are public. All research →
Study | Result |
The answer a person reads was 1 to 7% of an agent turn's tokens across 3,237 turns, and Claude Code and DeepSeek Harness kept the thinking in context. From the author's own logs. | |
Context Repair for LLMs · pilot v2, Aug 2026Report · 中文 · case study | Across 162 derailed outcomes (18 cases × 9 model endpoints), deleting only an error's source repaired 152; removing the contaminated subgraph repaired all 162. |
Visualizes agent workflows as maps you can unfold from the overview to each action, with answers linked to the original records. Its reading layer builds on ThoughtDAG's zoom summaries. |
The one rule
Wires are the context. Connect conversation paths to use them in the next question. Disconnect a path without deleting the work.
ThoughtDAG walks a node's incoming wires, orders the relevant ancestors and builds the messages sent to the model. Explicit references and enabled recall can add material alongside them. Context guide →
Compared with | ThoughtDAG's focus |
Linear chat | Keep several lines of inquiry and choose which ones continue into the next question. |
Mind maps and whiteboards | Connections change the model's input, not only the layout. |
Agent workflow canvases | Edit conversational context as you explore, rather than design a pipeline of automated tasks. |
Retrieval and automatic memory | Inspect the source-linked material a request uses, and edit or exclude it. |
All capabilities and the roadmap →
Models, cost and privacy
Canvases, documents and the history index stay on your machine. Remote model calls send the relevant content to the providers you configure, and those providers may charge. Local Ollama and OpenAI-compatible endpoints work too. Setup and privacy →
Contributors
Contributions are welcome. Start with CONTRIBUTING.md.
Supporters
With gratitude to @andreilaiter, ThoughtDAG's first supporter, and to everyone helping this independent open-source project grow.
Cite
@software{chen_thoughtdag_2026,
author = {Chen, Xia},
title = {ThoughtDAG: an instrument for legible human-AI collaboration},
year = {2026},
url = {https://github.com/chenxiachan/thoughtdag},
license = {MIT}
}Available Tools
4 toolsfindC
Where these exact words were asked (Q), answered (A) or attached (M) across local sessions, canvases and the memories Claude Code and Codex keep for themselves. Exact, case-insensitive match; every hit is a verbatim snippet with a pointer.
Inputs: phrase (required), in, limit.
recall_turnA
One turn in full — the question, the answer, the tool calls with their diffs — by session id (or prefix) and turn number as shown by why_file.
Inputs: turn (required), session (required).
why_checkA
Cheap first question before editing a file: does this artifact have any history in local agent sessions? One line; history true/false.
Inputs: path (required).
why_fileC
The turns across local Claude Code, Codex, DeepSeek Harness, Pi and ThoughtDAG sessions that touched a file, URL or paper: when, what changed (Δ, observed), what was asked, what the answer said about it (≈, a candidate explanation, not a verified reason). Each hit carries a deep link.
Inputs: path (required), limit, include_read.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools separate along clear axes: find does keyword search, why_file retrieves turns touching a specific artifact, why_check gives a quick boolean for artifacts, and recall_turn fetches a specific turn. why_check is a lightweight version of why_file and find overlaps with why_file for file-related queries, but the descriptions make intended usage clear.
All names use lowercase snake_case, but the patterns are mixed: find is a bare verb, recall_turn is verb_noun, while why_check and why_file use a why_ prefix. The inconsistency is readable but not a uniform verb_noun convention.
With only four tools, the set is tightly scoped for a session-history retrieval server, and each tool serves a distinct retrieval depth (keyword search, artifact existence check, artifact history, full turn). No obvious filler tools are present.
The surface covers keyword search, artifact-based history, existence checks, and full-turn retrieval, which supports the core recall workflows. It lacks session enumeration or time-range filtering, but agents can work around these gaps by searching known terms.
Maintenance
Related MCP Connectors
Search ATProto writing, annotations, identity, agents, and forum posts. 12 read-only tools.
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Search and save your coding work in a CoralSwarm ocean: sessions, decisions, meetings.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseAqualityCmaintenanceSearch past OpenCode conversation history before starting new work on a module or file, via a local read-only FTS5 index built from OpenCode's own SQLite database. No network calls, fully local. 7 tools for keyword search, file lookup, and session browsing.743 PyPI4MIT
- AlicenseAqualityBmaintenanceServes local coding-agent session history over stdio, letting MCP-capable agents search past sessions across Codex, Claude Code, Gemini CLI, OpenCode, jcode, and Pi and read bounded, secret-redacted transcripts. Read-only mode restricts it to search and transcript tools, while write-enabled mode can create copies of a conversation in another agent's native format.362MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to run cross-runtime, cross-machine BM25 full-text search over historical conversations from Hermes, Google Antigravity, OpenClaw, Codex, and Claude Code, and to retrieve any past session's full transcript by ID. Queries return only ranked matching snippets, so recall costs no extra tokens or embeddings.MIT
- AlicenseNot gradedqualityBmaintenanceExposes read-only tools over stdio that let an agent search the user's past Claude Code sessions by keyword and meaning, open exchanges with their neighbours, brief whole sessions, and trace everything touching a file, commit, PR or URL. The agent retrieves for itself and answers from what comes back, so it can recall what was said or decided in earlier conversations without leaving the machine.18 npmMIT