ThoughtDAG: Editable Context Graphs for LLM Conversations
AI News

ThoughtDAG: Editable Context Graphs for LLM Conversations

4 min
8/16/2026
ThoughtDAGLLM ContextAI ToolsOpen Source

Introduction: The Problem of Invisible Context

For anyone who has wrestled with a long, winding ChatGPT conversation, the frustration is familiar: the model's responses drift, influenced by irrelevant tangents, while you struggle to understand why. Traditional chat interfaces show the history, but they obscure which parts of that history are actually influencing the next response. This is the problem ThoughtDAG, a new open-source project, aims to solve.

ThoughtDAG, which stands for Directed Acyclic Graph, is an editable context graph designed for LLM conversations. Instead of a linear chat history, it structures every question-and-answer exchange as a node, and every connection as a piece of context. The core premise is powerful: you don't just read the chat history; you edit what the model actually sees.

What is ThoughtDAG?

ThoughtDAG transforms the way we interact with Large Language Models by making the context explicit and manipulable. As the project's tagline states, "The graph is not a picture of context. The graph is the context." This means the graph itself is the message sequence sent to the model, not merely a visualization of it.

The tool offers four key operations:

  • Branch: Explore alternative interpretations without overwriting your current path.
  • Prune: Keep a useful detour on the canvas but exclude it from the next request.
  • Merge: Bring selected evidence and reasoning paths back together in one answer.
  • Inspect: Preview what the model will receive before generation, including source nodes, order, and token count.

This approach directly confronts the issue of "invisible context." In a linear conversation, all 87 messages might be sent to the model, including unrelated branches like "what should I eat tonight?" ThoughtDAG allows you to visually sever that edge, removing the dinner detour from the context and seeing the token count drop.

The Power of Editable Context

The practical implications are significant. Consider a research task where you've asked the model to summarize a paper, but a previous question about dinner plans has polluted the context. The summary might include an irrelevant suggestion about hot pot. With ThoughtDAG, you can see the polluted path in the graph, delete the edge connecting the dinner detour, and regenerate the answer. The result is a clean, contextually relevant summary.

The project's demo illustrates this with a token count comparison: one path sends 1,284 tokens, while after deleting an unrelated edge, it drops by 47 tokens. This transparency is crucial for reproducibility. As the project notes, "The words are identical. Only one edge changed." This level of control is a step toward more deterministic and reliable AI interactions.

continue reading below...

Technical Architecture and Workflow

ThoughtDAG is built with HTML, CSS, and JavaScript, and it leverages LLMs for real-time insights. The hosted demo presents the core interaction model, while the local setup adds a full PDF workflow. This includes clipping passages and figures into source-linked nodes, as well as web search and MCP (Model Context Protocol) integration.

The workflow is designed to be intuitive: you can ask questions directly from a selected passage in a PDF, turn that passage into a source-linked node, and then wire it into the graph. Provenance stays attached, and the context remains yours to control. The tool's emphasis on inspectability means you always know what the model will read before you send a request.

Market Context and Implications

ThoughtDAG arrives at a time when the AI industry is grappling with context management. As models become more powerful, the ability to manage their input becomes a critical differentiator. Tools like this could be particularly valuable for developers building sophisticated AI applications, researchers analyzing documents, or anyone who needs to maintain a clear, auditable trail of reasoning.

The Hacker News community has shown interest in the project, with early discussions focusing on its potential and its narrow but compelling use case. The Tech Spindle score reflects this, rating it high on innovation (50) but moderate on impact (35), suggesting that while the idea is novel, its practical application may be limited to specific workflows.

Conclusion

ThoughtDAG represents a thoughtful response to a real problem in LLM interactions: the lack of control over context. By making the graph the context, it offers a level of transparency and editability that traditional chat interfaces cannot match. While it may not be a tool for everyone, for those who need to manage complex, multi-branch conversations with precision, it offers a compelling new paradigm.

The project is open-source and available on GitHub, with a live demo for those who want to experience the interaction model firsthand. As AI tools continue to evolve, ThoughtDAG's approach to context management could well influence the next generation of AI interfaces.