selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

ThoughtDAG logo

Self-host ThoughtDAG

v0.5.26

AI chat graph on an infinite canvas with editable context

BetaOpen SourceMIT
docker run --rm -i --network none thoughtdag-mcp
Updated9 hours ago
LanguageTypescript
Setup difficultyEasy
Stars
715
Ports
3001 (LLM proxy server), 5173 (Frontend dev server (http://localhost:5173))
First-launch screen offering entries to ask a question, add material, open local agent sessions, or connect a model.Model connection window showing connection type, authorization, API key and the storage boundary.

What is ThoughtDAG?

Should you self-host ThoughtDAG?

ThoughtDAG scores 51/100 on selfhost.directory (how scoring works) and ranks #25 of 69 in AI Chat. It has 715 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v0.5.26, came out on 25 October 2026. New versions land roughly every 1 days.

Setup is easy: most people get it running in one sitting. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is LibreChat (85/100, 46 421 stars). It scores higher overall, so compare the two before you pick. See ThoughtDAG vs LibreChat side by side.

Features

  • Branching and pruning
  • CLI history search
  • Condense and Weave
  • Context preview
  • Document reader
  • Graph-based AI conversations
  • Local memory and recall
  • Local model support
  • MCP Server
  • Per-node model selection
  • Read-only sharing
  • Replay and staleness tracking
  • Session AtlasDesktop app or local hosting only
  • Thought Map export

ThoughtDAG README

How to install ThoughtDAG

Install ThoughtDAG with Docker

docker build -f cli/Dockerfile -t thoughtdag-mcp cli
docker run --rm -i --network none thoughtdag-mcp

Only the CLI/MCP server is containerized, built from the provided Dockerfile; the app itself is not published as an image.

How to configure ThoughtDAG

  • ANTHROPIC_API_KEYAnthropic Claude — https://console.anthropic.com/

    Anthropic Claude — https://console.anthropic.com/

  • ANTHROPIC_MODELS
  • ANYSEARCH_API_KEYAnySearch (optional): web search runs keyless on its anonymous per-IP tier when no GLM key is set; a free-signup key lifts the daily quota.

    AnySearch (optional): web search runs keyless on its anonymous per-IP tier when no GLM key is set; a free-signup key lifts the daily quota.

  • DASHSCOPE_API_KEY─── Cloud providers ───────────────────────────────────────────────── Qwen via DashScope (Alibaba Model Studio) — https://dashscope.console.aliyun.com/

    ─── Cloud providers ───────────────────────────────────────────────── Qwen via DashScope (Alibaba Model Studio) — https://dashscope.console.aliyun.com/

  • DASHSCOPE_MODELS
  • DEEPSEEK_API_KEYDeepSeek — https://platform.deepseek.com/ The same key can serve web search: pick "DeepSeek Search" as the engine in the model menu ($0.75 per 1,000 successful searches).

    DeepSeek — https://platform.deepseek.com/ The same key can serve web search: pick "DeepSeek Search" as the engine in the model menu ($0.75 per 1,000 successful searches).

  • DEEPSEEK_MODELS
  • GOOGLE_API_KEYGoogle Gemini — https://aistudio.google.com/

    Google Gemini — https://aistudio.google.com/

  • GOOGLE_MODELS
  • MAX_OUTPUT_TOKENS─── Server ────────────────────────────────────────────────────────── Output ceiling per generation. OpenRouter pre-authorizes the requested max_tokens against your balance, so keep this modest on small credits.

    ─── Server ────────────────────────────────────────────────────────── Output ceiling per generation. OpenRouter pre-authorizes the requested max_tokens against your balance, so keep this modest on small credits.

  • MOONSHOT_API_KEYKimi / Moonshot — https://platform.moonshot.cn/ (international accounts: set MOONSHOT_BASE_URL=https://api.moonshot.ai/v1)

    Kimi / Moonshot — https://platform.moonshot.cn/ (international accounts: set MOONSHOT_BASE_URL=https://api.moonshot.ai/v1)

  • MOONSHOT_MODELS
  • OLLAMA_BASE_URL
  • OLLAMA_MODELS─── Local ─────────────────────────────────────────────────────────── Ollama: list the local models to expose (registers only when set)

    ─── Local ─────────────────────────────────────────────────────────── Ollama: list the local models to expose (registers only when set)

  • OPENAI_API_KEYOpenAI — https://platform.openai.com/

    OpenAI — https://platform.openai.com/

  • OPENAI_MODELS
  • OPENROUTER_API_KEY─── One key for everything ────────────────────────────────────────── OpenRouter routes 300+ models behind a single key — https://openrouter.ai/keys List any vendor/model slugs from https://openrouter.ai/models (vision capability is detected automatically from OpenRouter metadata).

    ─── One key for everything ────────────────────────────────────────── OpenRouter routes 300+ models behind a single key — https://openrouter.ai/keys List any vendor/model slugs from https://openrouter.ai/models (vision capability is detected automatically from OpenRouter metadata).

  • OPENROUTER_MODELS
  • PORT3001Port for the LLM proxy (frontend expects 3001 unless VITE_API_BASE is set)

    Port for the LLM proxy (frontend expects 3001 unless VITE_API_BASE is set)

  • ZHIPU_API_KEY─── Free tier ─────────────────────────────────────────────────────── Zhipu GLM (free: glm-4.5-flash text + glm-4v-flash vision; also powers agentic web search, ~¥0.01/query) — https://open.bigmodel.cn/

    ─── Free tier ─────────────────────────────────────────────────────── Zhipu GLM (free: glm-4.5-flash text + glm-4v-flash vision; also powers agentic web search, ~¥0.01/query) — https://open.bigmodel.cn/

ThoughtDAG releases & version history

FAQ

Will all my past chats appear automatically?

No — the desktop app only indexes supported local records you have connected, cannot restore unsaved history, and cannot automatically access chats stored only in a web account.

How does branching support nonlinear thinking?

You keep alternative questions on separate branches, compare them on the canvas, and connect selected findings into a new downstream question; a branch inherits its upstream conversation path.

Can I edit context without deleting the conversation?

Yes — removing a wire removes that route from a later request while the nodes stay; you should still check other input paths, attachments and recall, and existing answers only change when you regenerate.

More in Notes & Editors

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…