# ThoughtDAG

> ThoughtDAG is an open-source, self-hostable AI chat canvas: every exchange is a graph node, and its wires decide the context your model receives next.

- **Category:** AI Chat
- **Licence:** MIT
- **Latest version:** v0.5.26
- **Open source:** oss
- **Languages:** Typescript, JavaScript
- **Platforms:** Docker, Windows, macOS, NPM, AppImage, Build from Source
- **Tags:** Mcp, Dag, Local First, LLM, Deepseek, Ollama, Knowledge Graph, Ai Tools, Self Hosted, Note Taking, Context Engineering, Pkm, Infinite canvas, Human in the loop, React Flow, Research Tool, Agentic Search, Context Graph, Agent Sessions, Recall, Dsh Plugin, Branching Chat, Document Reader, Cordis Plugin, Deepseek Harness Plugin

## Description

ThoughtDAG puts LLM chats on an infinite canvas as a graph you can edit: a node holds one question plus its answer versions, and only the edges flowing into that node decide which earlier exchanges the model will read. Pull out a wire and that branch is really gone from the next request; a preview panel shows the assembled prompt and its token cost before anything is sent. Documents — PDFs, pictures, HTML, DOCX, Markdown — open as material nodes, so you can question a chosen passage or turn a figure into a standalone node that keeps its page provenance. A machine-built index of transcripts from local coding agents (Claude Code, Codex, Pi and DeepSeek Harness) powers Session Atlas mirror graphs, topic dossiers and opt-in recall; the `thoughtdag` CLI queries that same index from a terminal (why, find, topics) and exposes it to agents as read-only MCP tools. Model access runs through provider presets, OpenRouter, Ollama, or any OpenAI-compatible endpoint, configured in the UI or via `.env`, with per-node model pinning. Data stays on your machine, though remote providers obviously receive whatever context you route to them. Ship it as the desktop app (Homebrew cask or GitHub Releases installers for macOS, Windows and Linux), or host it yourself with npm — an LLM proxy at 3001 alongside a 5173 frontend; the hosted browser demo leaves out the local history and memory layer. The project is pre-1.0 (0.5.x) and its own docs note it is neither an autonomous research agent nor a coding-harness replacement.

## Links

- [Homepage](https://github.com/chenxiachan/thoughtdag)
- [Website](https://chenxiachan.github.io/thoughtdag/)
- [Demo](https://app.thoughtdag.workers.dev)
- [Documentation](https://chenxiachan.github.io/thoughtdag/docs/)
- [GitHub Releases](https://github.com/chenxiachan/thoughtdag/releases)
- [YouTube tour](https://www.youtube.com/watch?v=-8BqAyaoNXQ)

---
Source: https://selfhost.directory/project/thoughtdag