cd /news/large-language-models/i-made-llm-context-editable-a-graph-… · home topics large-language-models article
[ARTICLE · art-74360] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

I made LLM context editable: a graph where the wires are the prompt

A developer built ThoughtDAG, an open-source prototype that represents LLM conversations as a directed acyclic graph where edges determine which upstream nodes are included in the model's context. The tool allows users to manually edit context by deleting edges, making model memory visible and human-controlled rather than delegated to retrieval or agents.

read2 min views2 publishedJul 26, 2026

Most LLM interfaces present a conversation as a transcript.

That works until the conversation branches.

One branch contains useful research. Another is a discarded hypothesis. A third is an unrelated detour. The interface may show where they came from, but the user often cannot see exactly which branches will be included in the model's next request.

I wanted to make that state editable.

I built an open-source prototype called ThoughtDAG.

Every question-and-answer exchange is a node on an infinite canvas. An edge is not merely a visual relationship: it determines which upstream nodes are included when the next request is constructed.

When a user asks from a node, ThoughtDAG walks its incoming graph, orders the relevant ancestors, and turns them into the message sequence sent to the selected model.

Delete an edge and regenerate the same prompt, and the deleted branch is no longer part of the model's context.

[Insert the edge-deletion GIF here] I did not want an autonomous system that silently reorganized the user's ideas.

The graph is directed because context flows from earlier reasoning into later reasoning. It is acyclic because a node should not recursively include itself in its own history.

This makes three operations explicit:

The graph is therefore not an agent workflow. It is a visible, human-controlled representation of model memory.

The canvas is stored in IndexedDB in the browser. There is no account or hosted database.

ThoughtDAG can connect to Ollama for local inference, or to an arbitrary OpenAI-compatible endpoint. PDFs remain on the user's machine; only extracted text is sent when a remote model is deliberately used.

The project is MIT licensed and built with React, TypeScript, React Flow, Zustand, Express, and the Vercel AI SDK.

Repo: https://github.com/chenxiachan/thoughtdag The question I am testing now is whether people actually want to control context manually, or whether they would rather delegate memory selection to retrieval and agents.

I would be interested in critiques of that interaction model, especially from people building long-running LLM interfaces.

── more in #large-language-models 4 stories · sorted by recency
── more on @thoughtdag 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-made-llm-context-e…] indexed:0 read:2min 2026-07-26 ·