A2A: Claude Code 세션이 서로 대화하도록 하세요.
hackernews
|
|
📦 오픈소스
#a2a
#ai 딜
#ai 에이전트
#claude
#claude code
#실시간 협업
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
A2A는 서로 다른 Claude Code 에이전트 세션을 하나의 허브(포트 7800)로 연결하여 실시간으로 작업 상태를 공유할 수 있게 해주는 도구입니다. 대표적인 활용 사례로, 한 에이전트가 코드를 실행하고 다른 에이전트가 실시간으로 이를 관찰하며 오류가 발생했을 때 즉시 디버깅 작업에 착수할 수 있습니다. 개발자는 슬랙이나 컨텍스트 전환 없이도 MCP 클라이언트와 웹소켓을 통해 에러 로그를 공유하며, 현재 에이전트 등록, 구독, 이벤트 라우팅 등 39개의 테스트를 통과한 기반 위에 향후 인증 및 직접 메시징 등의 추가 기능이 계획되어 있습니다.
본문
Let your Claude Code sessions talk to each other. A2A is a hub that connects Claude Code agents so they can watch each other's work in real-time. The killer use case: one agent runs your code, another watches for errors and debugs them live. Claude A --stdio--> MCP Client A --WebSocket--> Hub (:7800) notification. cd /path/to/a2a python3 -m venv .venv && source .venv/bin/activate make install Terminal 1 — start the hub: make hub Terminal 2 — agent Alice: cd /path/to/a2a claude --dangerously-load-development-channels server:a2a > /connect alice Connected as alice (id: a1b2c3d4) Terminal 3 — agent Bob watches Alice: cd /path/to/a2a claude --dangerously-load-development-channels server:a2a > /connect bob > /watch a1b2c3d4 Watching alice. Back in Terminal 2 — Alice hits a bug: > run python3 buggy_script.py Bob sees the error land in his session and starts debugging. No copy-paste, no Slack, no context switching. Alice can also send curated updates: > call emit with content "tried 3 fixes, all fail on the same import" | Layer | What it does | |---|---| Hub (src/a2a/hub/ ) | Central server. Owns the agent registry, watch subscriptions, and event routing. Runs on :7800 . | MCP Client (src/a2a/mcp_client/ ) | Per-agent bridge. Spawned by Claude Code via stdio. Connects to hub via WebSocket. Translates between the two worlds. | Skills (.claude/commands/ ) | /connect and /watch — the UX layer so agents don't call raw MCP tools. | - Alice runs a command that fails - Alice (or a hook) calls emit with the error - MCP Client A sends it to the hub over WebSocket - Hub checks: who's watching Alice? → Bob - Hub pushes the event to MCP Client B over WebSocket - MCP Client B injects a notification into Bob's Claude session - Bob's Claude sees the error and reacts Agents get these MCP tools automatically: | Tool | What it does | |---|---| connect(name) | Register with the hub | disconnect() | Leave the hub | watch(agent_id) | Subscribe to another agent's events | unwatch(agent_id) | Unsubscribe | emit(content) | Broadcast an event to your watchers | list_agents() | See who's connected | make test 39 tests covering the envelope model, agent registry, event router, and MCP tool message formatting. See POST_MVP.md for the roadmap: direct messaging between agents, message queues, authentication, backpressure, and network support.
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유