{"slug": "show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit", "title": "Show HN: cos-kit – A minimalist HPMA (highly persistent, multi-agent) toolkit", "summary": "A developer released cos-kit, a zero-runtime-dependency HPMA (highly persistent, multi-agent) toolkit built on the Python 3.11+ standard library, SQLite FTS5, plain Markdown, and existing agent CLIs including claude, codex, and antigravity. The toolkit centers on a persistent \"chief of staff\" agent that recursively delegates to subagents via org.json and cos dispatch --async, with least-privilege zone boundaries set in zone.json, and stores all chats, inbox replies, task updates, and worker runs verbatim in an append-only SQLite events table (state.db) that serves as the source of truth. The author states cos-kit is designed to run inside an isolated VM or sandbox such as exe.dev, noting that cos web binds to 127.0.0.1:8000 by default with no built-in authentication and that headless workers invoke native CLIs in unattended mode.", "body_md": "`cos-kit` is a minimalist **HPMA** (highly persistent, multiple agent) toolkit.\n\nZero runtime dependencies. Pure Python 3.11+ standard library, SQLite FTS5, plain Markdown, and your existing agent CLIs (`claude`, `codex`, `antigravity`).\n\nModels are getting a *lot* more capable. I’m learning to stay out of the models' way as much as I can. They will write the code they need, and often, they don't need much code at all.\n\nThat said, I have a few priors, which this toolkit embodies:\n\n- **Plain files and SQLite.** Easy to inspect, easy to port.\n- **Learn every [bitter lesson](http://incompleteideas.net/IncIdeas/BitterLesson.html).** I just learned one about[memory](https://hatchery.build/blog/the-bitter-lesson-for-agent-memory) , and this toolkit is a thin wrapper on top of it.\n- **Be stateless when you can.** Our memory, conveniently, allows stateless runs, which makes agent decisions more reproducible (and avoids all manner of compaction amnesia, markdown editing drift, etc).\n\n``` php\nHuman  <--->  Inbox UI / CLI  <--->  cos (Chief of Staff)  --->  subagents (recursive)\n                  (or BYO)               |      ^                   (claude/codex/agy)\n                                         v      |\n                            L2: state.db  (lossless SQLite + FTS5 event log — source of truth)\n                            L0/L1 (optional): AGENTS.md, goals.md, projects/*.md (disposable caches)\n```\n\n- **A persistent \"chief of staff\" (`cos`)**  - Delegates to an arbitrary number of subagents, recursively (`org.json` ,`cos dispatch ... --async` ), with least-privilege zone boundaries (`zone.json` ).\n  - Minimal SQLite Kanban (`cos task` /`cos board` ) — or bring your own.\n  - Model- and harness-agnostic: swap any agent between `claude` ,`codex` , and`agy` on the fly (`cos org set-model` ), with automatic fallback on headless wakes (`cos-wake` ).\n- Delegates to an arbitrary number of subagents, recursively (\n- **Communicate via an inbox UI (or bring your own)**  - Built-in single-file stdlib web briefing UI (`Needs you` decision cards with inline reply and file uploads,`Goals & Projects` rendered from`goals.md` , live worker activity) plus CLI (`cos inbox` ,`laptop/inbox` ).\n- Built-in single-file stdlib web briefing UI (\n- **Run on [exe.dev](https://exe.dev) (or bring your own)**  - Runs on an always-on Linux VM (`cos systemd` generates ready-to-enable units), locally on macOS/Linux (`cos-services` ), or across SSH workers.\n- Runs on an always-on Linux VM (\n- **CoS uses [L2 memory](https://hatchery.build/blog/the-bitter-lesson-for-agent-memory) (or bring your own)**  - **L2 (`state.db`, source of truth):** append-only SQLite + FTS5` events` table storing interactive chats (`claude` /`codex` /`agy` ), inbox replies, task updates, worker runs, wakes, and optional meeting transcripts verbatim.\n  - **Optional L0/L1 caches (`AGENTS.md`, `goals.md`, `projects/*.md`):** small, disposable files for quick orientation and letting you steer priorities directly. Everything detailed stays in L2 and gets searched on demand with`cos mem` .\n  - Background wakes (`cos-wake` ) start fresh each turn and query L2 when they need older context.\n\n`cos-kit` is designed to run inside an **isolated VM or sandbox** (such as an `exe.dev` VM), not bare on a laptop holding unrelated production credentials:\n\n- `cos web` binds to`127.0.0.1:8000` by default and has**no built-in authentication** . When running on a VM, bind behind`exe.dev` , Tailscale, or an authenticating reverse proxy.\n- Headless workers invoke the native CLIs in unattended mode (`--dangerously-skip-permissions` /`--dangerously-bypass-approvals-and-sandbox` ), scoped by your VM and`zone.json` guardrails.\n- `cos mem sql` always opens SQLite read-only (`mode=ro` +`PRAGMA query_only = ON` ).\n\n```\ngit clone https://github.com/elsehow/cos-kit.git && cd cos-kit\npip install -e .              # or: uv tool install .\ncos init ~/my-cos\ncd ~/my-cos\ncos digest\ncos web                       # http://127.0.0.1:8000\ngit clone https://github.com/elsehow/cos-kit.git && cd cos-kit\n./bin/cos init ~/my-cos\ncd ~/my-cos\n../cos-kit/bin/cos digest\n../cos-kit/bin/cos web\n```\n\nOpen an interactive chat in `~/my-cos` with whichever CLI you want (`claude`, `codex`, or `agy`). It loads `AGENTS.md` / `CLAUDE.md`, runs `cos digest`, and shares the same L2 event log with every other CLI and background worker.\n\n```\n# Briefing & L2 memory (shared across claude / codex / agy)\ncos digest\ncos mem describe\ncos mem search \"query\" [--source chat_turn|inbox|worker_run|cos_wake|granola] [--project slug]\ncos mem read <event_id> [--window 3] [--same-channel]\ncos mem channel <channel>\ncos mem sql \"SELECT id, ts, source, title FROM events ORDER BY id DESC LIMIT 10\"\ncos mem ingest                # pull latest interactive claude/codex/agy turns into L2\ncos mem backfill              # idempotently backfill existing tasks/inbox/runs into L2\n\n# Human inbox & Kanban\ncos inbox list --for human\ncos inbox send --to human --kind decision --subject \"Short title\" --body \"...\"\ncos inbox ack 14\ncos board\ncos task add \"Implement feature X\" --project app --owner engineer\n\n# Org chart, workers & live status\ncos org show\ncos org set-model engineer --harness codex --model default\ncos dispatch engineer --task 5 --prompt \"Review PR #42 and run tests\" --async\ncos top\ncos web --host 127.0.0.1 --port 8000\n```\n\nOn a Linux VM (e.g. `exe.dev`), generate `systemd` units tailored to your user and workspace:\n\n```\ncos systemd --out-dir ./systemd-units --host 127.0.0.1 --port 8000\nsudo cp ./systemd-units/* /etc/systemd/system/\nsudo systemctl daemon-reload\nsudo systemctl enable --now cos-web.service cos-wake.service cos-log-ingest.timer cos-daily-review.timer\n```\n\nOn macOS or local dev machines, use the built-in PID manager:\n\n```\ncos-services start web\ncos-services start cos-wake\ncos-services start log-ingest\ncos-services status\n```\n\nEverything outside core `cos` is opt-in and replaceable:\n\n- **`bin/pr-watcher`:** zero-token GitHub PR poller (` gh` ) that only wakes a worker when a PR's head SHA, draft status, or review state changes.\n- **`bin/granola-watcher`:** polls a single opt-in Granola folder (`--folder-id` or`granola.folder_id` in`zone.json` ), archives full raw transcripts to L2, and forwards relevant meetings to`cos` .\n- **`bin/staleness-check`:** zero-token weekday check that sends a single` Status check:` card for any`goals.md` workstream or`ideas.md` item untouched for ≥14 days.\n- **`laptop/cos` & `laptop/inbox`:** aggregate human inboxes and attach to persistent tmux chats across multiple isolated zones via`~/.config/cos/zones.json` .\n\n```\ncoslib/\n  db.py          # SQLite Kanban, inbox, runs, and immutable L2 events + FTS5\n  cli.py         # `cos` CLI (init, systemd, digest, mem, inbox, board, task, org, dispatch, web)\n  ingest.py      # Incremental claude / codex / antigravity chat transcript ingestor\n  dispatch.py    # Sync & async multi-harness worker dispatch\n  web.py         # Single-file stdlib HTTP briefing UI + uploads\n  org.py         # Declarative org chart & model/harness switching\n  policy.py      # Zone isolation & least-privilege grant checks\n  activity.py    # Live coordinator + parallel worker inspector (`cos top`)\n  scaffold.py    # `cos init` workspace generator & `cos systemd` renderer\nbin/             # Standalone executables & optional watchers\nlaptop/          # Optional remote SSH wrappers (`cos`, `inbox`)\ntemplates/       # Reference `zone.json` and `org.json`\ntests/           # Stdlib unittest suite\npython3 -m unittest discover -s tests -v\n```\n\nMIT", "url": "https://wpnews.pro/news/show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit", "canonical_source": "https://github.com/elsehow/cos-kit", "published_at": "2026-12-03 17:34:32+00:00", "updated_at": "2026-12-03 17:47:55.886618+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-safety"], "entities": ["cos-kit", "SQLite", "Python", "claude", "codex", "antigravity", "exe.dev", "elsehow"], "also_reported_by": [], "takeaway": "cos-kit keeps agent memory in an append-only SQLite FTS5 events table (state.db) as the source of truth, letting background wakes start stateless and query older context on demand instead of relying on disposable AGENTS.md and goals.md caches.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit", "markdown": "https://wpnews.pro/news/show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit.md", "text": "https://wpnews.pro/news/show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit.txt", "jsonld": "https://wpnews.pro/news/show-hn-cos-kit-a-minimalist-hpma-highly-persistent-multi-agent-toolkit.jsonld"}}