Thread Keeper

by po4erk91

409 downloads
Not rated
GitHub

About

Multi-agent shared brain across Claude Code/Desktop, Codex, Antigravity CLI (agy), Gemini, Copilot, and VS Code. One local SQLite store for threads, notes, verbatim quotes, and a dialectic user model; spawn/broadcast/whisper/inbox multi-agent coordination primitives; autonomous b

Details

Author
po4erk91
Downloads
409
Categories
AI, Knowledge Base

- Collective memory: threads, notes, quotes, and dialectic claims shared across all CLIs.
- Multi-agent coordination: spawn, broadcast, whisper, inbox, wait, ask, and respond primitives.
- Self-improving skill library with autonomous background loops (auto-review, harvester, curator, etc.).
- Multi-CLI integration: Claude Code/Desktop, Codex, Antigravity CLI, Gemini legacy, Copilot, VS Code.
- Auto-update daemon that checks daily and upgrades via git pull or pip install.
- macOS menu-bar app for monitoring loops, cleaning memory, and adjusting settings.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Thread Keeper
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via pipx, uv, or pip: pipx install 'threadkeeper[semantic]' && thread-keeper-setup. This detects every CLI, registers the MCP server, copies hooks, and writes managed instructions files. Restart your CLI; hook-capable clients auto-inject a brief, while hookless clients (Codex, Antigravity CLI) follow the instructions to manually call brief() or context().

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "thread keeper": {
            "thread-keeper": {
                "command": "uvx",
                "args": [
                    "--from",
                    "threadkeeper[semantic]",
                    "python",
                    "-m",
                    "threadkeeper.server"
                ]
            }
        }
    }
}

McpServers

{
    "thread-keeper": {
        "command": "uvx",
        "args": [
            "--from",
            "threadkeeper[semantic]",
            "python",
            "-m",
            "threadkeeper.server"
        ]
    }
}

thread-keeper

tests
Python
License: MIT
PyPI
CLIs

Multi-agent shared brain across Claude Code/Desktop, Codex,
Antigravity CLI (agy), Gemini legacy, Copilot, and VS Code.

Cross-session memory, self-improving skill loops, and inter-agent signaling —
one local MCP server turns parallel agent instances into a coordinated
multi-agent system instead of N isolated chats.

Every connected client (Claude Code, Claude Desktop, Codex CLI + desktop,
Antigravity CLI, Gemini legacy, Copilot, every MCP-aware VS Code extension)
shares one SQLite store, one set of threads, one user model, and one learning
loop that improves the skill library autonomously over time.

The brief format is dense — structural tags, opaque IDs, ~6 KB per
session-start injection. Optimized for agent consumption, not human reading.

---

Why

Every agent CLI starts cold. Context dies at session boundaries.
Skills you taught Claude don't transfer to Codex. Threads you closed
in yesterday's Antigravity chat are invisible to today's Copilot. Parallel
agent instances running the same task don't know about each other and
duplicate work or step on each other's writes.

thread-keeper is the substrate underneath. Three things that together
make it more than a memory store:

- Collective memory — threads, notes, verbatim quotes, dialectic
claims about you. Survives session, restart, CLI swap. One agent
records, every other agent (any CLI) reads. The brief injected at
session start gives a new agent everything the previous one knew.
- Multi-agent coordinationspawn primitive launches child
agents in parallel, each gets a self_cid + sees the same memory.
broadcast / whisper / inbox / wait / ask / respond let
concurrent sessions signal each other across CLIs. Parent /
children / sibling agents become a coordinated swarm, not isolated
chats.
- Self-improving skill library — autonomous background loops
(auto-review on thread close, shadow-review daemon, extract
harvester, candidate-reviewer, weekly Curator, and a thread-janitor
that auto-closes idle threads so abandoned work reaches the harvest
path — closing is reversible, a note reopens a closed thread)
materialize class-level skills as the agents work. Adapted to multi-CLI:
SKILL.md is the primary write target and gets mirrored to every
known/configured skills root simultaneously (~/.claude/skills/,
~/.codex/skills/, ~/.gemini/config/skills/ for Antigravity,
existing ~/.agents/skills/, extra roots from
THREADKEEPER_EXTRA_SKILLS_DIRS, and ~/.threadkeeper/skills/), with
lessons.md as a fallback for CLIs without a native skills loader.

Foreground MCP servers also run a daily self-update check by default. Source
checkouts fast-forward their tracked git branch and reinstall the editable
package; PyPI/pipx/venv installs run pip install --upgrade in the current
interpreter environment. Dirty or diverged git checkouts are skipped rather
than overwritten.

---

Quickstart

The shortest path — PyPI + pipx (recommended):

pipx install 'threadkeeper[semantic]' && thread-keeper-setup

thread-keeper-setup detects every CLI you have installed (Claude
Code / Claude Desktop / Codex CLI + desktop / Antigravity CLI agy /
Gemini legacy / Copilot / VS Code), registers the MCP server in each one's
config, copies hooks to
~/.threadkeeper/hooks/, and writes a managed instructions block into
each CLI's per-user instructions file (CLAUDE.md / AGENTS.md /
GEMINI.md / copilot-instructions.md — Claude Desktop and VS Code
have no global instructions file, so that step is skipped for them).

Restart your CLI of choice. Hook-capable clients inject a brief on the first
message; hookless clients such as Codex and Antigravity CLI follow the managed
instructions block and call brief() / context() manually before answering.

Alternative installs

If you don't have pipx and don't want to install it:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.