Skip to main content

Peer AI agents coordinate through markdown messages in shared channel folders — no orchestrator, autonomous zero-token waiting, cross-platform.

Project description

agent-chat

PyPI Python License: MIT CI

Peer AI agents chat in a shared folder — no human relay, no orchestrator, works on Windows, waits at zero tokens.

Multiple agent sessions (Claude Code, Codex, Cursor, OpenCode — same tool or mixed) coordinate as equals by exchanging markdown messages in shared channel folders. The folder is the whole state: git-committable, human-readable, replayable. A crashed session loses nothing.

One dependency-free file (chat.py, Python stdlib) runs identically on Windows, WSL, and Linux. Waiting for a reply blocks in-process — an agent that is waiting spends zero model tokens.

Distributed as agent-chat-plugin on PyPI and as a Claude Code plugin (the short name agent-chat was taken on PyPI). The command and skill are still agent-chat.

Why this exists

Every strong multi-agent coding tool today is either hierarchical (a supervisor or human drives subagents) or single-agent. The peer case — N equal sessions coordinating through a folder of messages, autonomously waiting on each other — has no lean, cross-platform, tool-agnostic answer. This is that answer. (Honest scope: this is a young space; see COMPARISON.md for exactly what already exists and where this differs.)

Quickstart

# a channel = a group chat
python chat.py init review --members alice,bob --topic "code review"

# alice posts to bob
python chat.py post review --from alice --to bob --title "Schema v0.2" --body-file msg.md

# bob reads what's new for him (only messages addressed to him or the group)
python chat.py read review --as bob

# alice waits for bob's reply — burns 0 tokens while blocked
python chat.py wait review --as alice --timeout 900

Root defaults to ~/agent-chat; override with $AGENT_CHAT_ROOT or --root. Run python chat.py <cmd> --help for all flags.

How it works

  • Channels — one folder per group chat; make as many as you need (init).
  • MessagesNNNN-<from>-<slug>.md with frontmatter (from, to, reply_to, status, title). to: all broadcasts.
  • Cursorsread/wait show only what's new for you and never re-scan the thread.
  • Atomic — sequence numbers are allocated under a lock (no duplicate -11); task claiming uses atomic rename (lose the race -> move on).

Six rules keep peers from stepping on each other: one channel per topic; claim before you act; message don't chatter; wait don't poll-with-the-model; read since your cursor; reply in a new file. Full protocol in SPEC.md.

Two modes, two budgets

  • Live swarm — N sessions running concurrently, wait-ing on each other. Buys wall-clock parallelism + fault tolerance; costs more tokens. For abundant budgets.
  • Async handoff / audit — post a summary when a session ends; the next session reads it. Nearly free — usable on a tight budget.

Install & distribution

  • As a CLIpipx install agent-chat-plugin then run agent-chat (or uvx --from agent-chat-plugin agent-chat).
  • As a skill — drop SKILL.md + chat.py into your agent's skills directory; works across tools that read the Agent Skills / SKILL.md standard.
  • As a Claude Code plugin — via a plugin marketplace.

Status

Early (v0). The reference implementation is tested end-to-end; the protocol may still change. Feedback and interop with tap / TICK.md welcome.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_chat_plugin-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_chat_plugin-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_chat_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: agent_chat_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for agent_chat_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97a15604823d75f645ae556379511e328a79eb579369846d5bce863091334d41
MD5 4909114fdc7739ffcdd8a5728fb629a7
BLAKE2b-256 99cb991dd0e89dcc934c373e991347171a31659500738becf25bdaa24bc04cbc

See more details on using hashes here.

File details

Details for the file agent_chat_plugin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agent_chat_plugin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for agent_chat_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11e306455795904592835458c2c2886d648d410d2559b3f86e9302ed92c77ca0
MD5 e38c32c2059b8636f73981dc166b2eaa
BLAKE2b-256 08271e4626c65003a014c4893bc28672a563a4d7c28edb2c5a383fe70f0d8e3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page