{"slug": "show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents", "title": "Show HN: Agent-exchange - messaging and coordination for terminal-based agents", "summary": "Martin Krasserm released agent-exchange, an open-source tool that lets terminal-based agents such as Claude Code and Codex exchange messages via the asn command-line interface, supporting local, remote, and container sessions. The project includes agent-session as the core, with optional components for a web interface, dispatch, and Docker execution, and requires macOS or Linux, tmux, jq, Python 3.13+, and uv. Sessions can be coordinated by human-directed agents, and the tool allows humans to observe or take over any session.", "body_md": "`agent-exchange`\n\nenables supported terminal-based agents, currently Claude Code and Codex, to exchange messages through the `asn`\n\ncommand-line interface. It provides two doors into each session: a generic CLI for sending and receiving messages programmatically, and the agent's native terminal UI for direct human interaction. Sessions can run locally, remotely, or in containers.\n\nA human typically gives a goal to a coordinator, which uses `asn`\n\nto organize other agent sessions. Coordinators and sub-coordinators are ordinary agent sessions given that role; there is no hidden orchestration engine. Worker sessions can communicate directly with peers. Humans can observe, guide, or take over any participant's session at any time.\n\n`agent-session-web`\n\nshows every `asn`\n\n-managed session in one browser. Here a coordinator briefs a local Claude Code session, which uses `asn`\n\nto message a remote Codex peer; its reply returns to the same Claude Code conversation, while either terminal remains open to the human.\n\n| Project | Description |\n|---|---|\nagent-session |\n\n`asn`\n\nCLI for managing agent sessions, backed by persistent, distributed messaging infrastructure.**agent-session-web****agent-session-top****agent-dispatch****agent-docker**`agent-session`\n\nis the core. The other projects add user interfaces, dispatch behavior, or an execution environment without introducing a different kind of agent session.\n\n- macOS or Linux\n`tmux`\n\nand`jq`\n\nand Python 3.13 or newer`uv`\n\n- an authenticated\n`claude`\n\nor`codex`\n\nexecutable on`PATH`\n\n| Feature | Additional requirements |\n|---|---|\n| Browser interface | Node.js 18 or newer and `npm` |\n| Remote sessions | SSH access from the local machine to the remote machine that succeeds without prompting;\n`tmux` , `jq` , and the authenticated agent executable on the remote machine |\n\n`asn prep --check`\n\nreports missing requirements without making changes. Add `--host HOST`\n\nand/or `--docker`\n\nto check the intended remote or container placement. The [agent-session README](/krasserm/agent-exchange/blob/main/agent-session) explains the preparation steps.\n\nClaude Code and Codex are the two terminal-based agents supported today. Additional terminal-based agents can be integrated without changing the common `asn`\n\ninterface.\n\n```\ngit clone https://github.com/krasserm/agent-exchange.git\ncd agent-exchange\nuv tool install --editable ./agent-session\n```\n\nThe full `asn`\n\nCLI must be discoverable through `PATH`\n\non the local machine before sessions are started, because sessions running directly on that machine invoke it themselves. Remote and container sessions receive an `asn`\n\ncommand limited to messaging and inspection during setup, so the full CLI does not need to be installed in those environments. If `command -v asn`\n\nprints nothing, run:\n\n```\nuv tool update-shell\n```\n\nOpen a new terminal, then confirm that the executable is found through `PATH`\n\n:\n\n```\ncommand -v asn\nasn --help\n```\n\nStart Codex in an existing project directory:\n\n```\nasn start /absolute/path/to/project --agent codex\n```\n\nClaude Code is the default, so this starts Claude Code:\n\n```\nasn start /absolute/path/to/project\n```\n\n`asn start`\n\nprints a session key and a `tmux`\n\nsession name. Use the key, or an unambiguous prefix, to address the session:\n\n```\nasn send SESSION_KEY \"Review the authentication flow and summarize the main risks.\"\nasn status SESSION_KEY\nasn messages SESSION_KEY\n```\n\n`asn send`\n\nis fire-and-forget: it submits text to the agent's terminal but does not wait for the work to finish. `status`\n\nreports the session state, `messages`\n\nreturns recent assistant responses, and `capture`\n\nreads recent terminal output.\n\nFind the `tmux`\n\nname with `asn status SESSION_KEY`\n\n, then attach to the agent's native terminal UI:\n\n```\ntmux attach -t TMUX_SESSION_NAME\n```\n\nText entered here and text sent with `asn send`\n\nreach the same running session. Detach with `Ctrl-b d`\n\n; stop the session explicitly when it is no longer needed:\n\n```\nasn stop SESSION_KEY\n```\n\nWith at least one session running, start `agent-session-web`\n\nfrom another terminal:\n\n```\ncd agent-session-web\nAGENT_SESSION_WEB_HOST=127.0.0.1 ./run.sh\n```\n\nOpen [http://127.0.0.1:8770](http://127.0.0.1:8770). The session list, interactive terminal, recent responses, and controls are different views onto the same sessions managed by `asn`\n\n; selecting a remote or container session works the same way.\n\nContinue with the [agent-session README](/krasserm/agent-exchange/blob/main/agent-session) for detailed usage, or use the project table above to explore another component.\n\nThe bundled `agent-exchange`\n\nplugin teaches Claude Code or Codex how to operate `asn`\n\nand, when explicitly asked, coordinate a team of sessions.\n\nClaude Code:\n\n```\nclaude plugin marketplace add .\nclaude plugin install agent-exchange@agent-exchange\n```\n\nCodex:\n\n```\ncodex plugin marketplace add .\ncodex plugin add agent-exchange@agent-exchange\n```\n\nStart a new agent session after installation so the skills are loaded. The plugin contains one skill for operating sessions and a separate, explicitly activated skill for coordinating a team.", "url": "https://wpnews.pro/news/show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents", "canonical_source": "https://github.com/krasserm/agent-exchange", "published_at": "2026-08-11 13:21:22+00:00", "updated_at": "2026-08-11 13:41:43.722886+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["Martin Krasserm", "agent-exchange", "Claude Code", "Codex", "agent-session", "agent-session-web", "agent-session-top", "agent-dispatch"], "alternates": {"html": "https://wpnews.pro/news/show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents", "markdown": "https://wpnews.pro/news/show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents.md", "text": "https://wpnews.pro/news/show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents.txt", "jsonld": "https://wpnews.pro/news/show-hn-agent-exchange-messaging-and-coordination-for-terminal-based-agents.jsonld"}}