thoughtdag
Agent 与工作流chenxiachan/thoughtdag
ThoughtDAG 是一个无限画布,将 LLM 对话可视化为可编辑的思维图,用户可将材料、笔记和节点连接起来作为下一轮模型的上下文。它与 DeepSeek Harness 集成,支持多个代理,并包含搜索工具以跨对话定位历史上下文。
- agentic-search
- ai-tools
- context-engineering
- cordis-plugin
- dag
- deepseek-harness-plugin
- dsh-plugin
- human-in-the-loop
- infinite-canvas
- knowledge-graph
- llm
- local-first
- mcp
- note-taking
- ollama
- pkm
- react-flow
- research-tool
- self-hosted
验证与兼容性
这里展示目录实际采集到的证据;未声明的信息会明确标为未知。
- 当前版本兼容性
- 已在当前目录版本验证
- 声明的 Harness 范围
- 未声明
- 声明的平台
- 未声明
- 适用 Profile
- web
- 构建授权
- 未检测到需要
- 权限声明
- 未声明
- 外部服务
- 未声明
- 遥测声明
- 未知
这不是安全背书;安装前仍应查看源码、权限和配置。
查看证据与判定范围
验证仅覆盖标出的来源、版本和 Harness 环境,不代表未来版本仍然兼容。
dsh-thoughtdag@0.4.4- 插件已在隔离环境完成加载检查。
README
ThoughtDAG
Find the conversations. Decide what the model sees next.
Download ↓ · Website · Docs
中文 · DeepSeek Harness plugin · Find past context · Visual app · How it differs · Session Atlas · Research · Documentation
New · DeepSeek Harness Available!
ThoughtDAG runs as a view inside the DeepSeek Harness web UI: a 对话 | 思维图 switch above the chat. The canvas is where you decide what the harness sees next; the harness runs the turn.
dsh plugin --profile web add dsh-thoughtdag
dsh web
- Session Atlas sees all three agents. The harness's own sessions sit beside Claude Code and Codex; open one as a graph and it follows the conversation live.
- Ask from the canvas. Pick one of the harness's models, or DeepSeek Harness · Agent to run the question as a real harness turn with tools. The answer streams back into the node, and the turn stays in the harness's session log.
- The wires decide what the harness sees. Materials, notes and nodes wired into a question arrive as its context; a follow-up at the tail of a mirrored session continues that session.
The plugin bundles the canvas; no other ThoughtDAG install is needed. Requires Node 22.19+ and DeepSeek Harness 0.1.2-rc or later.
New · Pinpoint the context you need across agents
Start with a code file, an exact phrase, a URL, or a paper. ThoughtDAG searches your local agent conversations and takes you back to the matching turn.
Try it without installing anything:
npx thoughtdag why src/lib/api.ts
npx thoughtdag find "a phrase you remember"
For regular use, install the CLI and connect its read-only MCP tools:
npm install -g thoughtdag
thoughtdag setup mcp
Your agent can then call why_check, why_file, find, and recall_turn directly. Conversations from Claude Code, Codex, DeepSeek Harness, and ThoughtDAG canvases are indexed together on your machine; the desktop app is not required.
What it can find
Which conversations changed or mentioned this code
$ npx thoughtdag why src/lib/api.ts
why src/lib/api.ts · 12 turns in 6 sessions
claude-code ✏️ edit Q: Can the API detect vision support?
Δ storedProviders → storedProviders, storedVision…
…
Which conversations discussed this concept
$ npx thoughtdag find "context.committed" --in q
find "context.committed" · 21 turns in 12 sessions
claude-code Q: …add context.committed to the event contract…
codex Q: …context.committed is already half implemented…
…
Which conversations discussed this file, paper, or webpage
$ npx thoughtdag find "arxiv" --in m
find "arxiv" · 1 turn in 1 canvas
thoughtdag M: …collective intelligence, artificial life · arXiv:2606.26733…
Real local results, shortened to the most useful lines.
Give agents less irrelevant history. Reduce context-driven hallucinations and wasted tokens. Improve answer accuracy. The query layer brings back only the matching history; the canvas lets you cut contaminated branches before they shape the next answer.
Want to explore and shape the context visually?
The full desktop app adds Session Atlas, an editable context canvas, PDF and file readers, model and search connections, clipping, export, and handoff.
brew install --cask thoughtdag
Or use the download page for macOS, Windows, and Linux.
The one rule
Wires are the context. What the model sees is exactly what wires into the node. Editing the graph edits the model's memory.
Many tools put conversations on a canvas. In ThoughtDAG, a wire is not decoration or an execution route. It determines what the model sees next.
In action
One principle behind every gesture: the human in the loop, the model on the wires. No autonomous agent redraws your graph.
✂️ Delete one edge, get a different answer
The model sees only what wires in. Delete the noise edge, ask again, and the same prompt returns a clean answer. Reproduce it in chapter ③ of the example canvas.
📖 Read a paper into a map
Select a passage, ask right there. The answer lands on the canvas with its page number, and the p.N chip jumps back to the page. Finish the paper, and the map is drawn.
💎 Condense, zoom out, and export the shape
Merge nodes into a higher conclusion; weave highlights into cited prose. Zoom through full cards, takeaway plaques and an icon skeleton. Then export the current structure as a light or dark Thought Map.
🧭 Session Atlas: bring agent conversations onto the canvas
Bring work scattered across different agents into one editable context graph. Continue from any node, then bring the new work back to where the thought began.
Currently supports local Claude Code, Codex, and DeepSeek Harness sessions, with more agent integrations in development. Source sessions remain read-only.
How ThoughtDAG differs
Many products use nodes and edges, but the graph does a different job in each category.
| Product category | How it differs from ThoughtDAG |
|---|---|
| Linear chat | Context follows one chronological thread; ThoughtDAG selects and merges visible paths. |
| Mind maps and whiteboards | Edges organize ideas for people; ThoughtDAG edges also change model input. |
| Branching chat canvases | They usually follow one inherited branch; ThoughtDAG can merge or prune several paths. |
| Workflow and agent canvases | Edges run tasks and data; ThoughtDAG edges control conversational context. |
| RAG and automatic memory | The system retrieves context automatically; ThoughtDAG makes the selection visible and editable. |
| Code structure graphs | They answer what connects to what; ThoughtDAG finds the conversations and decisions that shaped it. |
| Agent memory and conversation search | They retrieve text; ThoughtDAG indexes what agents did to files and materials, then lets you control what moves forward. |
| Harness context viewers | They show what a session carries now; ThoughtDAG lets you compose what the next turn receives, and sends it as a real turn. |
ThoughtDAG is a user-authored context graph: incoming paths and explicit references form the next request, while excluded work stays visible on the canvas.
🗺️ Export the shape of your thinking
The export keeps the nodes, wires and high-level structural counts. Different questions and different ways of exploring them leave visibly different maps.
More ways to run
Run from source
npm install
npm run server # LLM proxy :3001
npm run dev # → localhost:5173
# No .env? Connect any OpenAI-compatible endpoint inside the app
Environment variables, local models and connection details → docs/setup.md
Browser demo
Want a ten-second look before installing anything? The hosted demo runs in the browser, and the example canvas needs no key. It is a feature subset: Session Atlas, local session discovery, keyless web search, some direct-connection tools and the subscription bridge are desktop/local-only.
🧪 Research: Why editable context matters
Context Intervention Benchmark · Pilot v2
9 models · 1,485 test runs · $0 in free tiers · answers scored by exact match
Context does not only fade as conversations grow longer. A wrong statement flows into the replies that come after it and undermines the truthfulness of every later conclusion. Our benchmark verified this across nine language models and found the effect to be widespread: deleting the message that introduced the error is often not enough, because the follow-up replies still carry it. Restoring correct answers required cleaning up the affected passage as a whole, or letting the model rewrite it. In one model whose step-by-step thinking we could switch on and off, the minimal cleanup only worked while thinking was on. Managing context, not just accumulating it, decides what a model gets right.
The full report explains the method, the numbers and their statistics, and what this does and does not establish. It does not rank models and does not explain their inner workings; it tests one observable claim: changing what a model sees changes what it answers next.
📖 Read the first case study · 📊 Methodology and results · 🗳️ Suggest the next model · 🧪 Contribute a run or case
More capabilities
| Capability | What it does |
|---|---|
| 📤 Read-only share | One link carries the whole graph: no account, no server storage |
| 🧭 Staleness & replay | Upstream edits mark the answers they invalidate; replay in dependency order, token estimate first |
| ✂️ Clipping | Select a passage or drag a rectangle in the reader; it becomes canvas material with page provenance |
| 🔌 Any model | Per-node pins that follow the line; text-only models read images through their companion text |
| 🧭 Agent session continuity | Bring sessions from different agents into one map; continue from any node and return the result to the graph. |
| 🔒 Local-first | Automatic folder backup writes real files; point it at a synced folder for cross-device |
Full feature list (60+, grouped by area) → docs/features.md
Models, cost & privacy
Connect a local Ollama or any OpenAI-compatible endpoint. Built-in presets, subscription connections and environment variables are documented in setup.
- The free model tier covers every feature; a local Ollama runs fully offline
- In the desktop app everything lives on your machine: canvases, keys, documents; on the web demo, model traffic runs browser-direct and keys never touch the server
- PDFs never leave your machine; only extracted text travels when you ask
- Inside DeepSeek Harness, model calls use the harness's own providers and keys; ThoughtDAG adds no key of its own, and images and link fetches go through the harness's attachment store and bounded fetcher
- The backup format stays backward compatible; Markdown export is the permanent escape hatch
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.
The graph is acyclic. You are the loop.