Skip to main content

ai-baton

中文

Portable, auditable, file-first handoff protocol for AI assistants.

Lets you switch between AI tools — Claude Code, Codex CLI, Cursor, GitHub Copilot, or anything else that can read and write files — on the same long-running project, without re-explaining everything from scratch. Everything lives in plain text files in your project folder — no server, no vector database, no vendor lock-in.

When you'd use this

  • You run out of usage on one tool and need to switch. Cursor's out of credits, so you jump over to Codex, WorkBuddy, or whatever's next to keep going — without this, that means re-explaining the whole project from scratch: what you decided, what you already ruled out, all of it.
  • The conversation's gotten too long and you want a fresh one. To save tokens, or because quality drops once context gets huge — starting over shouldn't mean losing everything you already worked out.
  • You're deliberately splitting the work across tools. Backend in Claude Code, frontend in Cursor; or one tool writing code and another writing the docs. Both sides need to know what the other one already decided — API shapes, naming — or they end up out of sync.

How it works

  • PROTOCOL.md — the rules this project follows
  • memory/ — durable facts and decisions, one file each, tagged confidence: verified or unverified
  • status/CURRENT_STATUS.md — what's happening right now (overwritten each time, not appended)
  • evidence/ — raw detail worth keeping, append-only
  • handover/ / archive/ — point-in-time snapshots / superseded plans — nothing gets deleted

Install the Agent Skills skill once (ai-baton skill install) and a supporting AI tool follows this automatically: reads the right files in the right order, asks before writing, keeps state current — without being reminded every session.

Requires local filesystem access — works with tools that run on your machine or have been granted access to a folder (Claude Code, Codex CLI, Cursor, Windsurf, WorkBuddy, Claude Desktop with a filesystem connector, etc.). Plain web ChatGPT or web Claude.ai chat can't read PROTOCOL.md at all — no file access, so Agent Skills support doesn't help there.

Status

Pre-alpha.

Working:

  • The spec (SPEC.md) and CLI — pip install ai-baton-tool (the PyPI distribution name; an unrelated existing package blocked plain ai-baton, but the command itself is still ai-baton): init / validate / status / list / workspace set / skill install
  • A default workspace convention — ~/ai-baton-workspace/<project>/, root chosen once and remembered, projects discoverable across tools/sessions via ai-baton list
  • A full worked example (examples/demo-project/)
  • validate flags well-known credential formats (heuristic safety net, not a full secrets scanner) and warns when memory/ is getting large enough to cost real tokens every session (threshold configurable per project via .ai-baton.json)
  • Clean error messages on bad paths instead of raw Python tracebacks
  • 49 tests passing locally

Not built: semantic search (by design — see the trade-off below), and any automated measurement of handoff effectiveness (methodology sketched in docs/metrics.md, nothing wired up yet).

Not the first system aiming at cross-tool AI memory — Mem0, OpenMemory, and Letta solve overlapping problems with a vector store and/or an agent runtime. This makes the opposite trade-off: zero infrastructure and git-native auditability, at the cost of semantic search and automatic extraction. See docs/comparison.md.

Quick orientation

License

MIT — see LICENSE.

Release files for ai-baton-tool 0.0.22

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

Source distribution (sdist)

Source distribution for ai-baton-tool 0.0.22
File Size Uploaded
ai_baton_tool-0.0.22.tar.gz 51.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-baton-tool 0.0.22
File Interpreter ABI Platform
ai_baton_tool-0.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 78.7 kB

Release files / ai_baton_tool-0.0.22.tar.gz

Download URL ai_baton_tool-0.0.22.tar.gz
Size 51.3 kB
Tags Source
SHA-256 checksum
How to use checksums
408a95690dedc72905735460b7eed9fd19f7bb9976ba822c465a967a6132886b
BLAKE2b-256 checksum
How to use checksums
66b87fe39c024bef4a756bb8de0b1afd574eebd7b7588a4c643bc10f4069ad1c
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 13, 2026.

Transparency log

Release files / ai_baton_tool-0.0.22-py3-none-any.whl

Download URL ai_baton_tool-0.0.22-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e855d4daa3559a070c79c9340ca308d8febc4e1790eeba0e43dc6338dabd8d71
BLAKE2b-256 checksum
How to use checksums
39711cc46f452d581bd1a43643e755363e42c26338b3476c089125afe53fbd26
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.22 This release

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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