Concept art for agent-chat

I released version 2.0.0 of agent-chat today. It's a small Ruby gem that gives AI agents a chat room on your machine.

Quick introduction to agent-chat

In February, Claude Code launched Agent Teams. Agents in a team talk to each other one to one or by broadcast. I wanted something closer to a group chat for pair and mob programming, so I built agent-chat.

It's a message queue for agents (or humans) that uses room-based conversations, stored in SQLite files on your machine. It has a CLI, agent-chat, and a web UI, agent-chat-web.

I introduced it on LinkedIn with a seven minute demo. The post is embedded below, so press play there. In the video I install the gem, send a message from the CLI, watch it appear in the web UI, then start a Claude Code Agent Team that builds Hangman as a mob, with a TDD coach and two developers swapping the driver seat in one room.

#claude #pairprogramming | Erik Madsen

I have experimented with pair and mob programming with teams of agents on my local machine for a long time and built a few tools around it for my own use. Then Claude Code launched its Agent Teams feature this week, which brought a really great way to orchestrate collaborating agents. One challenge, however, is that the communication between agents in Agent Teams is either 1-1 or broadcasts, which means you have to go to great lengths in your prompts to shape the communication of the collaborators. I have had good experiences with putting the agents together in a chat room for their collaboration, and I built a little chat tool called agent-chat for this purpose. It's a chat messaging tool for inter-agent communication, backed by SQLite using local files on your machine. Designed for AI agents (or humans) that need a simple shared message queue with room-based conversations. It includes a CLI (agent-chat) and a web UI (agent-chat-web). I published it as a Ruby gem here https://lnkd.in/dpNm8NBZ and the source code is available here https://lnkd.in/dyegQhdb In this video I'm giving a quick introduction to the tool and a demo of mob programming using Agent Teams and agent-chat. If you find this interesting or useful I hope you'll try it out for yourself, or make your own tools that work even better and share them with me. #claude #pairprogramming

favicon linkedin.com

That version worked, but agents had no way to say which message they were answering, and its output was meant for people to read.

What's new in 2.0.0

Message ids and replies. Every message gets a short random id, and send now prints it. send --reply-to <id> links a reply to one or more messages. An unknown id refuses the whole message. show --room <name> <id>... fetches messages by id.

<<< Alice | 2026-11-22 14:30:00 | 7xKqR2m | re: 3fGhJ9k >>> 

--json on every command. Messages are one JSON object per line with id, author, timestamp, content and reply_to. Refusals come back as a structured error with exit status 1, and warnings go to standard error as JSON lines. An agent can now parse what it reads instead of scraping text.

Strict arguments. Typos used to be ignored silently. Now a flag or command one edit away from a known name is read as that name, with a warning. Anything else is refused with exit status 2. Agents mistype flags, and a quiet mistake in a multi-agent room is hard to find.

Web UI. It shows ids and reply links that jump to the message answered, and lets you reply to several messages at once.

Fixes.

  • The web UI rendered message content as unsanitised HTML, so any message could run script in the viewer's browser. Content is now sanitised. If you ran 1.x with the web UI, upgrade.
  • Pressing Ctrl-C right after stream or receive started could crash Ruby with a [BUG] report.
  • The web UI dropped a message posted in the same second as another.

Upgrading

2.0.0 has breaking changes. Read these before you upgrade:

  • Ruby 3.3 or later is required.
  • Rooms written by 1.x are not read. The first 2.0 command to open one moves its database to a backup folder under $TMPDIR and starts the room empty, with a warning naming the backup. The OS may clear that folder, so copy any history you want to keep first.
  • receive prints nothing when there is nothing new, and send refuses empty content.

The full list is in the changelog.

gem install agent-chat 

Source and issues: github.com/beatmadsen/agent-chat.

Let me know what you think!
Erik.