v0.3.5-beta.2 · BSL 1.1

ThreadWeaver

AI chat where every conversation is versioned, branchable, and searchable — powered by AgentStateGraph.

SvelteKit + FastAPI + Rust · Self-host in 60 seconds

View on GitHub Read the Docs Self-Host Now

Not another chat wrapper

Branch any conversation

Every message is a branch point. Click to fork and explore "what if I'd asked differently?" without losing the original thread. Branches are O(1) — instant creation, instant discard. Compare approaches side by side, then commit the winner.

You
Assistant
Branch point
Original thread
3 messages
What if I asked differently?
2 messages

Full provenance on every message

Every message exchange is a versioned commit with intent, reasoning, and confidence metadata. Query by "why," not just "what." Blame any value to see who changed it, when, and with what reasoning. Powered by AgentStateGraph.

Checkpoint2:31 PM
Initialize cluster configuration
agent/setup95%
Explore2:32 PM
Evaluate network topology options
agent/planner72%
Refine2:33 PM
Apply mesh topology with failover
agent/planner89%

Rich markdown rendering

Code blocks with syntax highlighting, tables, headings, lists, links, blockquotes — all rendered inline. Paste images, drop files. Works with Claude, GPT, Gemini, Grok, and local models via Ollama.

Assistant
Setting up the pipeline
async def deploy(config):
  # Validate and push
  await validate(config)
  return push("prod")

Tool calling + MCP servers

Connect MCP servers with one click — filesystem, GitHub, SQLite, web search, and 100+ more. The AI reads files, runs commands, and queries databases. Full agentic loop with automatic tool dispatch and result integration. Opt-in human-in-the-loop approval gates any tool that could have side effects.

You
List the files in src/
Assistant
list_directory
src/lib/
src/routes/
src/app.html
src/app.css
Found 4 entries in src/. The project has a standard SvelteKit structure.

Compare branches, cherry-pick the best

Branching is only half the story. Open /compare to see any two branches side-by-side with word-level inline diff — every added, removed, and unchanged word lit up. Turn on merge mode, tick the messages you want from either side, and commit them to a new branch with both parents recorded. Nothing destructive happens to the originals.

Branch A1.2k · $0.008
Approach with eager loading
Branch B980 · $0.006
Approach with lazy loading
2 messages selected Merge into new branch

The rest of the feature set

🔊 Voice input & output

Record via the mic, Whisper transcribes into the textarea. Speaker button on every assistant message uses the browser's TTS — zero deps, offline.

🔗 Share as a link

Public read-only URL per conversation. Recipient doesn't need an account. Rotatable, revocable token.

📊 Cost & token stats

Per-message, per-conversation, and windowed stats (Today / 7d / 30d). Pricing overrides for any model you add.

🧩 Native hooks

Drop a Python file in backend/hooks/ or ship a pip package. Four kinds: inlet, outlet, stream, tool.

📜 Exports

Markdown, JSON, and PDF for every conversation and for the notebook. PDF is lazy-loaded so the bundle stays lean.

🌠 Templates

Reusable (system prompt, provider, model) presets. New chat from a template seeds the conversation instantly.

⌨ Keyboard shortcuts

⌘K search, ⌘N new chat, ⌘B sidebar, ⌘⇧C compare, ⌘/ for help.

🛡 BYOK demo mode

Flip one env var and every visitor pastes their own key. Keys live in their browser; conversations are per-session with a TTL sweep.

Built to run in production

Three passes of threat modeling and remediation — envelope integrity on every tool call, secrets encrypted at rest, session isolation for multi-tenant demos, and a reproducible dep graph.

🔐 Encrypted-at-rest BYOK config

Provider keys and secrets in threadweaver_config.json wrapped with Fernet + PBKDF2-HMAC-SHA256 (600k iterations). Master key via env var or OS keychain — never on disk in plaintext.

📊 Per-session isolation

Every demo-mode visitor gets their own conversation space, pinned by an X-Demo-Session header. Idle sessions expire on a background TTL sweep so state cardinality stays bounded.

🛡 Envelope integrity on tool calls

Every tool invocation carries a signed envelope with a trust-taxonomy tag. Replayed envelopes and oversized content payloads are rejected at the boundary before the agentic loop sees them.

📦 Pinned dep graph

backend/requirements.txt uses exact-version pins on every top-level dep; bumps are intentional and reviewed. Capture a full lockfile with pip freeze when determinism matters.

Works with your models

Claude GPT Gemini Grok Ollama OpenAI-compatible

Three layers, one primitive

SvelteKit Frontend
FastAPI Backend
AgentStateGraph (Rust)
LLM Providers
Claude GPT Gemini Grok Ollama Custom
MCP Servers
Filesystem GitHub SQLite Memory Search 100+ more

What makes ThreadWeaver different

FeatureTypical AI ChatThreadWeaver
Branching✗ Linear scroll only✓ Fork from any message
Compare branches✗ Copy/paste into a doc✓ Side-by-side view with word-level diff
Merge branches✗ Manual only✓ Cherry-pick messages into a new branch
📊Provenance✗ No history metadata✓ Intent, reasoning, confidence per commit
🔎Search✗ Ctrl+F at best✓ Full-text across all conversations
📓Notebook✗ Copy-paste✓ Tag, comment, branch, export md/JSON/PDF
🛠Tool calling✗ Chat only✓ MCP servers + agentic loop + HITL approval
🔊Voice✗ Rarely✓ Whisper dictation + TTS on every reply
🔗Sharing✗ Screenshot✓ Public read-only link, revocable
💵Cost visibility✗ Guess✓ Per-message + time-windowed stats
📁Projects✗ Flat list✓ Group related chats with shared context
🎨Multimodal✓ Some providers✓ All providers + paste / drop / file picker
🧩Extensibility✗ Fork the app✓ Native Python hooks: inlet / outlet / stream / tool
🌐Self-hosted✗ Cloud only✓ Docker + auto-HTTPS overlay, ARM64
📱BYOK✗ Subscription required✓ Bring your own API keys (demo mode: per-visitor)

Self-host in 60 seconds

terminal

      

Docker

docker compose up -d

Backend + frontend, one command

+ Ollama

docker compose -f ... up -d

Add local models (Llama, Mistral, Qwen)

Native

pip install && npm run dev

ARM64 / Jetson / PicoClaw ready

Built on AgentStateGraph

  • Every message exchange is a versioned commit with intent, reasoning, and confidence metadata
  • Sealed epochs provide tamper-evident audit trails — prove what happened, when, and why
  • Branch a conversation and the entire state graph forks — O(1) creation, instant discard
  • Authority chains track who authorized what, with full delegation history
a7f3...c2
commit
d1e8...9a
commit
f5b2...17
commit
SEALED

Tamper-evident epoch — every commit hashed, the chain verifiable offline