Quipu — a human-first synthesis brain that any of your agents can read from and write to. Part of the KOI suite.
Project description
Quipu
A human-first synthesis brain that any of your AI agents can read from and write to.
Your notes stay as plain Markdown in your own git repo. Every agent you use reads and writes the same brain through one gateway. A nightly pass turns your raw conversations into clean, linked notes — that you approve before they become truth.
Part of the KOI ("Kernel of Intelligence") suite.
Quipu is named after the quipu — the knotted-cord records of the Inca. Knots on a string, each meaningful in relation to the others. That's the model: atomic ideas, tied together, so understanding compounds instead of piling up.
Markdown files in git are the only source of truth. The search index, the Postgres mirror, the capture lake — all of it is a disposable cache you can delete and rebuild from the files at any time.
The loop
flowchart LR
A["you + your agents<br/>(conversations)"] -->|firehose| L["the lake<br/>(raw captures, decays)"]
L -->|"nightly dream<br/>cluster + draft"| D["note drafts<br/>(provisional)"]
D -->|"you approve<br/>(merge a PR)"| N["notes<br/>(confirmed truth)"]
N -->|"auto-recall every turn"| A
L -.->|"working memory"| A
You talk to your agents. Every exchange is captured. Overnight, the dream proposes a handful of clean notes from the noise and opens a pull request. You merge the keepers. From then on, those notes are recalled into every conversation automatically — so the brain sharpens the more you use it, without you filing anything by hand.
Why Quipu
- 🗂️ You own your data. Plain Markdown in your own git repo — diff-able, openable in Obsidian, no lock-in, yours forever. The database is just a fast mirror you can throw away.
- 🔌 One brain, every agent. A single MCP gateway. Claude Code, Codex, and anything that speaks MCP read and write the same notes you edit by hand.
- 🕸️ Synthesis over storage. Typed links make a graph, not a folder — retrieval can follow relationships, not just match keywords.
- ✋ The human stays in charge. Agents propose; you dispose. An agent never edits your words, and nothing becomes truth until you merge a pull request.
- 🎚️ As strong as your machine allows.
quipu initprobes your box and picks the best local retrieval it can carry — a 1024-dim embedder + cross-encoder reranker on a capable machine, a light 384-dim embedder on a lean one. All on-device, no server to run; degrades to real keyword search with zero dependencies installed.
Quickstart
pip install 'koi-quipu[local]' # local = the on-device embedder (gte-small / bge-m3 + reranker)
quipu init --demo # probes your machine, picks a retrieval tier, wires your agents
quipu doctor # verify everything end-to-end
quipu search "atomic notes"
✓ config vault /Users/you/quipu
✓ embedder bge-m3 (local, dim 1024) + bge reranker
✓ backend sqlite, 5 notes · add Supabase to share across machines
✓ claude code recall + capture-turn hooks wired
✓ codex [mcp_servers.quipu] present
Connect an agent (below) and the read/write loop becomes automatic — you stop typing quipu
commands and just talk.
Three homes for your memory
Quipu deliberately spreads memory across three places, each with a different job:
| Home | What lives there | Lifetime |
|---|---|---|
| Git (Markdown) | confirmed notes — the truth | permanent, versioned |
| Database (SQLite or Postgres) | a searchable mirror of the notes + the lake | disposable, rebuildable |
| The lake (capture rows) | raw conversation exchanges | decays over weeks |
Git is slow, durable, and human-reviewable — perfect for truth. The database is fast and disposable — perfect for search. The lake is cheap and forgetful — perfect for raw material. Nothing important is ever only in the disposable layers.
How it works
Notes vs. captures. Notes are curated, confirmed ideas — the .md files in your vault.
Captures are a raw firehose of your recent agent conversations: cheap to write, allowed to be
wrong, and they decay. The nightly dream mines the lake into note drafts; the rest is forgotten.
The nightly dream. The intelligence — clustering captures and drafting notes — is an agent
skill, not Python. It searches for an existing home before drafting anything new, never rewrites
a human's note (additions and corrections become separate linked notes), drops anything
work-derived, and opens one dream/<date> pull request. Merging it is how you confirm; a CI action
then syncs the database and deletes the consumed captures (an approved note is the durable record).
Retrieval. Both halves are searched by one pipeline: keyword (FTS5 / tsvector) + vector →
Reciprocal Rank Fusion → an optional cross-encoder reranker (on by default on the power tier) →
an abstention gate that returns nothing rather than a confidently-wrong nearest neighbour. The
embedder + reranker run on-device whether the store is SQLite or Supabase. No separate graph server.
Connect an agent
quipu wire claude # adds recall + capture-turn hooks to Claude Code
quipu wire codex # adds the MCP server to Codex
In Claude Code, two hooks make the loop fully automatic: a UserPromptSubmit hook
(quipu recall) injects relevant notes + working memory before every turn, and a Stop hook
(quipu capture-turn) firehoses each exchange into the lake. Other MCP clients call the
tools on demand — paste the
ready-made agent prompt into their
instructions so they know how.
Storage: shared by default, solo when offline
The brain wants to follow you across machines, so Supabase Postgres + pgvector is the default
when quipu init can provision or find one. With no account or no network it falls back to
SQLite — zero setup, offline, private (fine to ~10k notes).
quipu provision supabase # creates a free project, writes the DSN, loads your notes
# or, with an existing project:
quipu db use postgres # persists the choice, creates tables, rebuilds from the vault
quipu db use sqlite # …or go local/offline anytime
The two are interchangeable — notes always rebuild from the Markdown truth. Full walkthrough: Run on Supabase.
Documentation
Detailed guides with diagrams live in docs/:
- Introduction · Quickstart
- Concepts · Architecture · Retrieval
- Guides: the dream · connect an agent · the lens
- Reference: CLI · MCP tools · config · data model
Also: DESIGN.md (rationale) · ROADMAP.md (where it's headed).
Contributing
Small, dependency-light Python — see CONTRIBUTING.md. Tests are hermetic:
pip install -e '.[dev]' && pytest -q
License
MIT. The PyPI package is koi-quipu; the CLI command is quipu.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file koi_quipu-0.2.0.tar.gz.
File metadata
- Download URL: koi_quipu-0.2.0.tar.gz
- Upload date:
- Size: 125.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15354831b868900525e3a9666a55b4cf42840645fa205fae6eda3184647126ef
|
|
| MD5 |
be81efabbc39f05a44bc739de90375c7
|
|
| BLAKE2b-256 |
a7f08c8ddbc8436a087adbd91277b9b998cb62e8eb3d7d4868581a1da1972c13
|
File details
Details for the file koi_quipu-0.2.0-py3-none-any.whl.
File metadata
- Download URL: koi_quipu-0.2.0-py3-none-any.whl
- Upload date:
- Size: 115.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca14e89a0fa6b8f959d785c73a421be18c6e0238dfc1522de62abca76823742d
|
|
| MD5 |
36a422f0152f145ac416bc5ee2013321
|
|
| BLAKE2b-256 |
9e98bc00608f0cafb5b146b5733f0ebb0d40b6f6061ce4f12827d12afe2752de
|