AI Agents Unleashed: Direct Dialogue Between Agents
Source: Dev.to
Overview
Agentic TMUX MCP is a multi‑agent orchestration system for GitHub Copilot CLI that runs multiple AI agents in parallel tmux panes.
Instead of a single AI handling everything sequentially, you describe the work once and the system spawns agents that split the tasks. Each agent runs in its own pane, allowing you to watch them think, code, and talk to each other in real time.
What makes it different
- Single prompt – You tell Copilot CLI what you want done; it spawns the agents, assigns tasks, and collects results.
- Direct agent‑to‑agent communication – Agents message each other via lightweight queues (SQLite by default) without a coordinating “middle man,” keeping context windows small and eliminating token overhead.
- Full transparency – Every agent runs in a visible tmux pane, showing its thought process, tool calls, file edits, and messages.
Architecture
You: "Spawn 2 agents: a coder and a reviewer.
Build an HTML snake game together."
│
▼
┌─────────────────────────────────────────┐
│ Agentic MCP Server │
│ Spawns panes · Routes messages │
└─────────┬───────────────────┬───────────┘
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Pane: W1 │◄──►│ Pane: W2 │
│ Coder │ │ Reviewer │
│ copilot -i │ │ copilot -i │
└─────────────┘ └─────────────┘
▲ Direct messaging ▲
└────────────────────┘
Agents communicate through SQLite‑based message queues. Each agent has MCP tools: send_to_agent(), receive_message(), and list_agents().
Comparison with traditional multi‑agent frameworks
Traditional setups funnel all communication through a central orchestrator:
Agent A → Coordinator → Agent B
Every hop consumes context tokens and may lose details. With Agentic TMUX, agents exchange messages directly, preserving the full content and reducing token usage—especially important for iterative workflows (e.g., a coder and reviewer exchanging five rounds of feedback would require ten coordinator round‑trips in a conventional system).
Example: Number‑Guessing Game
Two agents play a game where one picks a secret number (1–100) and the other guesses, exchanging “higher/lower” hints until the number is found.
Prompt
Use agentic to play a game of guess the number [1-100] between 2 players
Example: Building an HTML/JS Snake Game
Prompt
Use agentic to spawn 2 agents.
Agent 1: frontend developer who builds an HTML/JS snake game.
Agent 2: expert code reviewer who reviews each iteration and suggests improvements.
They go back and forth until the reviewer approves.
Interaction Log (summarized)
- Reviewer → Coder – Review criteria: modern visuals, smooth animations, responsive controls, interpolated movement, cross‑device support, well‑commented single‑file code.
- Coder → Reviewer – Acknowledged; begins implementation.
- Coder – Submits initial implementation.
- Reviewer → Coder – Six items to fix (add food/snake animations, board grid, pause button visual state, interpolated movement, reduce shadow blur on mobile, dynamic scaling).
- Coder → Reviewer – Acknowledged; updates code.
- Reviewer → Coder – Re‑review complete: visually polished, smooth animations, excellent UX. No further improvements required. Approved.
Result: A fully functional snake game built collaboratively by the two agents.
Note: This demonstration was performed with GPT‑4.1 (free model!).
Implementation Details
- Repository:
- The system is an MCP server that extends Copilot CLI, giving it the ability to spawn copies of itself in tmux panes and coordinate them.
- Copilot CLI was used throughout:
- Scaffolding the MCP server.
- Implementing the SQLite storage layer.
- Building a Rich‑based monitoring dashboard.
- Debugging tmux pane management (e.g., propagating environment variables through shell commands).
- Agents follow a simple workflow defined in the
AGENTS.mdprotocol file:- Discover – Identify tasks and available agents (
list_agents()). - Execute – Perform work.
- Report – Send results via
send_to_agent(). - Poll – Wait for further instructions.
- Discover – Identify tasks and available agents (
The agents operate autonomously without hand‑holding, demonstrating how Copilot CLI can serve as an effective participant in multi‑agent scenarios.