Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

thread-archive

PyPI CI Python Platform License: MIT

A note from the human in the loop: This app is an experiment to see if vibe coding can produce something robust. If that makes you not trust the project, welcome to the club! I have over 10 years of professional dev experience, but I'll be honest, I haven't read any of the code. Nevertheless I get a lot of benefit from the functionality, and we have pretty good tests, so 🤷🏻‍♀️ (review the project yourself, or ask your AI).

A local-first archive for the AI agents that work on your machine — built by Claude Code, for Claude Code. Every session your agent harnesses record lands in one durable, append-only archive you own, on your own disk — and your agents can search and read all of it, mid-conversation, over MCP.

Your agent's transcripts are temporary by default. Claude Code writes each session to ~/.claude as JSONL, keeps it for 30 days, and deletes it — a sensible default for a harness's working files, a lossy one for the only record of how the work got decided. Nothing searches them in the meantime either.

Quickstart

pip install thread-archive
thread-archive setup

setup discovers this machine's conversation stores and shows what it found — counts, sizes, date ranges — before touching anything. Whatever is still on disk imports as a head start; from then on a background watcher keeps the archive current and the 30-day window stops mattering. It also wires the MCP server into your client. Every choice is skippable.

Minutes after setup, ask mid-conversation:

"what did we decide about the auth flow?"

Your agent searches, reads around the hits, and comes back with what you decided and why — a few thread_search calls and a couple of thread_reads, the way it would work through a codebase it hadn't seen. What it reads is an efficient representation of the conversation itself, not a summary someone made of one. No workflow to adopt, no notes you were supposed to be taking — from here on the record is being written.

What you get

  • Search, two doors, one implementation — MCP tools (thread_search, thread_read) for agents, and the same verbs on the CLI (thread-archive search "auth flow" --since 30d). What you get at a prompt is what your agent gets.
  • Full-text and semantic search, fused and re-ranked, filterable by time, source, tool, and content type; an empty query browses recent activity.
  • Indexed by code, not just by words — ask which conversations worked on a file (thread_search(path='rank.py')), which sessions a commit is made of (thread_search(commit='31bade5')) or a pull request was built from (thread_search(pr=4)), or what a session actually changed.
  • Built like a database, not a folder of exports — plain JSONL as the source of truth, crash-safe writes with intent journaling, built-in backup with scheduled restore drills. The index is a disposable projection that rebuilds at any time.
  • Import drift is loud and repairable — when a provider changes its transcript format, coverage checks catch it, raw files are preserved before the provider prunes them, and thread-archive source fix scaffolds the repair for you (or your agent) to finish.
  • No hosted backend. No cloud. No subscription to lose your history to. Every process runs locally, on your machine.

Claude Code is the supported, first-class source. The other harnesses it reads — Codex, Cursor, OpenCode, Grok, and friends — are best-effort and community-maintainable via the plugin API. Web chats (claude.ai, ChatGPT, xAI) import from account exports you download by hand.

Documentation

This is the manual, and it ships inside the package: thread-archive docs lists these pages and thread-archive docs <page> prints one, offline. In a source checkout, the web viewer serves the same pages at /docs. The links below are those pages on GitHub. (docs/*.md, one level up from them, is the other half — the release process, the bench landscape, the maintainer's dev panels — written for whoever works on this repo, and in no install.)

Scope

Deliberately narrow: one machine, one user, macOS and Linux only. The archive preserves and retrieves — it never writes back to a harness store and never sends a message. Live capture of web chats is out; account exports are the path. The reasoning behind each line is in docs/public/scope.md.

Preserving and searching AI conversation history is a crowded space, and a lot of the work in it is good — session-search neighbors (CASS, ctx, deja-vu, episodic-memory, synty, and more), agent memory layers (mem0, Letta, Zep), and the prior art outside AI (notmuch). The annotated survey lives in docs/public/related.md. The short version of the difference: most tools treat the harness's own files as the record and their index as a cache over it; archive treats preservation as the product — its own append-only truth log, backup with restore drills, and unmodeled provider fields preserved verbatim.

License

MIT — see LICENSE. An install carries no third-party source: the web viewer's bundle, which is what vendors any, is dev-only and excluded from the wheel. Its dependencies (all MIT/ISC/BSD) are attributed in src/thread_archive/_web/THIRD_PARTY_NOTICES.md in the repo (regenerate with scripts/gen_third_party_notices.py when frontend dependencies change).

Origin

thread-archive is the standalone member of a larger personal project ("thread"), built to stand on its own — self-contained, no hosted backend or external services. It is alpha software, and the version number says so.

It is also one person's project — no organization behind it, and no promise of maintenance. The design budgets for that: an installed archive depends on nothing that expires (no hosted service, no account, no phone-home), released wheels stay on PyPI, import drift is repairable locally without a new release (the repair loop), and the license invites a fork. If this project ever goes quiet, your archive doesn't.

Metadata

Release files for thread-archive 0.0.15rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thread-archive 0.0.15rc1
File Size Uploaded Provenance
thread_archive-0.0.15rc1.tar.gz 2.0 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for thread-archive 0.0.15rc1
File Interpreter ABI Platform
thread_archive-0.0.15rc1-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / thread_archive-0.0.15rc1.tar.gz

Download URL thread_archive-0.0.15rc1.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f0b8b1aa3715d8f89f55614ec58b3af2ae3cd59fcd32d6731ae324d0bf696059
BLAKE2b-256 checksum
How to use checksums
a4fa122811f583d91bd757f7b303e06a01a35331efc711d696c90c1b3d310324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / thread_archive-0.0.15rc1-py3-none-any.whl

Download URL thread_archive-0.0.15rc1-py3-none-any.whl
Size 870.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b11bf098a8634772796fa6a23dc4681b97cf01f24afd9ee80467c6fd4605a36
BLAKE2b-256 checksum
How to use checksums
c61dfb67ab3da2280c016f74bf52eccc9d20508abb0f41f6a0a343decea090b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Security for thread-archive 0.0.15rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for thread_archive-0.0.15rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page