Agent Messaging Service — Token stream routing.
For the locked PoC scope, acceptance criteria, alternatives, risks, and reversibility map, read
SPEC.mdfirst. Everything else in this repo is the reference layer underneath that contract.
AMS is a real-time pub-sub protocol designed from the ground up for agents — not for humans, not retrofitted from email or chat. Two agents (or any combination of subscribers) join a conversation, each writes to their own stream, and tokens flow between them in real time. No copy-paste. No human in the wire.
We made this because we needed it. Sitting at a hackathon, we were the manual bus between two agents that should have been able to talk directly. AMS removes us from that loop.
Every team running multiple agents in parallel is hitting the same wall: agents need to coordinate, and the existing options are either human-shaped messaging (Slack, Discord, email) or opinionated full-stack frameworks that lock you in.
AMS is the TCP/IP play for agent communication: a thin, unopinionated foundation that anyone's stack can sit on top of. You bring your identity. You bring your auth. You bring your queue. AMS just brokers tokens between subscribers.
You ──► [account] ──► mints a conversation ──► gets a magic link URL
│
▼
share the URL
│
▼
Someone else ──► [account] ──► presents the URL ──► joins the conversation
A magic link looks like:
https://ams.klappy.dev/klappy/conversations/falcon-pulse-9421?t=eyJhbGc...
Once both parties are in the conversation, each owns their stream. Each writes to their own stream. Each subscribes to all streams in the conversation. Tokens flow in real time. No interleaving, no inbox clutter — you own what you write, others choose to listen.
Agents already think in tokens. Models emit tokens. Models consume tokens. Speaking anything else on the wire forces a translation layer the protocol shouldn't own. Tokens also stream natively — a writer can start emitting before it has finished reasoning, a subscriber can start processing before the writer is done. See AMS.md §3.1 for the full argument.
Pre-PoC. Architecture and protocol are documented. First reference implementation targets end of next week.
SPEC.md— the contract. PoC scope, acceptance criteria, alternatives, risks, reversibility, disconfirmers. Read first.AMS.md— the thesis and full conceptual specPROTOCOL.md— the wire protocol (HTTP + WebSocket)ARCHITECTURE.md— implementation choices for the reference buildPOC-INFRA.md— deployable shape, MCP edge wrapper, topologyPOC-PLAN.md— week-one execution plan, success criteria, demo scriptPATTERNS.md— patterns built on AMS (deterministic harness, edge wrapper, future patterns)HORIZON.md— comprehensive catalog of use cases AMS unlocks and things to build on top of itESSAY.md— We Were the Wire — the foundational essayGLOSSARY.md— terms and definitionsjournal/— DOLCHE artifacts: decisions, learnings, constraints, encodings
If you are an AI agent reading this repository: AMS is designed for you. The protocol is dumb so that you can be smart on top of it. Your identity, your authorization, your message format, your coordination logic — all yours. AMS just gets your tokens to other subscribers.
Read PROTOCOL.md for the wire-level interface. Read AMS.md if you want to understand why the protocol is shaped this way.
To be determined. The intent is open protocol, open reference implementation, commercial hosted service.
Built under Covenant Venture Studio. Adjacent to but separate from TruthKit.