Thoth
Thoth - Personal AI Sovereignty. A local-first AI assistant with 23 integrated tools, a personal knowledge graph, voice, vision, shell, browser automation, scheduled tasks, health tracking, and messaging channels. Run locally via Ollama or add opt-in cloud models. Your data stays on your machine.
Install / Use
/learn @siddsachar/ThothREADME
Thoth is a local-first AI assistant built for personal AI sovereignty — your models, your data, your rules. It combines a powerful ReAct agent with 23 integrated tools (61 sub-operations) — web search, email, calendar, file management, shell access, browser automation, vision, long-term memory with a personal knowledge graph, scheduled tasks, habit tracking, and more — plus Telegram and Email messaging channels. Run everything locally via Ollama, or add opt-in cloud models (GPT, Claude, Gemini, and more) when you need frontier reasoning or don't have a GPU. Either way, your data — conversations, memories, documents, and history — stays on your machine.
Local models are already amazing. You'll be surprised what a 14B+ local model can do. If you start with cloud models today, and as local models get smarter and hardware gets cheaper, transition to fully local, fully private, fully free AI — seamlessly, with no changes to your setup.
Governments are investing billions to keep AI infrastructure within their borders. Thoth applies the same principle to the individual — your compute, your data, your choice of model, accountable to no one but you.
<table align="center"> <tr> <td align="center"><a href="https://youtu.be/xYJC2IVKH7Y"><img src="https://img.youtube.com/vi/xYJC2IVKH7Y/mqdefault.jpg" width="360" alt="Demo 1 — Power User"><br><b>Demo 1 — Power User</b></a></td> <td align="center"><a href="https://youtu.be/zEma6vXKWH4"><img src="https://img.youtube.com/vi/zEma6vXKWH4/mqdefault.jpg" width="360" alt="Demo 2 — Small Business"><br><b>Demo 2 — Small Business</b></a></td> </tr> <tr> <td align="center"><a href="https://youtu.be/3vg1po9IQVg"><img src="https://img.youtube.com/vi/3vg1po9IQVg/mqdefault.jpg" width="360" alt="Demo 3 — Researcher"><br><b>Demo 3 — Researcher</b></a></td> <td align="center"><a href="https://youtu.be/dMoSay7uyoc"><img src="https://img.youtube.com/vi/dMoSay7uyoc/mqdefault.jpg" width="360" alt="Demo 4 — Developer"><br><b>Demo 4 — Developer</b></a></td> </tr> </table>🖥️ One-click install on Windows & macOS — download, run, done. No terminal, no Docker, no config files. Get it here.
Why the name "Thoth"?
In ancient Egyptian mythology, Thoth (𓁟) was the god of wisdom, writing, and knowledge — the divine scribe who recorded all human understanding. Like its namesake, this tool is built to gather, organize, and faithfully retrieve knowledge — while keeping everything under your control.
✨ Features
🤖 ReAct Agent Architecture
- Autonomous tool use — the agent decides which tools to call, when, and how many times, based on your question
- 23 tools / 61 sub-tools — web search, email, calendar, file management, shell access, browser automation, Telegram messaging, vision, memory, scheduled tasks, habit tracking, and more (see full list below)
- Streaming responses — tokens stream in real-time with a typing indicator
- Thinking indicators — shows when the model is reasoning before responding
- Smart context management — automatic conversation summarization compresses older turns when token usage exceeds 80% of the context window, preserving the 5 most recent turns and a running summary; a hard trim at 85% drops oldest messages as a safety net; oversized tool outputs (e.g. large PDF reads) are proportionally shrunk so multi-tool chains fit within context; accurate token counting via tiktoken (cl100k_base)
- Dynamic tool budgets — the agent automatically adjusts how many tools are exposed to the model based on available context headroom; when context usage is high, lower-priority tools are temporarily hidden to prevent the system prompt from crowding out conversation history
- Centralized prompts — all LLM prompts (system prompt, extraction prompt, summarization prompt) managed in a single
prompts.pymodule for easy tuning - Live token counter — progress bar in the sidebar shows real-time context window usage based on trimmed (model-visible) history
- Graceful stop & error recovery — stop button cleanly halts generation with drain timeout; agent tool loops are caught automatically (50-step limit for chat, 100 for tasks) with a wind-down warning at 75% and 4× loop detection; orphaned tool calls are repaired; API errors are surfaced as persistent red toasts and saved to the conversation checkpoint so they survive thread refresh
- Task cancellation — running background tasks can be stopped from the chat header, activity panel, or task card; cancellation is checked between every LangGraph node for clean shutdown
- Displaced tool-call auto-repair — if context trimming displaces tool-call/response pairs, the agent automatically detects and repairs the ordering before the next LLM call; orphaned tool calls trigger an automatic retry
- Date/time awareness — current date and time is injected into every LLM call so the model always knows "today"
- Destructive action confirmation — dangerous operations (file deletion, sending emails, deleting calendar events, deleting memories, deleting tasks) require explicit user approval via an interrupt mechanism
- Task-scoped background permissions — background tasks use a tiered system: safe operations always run, low-risk operations (move file, move calendar, send email) are allowed with optional runtime guards, and irreversible operations (delete file, delete memory) are always blocked; shell commands and email recipients can be allowlisted per-task via the task editor UI
🧠 Long-Term Memory & Knowledge Graph
Thoth doesn't just store isolated facts — it builds a personal knowledge graph: a connected web of people, places, preferences, events, and their relationships. Every memory is an entity linked to others through typed relations, so the agent can reason about how things in your life connect.
- Entity-relation model — memories are stored as entities with a type, subject, description, aliases, and tags; entities are connected by typed directional relations (e.g.
Dad --[father_of]--> User,User --[lives_in]--> London) - 6 entity types —
person,preference,fact,event,place,project - Memory tool — 7 sub-tools let the agent save, search, list, update, delete, link, and explore memories through natural conversation — "Remember that my mom's birthday is March 15", "What do you know about me?", "How are these memories connected?"
- Link memories — the agent can create relationships between any two entities — "Link Mom to Mom's Birthday Party with relation has_event" — building a richer graph over time
- Explore connections — the agent can traverse the graph outward from any entity, discovering chains of relationships — useful for broad questions like "Tell me about my family" or "What do you know about my work?"
- Interactive memory visualization — a dedicated Memory tab on the home screen renders the entire knowledge graph as an interactive network diagram: search bar, entity-type filters, clickable detail cards, full-graph / ego-graph toggle, and a fit-to-view button; color-coded by category, with relation types shown as edge labels
- Graph-enhanced auto-recall — before every response, the agent retrieves semantically relevant entities via FAISS and then expands one hop in the graph to surface connected neighbors; recalled memories include their relationship context (e.g. "connected via: Dad --> father_of --> User"); includes FAISS fallback search — if the primary semantic recall returns no results above 0.80 similarity, a broader relaxed search is attempted automatically
- Auto-linking on save — when a new memory is saved, the engine automatically scans existing entities for potential relationships and creates links, building the knowledge graph organically without manual intervention
- Background orphan repair — a periodic background process detects entities with zero relationships and attempts to link them to related entities, keeping the knowledge graph connected
- Memory decay — memories that haven't been recalled recently are gradually deprioritized, ensuring frequently relevant information surfaces first
- Triple-based extraction — the background extraction pipeline produces structured triples (entity + relation + entity) instead of flat facts; a "User" entity convention ensures the user is always a single canonical node with aliases for their names
- Automatic memory extraction — a background process scans past conversations on startup and every 6 hours, extracting entities and relations the agent missed during live conversation; active threads are excluded to avoid race conditions
- Deterministic deduplication — both live saves and background extraction check for existing entities by normalised subject before creating new entries; cross-category matching prevents fragmentation (e.g. a birthday stored as
personwon't be duplicated asevent); alias resolution ensures "Mom" and "Mother" map to the same entity; richer content is always kept - Source tracking — each entity is tagged with its origin (
livefrom conversation orextraction
