Retrieved article excerpt
Open article · Retrieved 2026-10-28T21:28:05.242345+00:00
# ThreadShelf
**Local-first archive, semantic search, and continuation for your AI conversations.**
[CI](https://github.com/ChrystianSchutz/ThreadShelf/actions/workflows/ci.yml)
[Node.js 20.19+](https://github.com/ChrystianSchutz/ThreadShelf/blob/main/package.json)
[License: MIT](https://github.com/ChrystianSchutz/ThreadShelf/blob/main/LICENSE)
[Local-first](https://github.com/ChrystianSchutz/ThreadShelf#privacy-boundary)
One private workspace across **ChatGPT, Claude, Google AI Studio, OpenRouter,
LM Studio, and Grok**. Search old conversations by meaning, reopen the complete
thread, and continue it with a local GGUF model through `llama.cpp` or the
explicitly external OpenRouter provider.
The archive pipeline—parsing, embeddings, LanceDB storage, search, HTTP API, and
MCP—runs locally. Conversation generation is optional:
`llama.cpp` stays loopback-only; switching to the clearly marked
**OpenRouter · external** provider sends the selected user/assistant context and
new prompt off-device.
[ThreadShelf indexing, search, and thread workflow](https://github.com/ChrystianSchutz/ThreadShelf/blob/main/docs/assets/threadshelf-demo.gif)
| Capability | What ThreadShelf provides |
| --- | --- |
| **Archive & retrieval** | Multi-provider normalization, local multilingual embeddings, semantic and exact search, complete thread reconstruction |
| **Continue & create** | Local GGUF inference through managed `llama.cpp`, plus optional OpenRouter streaming |
| **Use it anywhere** | React UI, command-line ingest/search, HTTP API, and an MCP stdio server over the same index |
| **Keep control** | Loopback defaults, isolated local storage, explicit off-device labeling, synthetic test data |
---
**Documentation:** [chrystianschutz.github.io/ThreadShelf](https://chrystianschutz.github.io/ThreadShelf/)
> **Official sources.** ThreadShelf is published only as this GitHub repository
> and the [`threadshelf`](https://www.npmjs.com/package/threadshelf) npm package
> (`npx threadshelf`). There is no installer, `.exe` or `.zip` download; if you
> find one, it is not from this project. Please report it.
## What it does (in 30 seconds)
1. You export/copy your chats as JSON (see [Get your data](https://github.com/ChrystianSchutz/ThreadShelf#get-your-data)).
2. ThreadShelf parses them into a common format, embeds them **locally**, and
stores them in a local vector database (LanceDB).
3. You search by meaning in the web UI, open the full original thread, and export
any conversation to Markdown — or query the same index from an MCP client.
4. Optionally start a new chat or continue an archived thread through local
`llama.cpp` or explicitly external OpenRouter.
## Architecture at a glance
```
flowchart LR
exports["AI chat exports"] --> parser["Provider parsers"]
parser --> turns["Normalized turns"]
turns --> chunks["Chunks"]
chunks --> embed["Local embeddings"]
embed --> db[("LanceDB + thread store")]
db --> ui["React UI"]
db --> api["HTTP API"]
db --> mcp["MCP stdio"]
db --> generation["Generation registry"]
generation --> llama["llama.cpp<br/>local GGUF"]
generation -. "explicit off-device provider" .-> openrouter["OpenRouter"]
```
Loading
## How is this different from other history viewers?
- **One normalized archive across six providers.** It includes sources whose
history is otherwise split between exports, Drive files, browser pages, and
local application data.
- **Semantic, not just keyword.** Find a conversation by topic even when you don't
remember the exact words — plus an exact-match mode for when you do (error
strings, identifiers, code).
- **A local archive with an optional generation layer.** Search remains useful
without configuring any LLM. When generation is wanted, the primary engine is
a loopback-only `llama.cpp` server; OpenRouter is a separately marked external
choice.
- **One index, three front-ends.** The same archive is searchable from the web UI,
the HTTP API, and any MCP-capable tool.
## Comparison with other tools
ThreadShelf combines a local conversation archive, semantic search, and optional
thread continuation. The tools below overlap with that workflow but also cover
other needs, including document research and agent orchestration.
This is a documentation snapshot reviewed on **2026-10-03**, using the linked
upstream sources (LibreChat's documentation is labeled **Latest / dev**).
Installed releases, configuration, and extensions may differ.
| Project | Main use case | Documented search and source coverage | Workflow and integration |
| --- | --- | --- | --- |
| **ThreadShelf** | Archive, find, and continue AI conversations locally | Local multilingual semantic search and exact substring search across ChatGPT, Claude, AI Studio, OpenRouter, LM Studio, and Grok exports | Web UI, CLI, HTTP API, and an MCP **server** over one index; optional managed `llama.cpp` or explicitly external OpenRouter continuation |
| [LibreChat](https://github.com/LibreChat-AI/LibreChat) | Multi-provider chat and agents | [Keyword search over chat history](https://www.librechat.ai/docs/features/search); semantic retrieval over uploaded files. [Import](https://www.librechat.ai/docs/features/import_convos) supports ChatGPT, Claude, and ChatbotUI v1 | [Agents](https://www.librechat.ai/docs/features/agents), MCP tools, branching, and artifacts; [user memory](https://www.librechat.ai/docs/features/memory) stores structured entries separately from history search |
| [Open WebUI](https://docs.openwebui.com/features/) | Self-hosted chat, knowledge, and tools | [ChatGPT and native chat import](https://docs.openwebui.com/features/chat-conversations/data-controls/import-export/); [document RAG](https://docs.openwebui.com/features/chat-conversations/rag/) | Local or external model connections, memory, and extensible tools |
| [AnythingLLM](https://github.com/Mintplex-Labs/anything-llm) | Private document workspaces and agents | [Retrieval over workspace documents](https://docs.anythingllm.com/chatting-with-documents/introduction), with configurable chunk selection and reranking | Desktop or self-hosted app; local or external models, [agent flows](https://docs.anythingllm.com/agent-flows/overview), and [MCP tools](https://docs.anythingllm.com/mcp-compatibility/overview) |
| [MyChatArchive](https://github.com/1ch1n/mychatarchive) | Local chat archive for AI clients | Local semantic and keyword search; imports ChatGPT, Claude, Grok, Claude Code, and Cursor; optional summaries use an external LLM | CLI and MCP server, thread groups, sensitivity levels, and topic context bundles |
| [hstry](https://github.com/byteowlz/hstry) | Unified history for coding agents and web chats | Full-text search over imported agent sessions and web-chat histories | CLI, TUI, MCP, and API components; source discovery, browser sync, and cross-agent session resume |
| [Polylogue](https://github.com/Sinity/polylogue) | Evidence and audit trail for AI work | Searches imported conversations and coding sessions; retains structured tool outcomes, lineage, usage, and costs when present in the source | Local archive, CLI, Python API, HTTP reader, and MCP server |
| [Open Notebook](https://github.com/lfnovo/open-notebook) | Research notebooks built around sources and notes | Full-text and vector search over research content; answers with source citations | Local or external model configurations, source transformations, notes, and REST API |
### Where ThreadShelf fits
| What you want to do | ThreadShelf's current workflow |
| --- | --- |
| Find an old discussion when you cannot remember its wording | Search by meaning across the archive, then open the full thread around the matching turn |
| Locate an exact error, identifier, or code fragment | Use keyword mode with collection, role, model, and date filters |
| Continue an exported conversation with a different model | Reopen its stored turns and append a local `llama.cpp` or explicitly external OpenRouter exchange |
| Let an existing AI client retrieve past conversations | Connect to the MCP server's `search` and `read_thread` tools over the same local index |
For built-in agent orchestration, document RAG, or research notebooks, the
corresponding tools above offer broader workflows. ThreadShelf currently focuses
on conversation retrieval, continuation and scoped Obsidian tool workflows;
general workflow automation, automatic fact memory and generated answers with
archive citations are future directions.
An MCP client can already use its search and thread-reading tools to retrieve
context; a client using an external model may send that context off-device.
Temporary chats are already available: click the ghost icon beside **New chat**
to start a **Private conversation**. Its content stays in this tab's browser
`sessionStorage`; it is not saved to the archive or indexed, and generation
diagnostics are not persisted. Selecting OpenRouter still sends the conversation
off-device. See [conversation generation](https://github.com/ChrystianSchutz/ThreadShelf/blob/main/docs/GENERATION.md).
### Markdown notes: Obsidian, Logseq, OpenClaw and other PKM folders
Open **Markdown/Obsidian** in the sidebar and connect any folder of Markdown notes:
an Obsidian vault, a Logseq graph, an OpenClaw workspace or a plain `.md` folder.
Obsidian vaults and the OpenClaw workspace found on your computer are offered for
one-click connection. Search the notes locally, open the originals in Obsidian, and
create new notes on the page. Enable **Notes tools** in a conversation to let the selected model search,
read, create and edit notes as part of a bounded tool-calling workflow.
| Direction | Available workflow |
| --- | --- |
| **Obsidian → ThreadShelf / AI** | Live keyword search and note reading through the UI, HTTP API and MCP, with relative source paths and original Markdown |
| **ThreadShelf → Obsidian** | Create Markdown notes or ask the agent to write conversation summaries with source links; edit existing notes using revision checks |
**Allow vault writes** is **off by default**: a connected vault is read-only,
including for MCP clients, until you enable writes on the Markdown/Obsidian page or beside the
composer. Connecting a different vault turns writes off again. Deletion always pauses the conversation for an explicit
checkbox and confirmation showing the model and exact files. Approved deletions
move notes to the vault's `.trash`; cancellation preserves them. MCP offers
search/read/create/edit; deletion requires the interactive chat UI.
Only ordinary `.md` files inside the configured vault are accessible. Hidden
folders, attachments, symlinks, junctions and traversal are excluded. Creation
never overwrites existing notes. Search reads current files without reimporting;
semantic note indexing and automatic project export remain future work.
With local llama.cpp, note context stays on-device. OpenRouter and external MCP
models may send retrieved note content off-device. Private chats can still make
explicitly enabled vault writes. See [Obsidian integration](https://github.com/ChrystianSchutz/ThreadShelf/blob/main/docs/OBSIDIAN.md)
for tools, controls, API routes and limits.
## Supported sources
| Source | How export works | Format stability |
| --- | --- | --- |
| **Google AI Studio** | Download your Drive "Google AI Studio" folder | ⚠️ undocumented, tested July 2026 |
| **OpenRouter** | Browser-console export script (this repo) | ⚠️ undocumented |
| **LM Studio** | Copy local conversation files | ⚠️ undocumented, tested on **0.4.x** |
| **Grok / xAI** | Account data export (`prod-grok-backend.json`) | ⚠️ undocumented |
| **ChatGPT / OpenAI** | Official data export (`conversations.json`) | semi-stable |
| **Claude / Anthropic** | Official data export | semi-stable |
> ⚠️ **Format note.** Google AI Studio, OpenRouter, LM Studio, and Grok have no
> documented, stable export schema — their vendors can change it without warning.
> ThreadSh