Skip to main content

MQTT 위에서 도는 커맨더-워커 A2A 오케스트레이션 에이전트

Project description

a2a-agent

a2a-agent는 MQTT 위에서 커맨더와 워커가 A2A 형식 메시지를 주고받기 위한 작은 명령줄 도구입니다.

현재 버전은 MQTT 브로커(기본값은 환경변수 A2A_BROKER_HOST, 미설정 시 localhost:1883), 기본 방 team, 6자리 페어링 코드, 역할별 run 루프, 커맨더 send, 워커 echo/opencode 실행기를 지원합니다.

설치

PyPI 배포 후에는 다음처럼 설치할 수 있습니다.

python -m pip install a2a-agent

개발 환경에서 소스 코드로 설치하려면 저장소 루트에서 실행합니다.

python -m venv .venv
source .venv/bin/activate
python -m pip install -e .

기본 사용

커맨더 설정을 만듭니다.

a2a-agent init --room team --device-name commander --broker-host <BROKER_HOST> --broker-port 1883 --no-tls

커맨더 실행 루프를 켭니다. 이 루프가 켜져 있어야 워커의 페어링 요청에 답할 수 있습니다.

a2a-agent run

다른 터미널에서 워커 6자리 페어링 코드를 발급합니다.

a2a-agent invite macbook-air

워커 기기에서는 코드만 입력해 참여합니다.

a2a-agent join ABC234

워커 실행 루프를 켭니다. 기본 실행기는 echo입니다.

A2A_EXECUTOR=echo a2a-agent run

커맨더에서 워커에게 작업을 보냅니다.

a2a-agent send macbook-air "ping-테스트"

워커 실행기

  • echo: 받은 텍스트를 그대로 회신합니다. 연결 확인용 기본값입니다.
  • opencode: opencode run -m opencode/big-pickle "<프롬프트>"를 호출하고 표준출력을 회신합니다. 실패하거나 설치되어 있지 않으면 에러 메시지를 결과로 돌려보냅니다.

실행기는 설정 파일의 executor 또는 환경변수 A2A_EXECUTOR로 선택합니다. 환경변수가 우선합니다.

토픽

페어링 토픽은 방과 무관한 전역 토픽입니다.

a2a/_pairing/request
a2a/_pairing/reply/{code}

작업 토픽은 방과 워커 이름을 기준으로 나뉩니다.

a2a/{room}/agents/{device}/card
a2a/{room}/agents/{device}/status
a2a/{room}/cmd/{device}/request
a2a/{room}/cmd/{device}/response
a2a/{room}/cmd/{device}/task-status

구조

a2a-agent/
├── pyproject.toml
├── README.md
├── LICENSE
├── install/install.sh
├── scripts/live_broker_roundtrip.py
├── src/a2a_agent/
│   ├── cli.py
│   ├── client.py
│   ├── config.py
│   ├── executor.py
│   ├── invite.py
│   ├── pairing.py
│   ├── protocol.py
│   ├── runtime.py
│   └── topics.py
└── tests/

라이선스

MIT 라이선스를 따릅니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a2a_agent-0.1.2.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a2a_agent-0.1.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file a2a_agent-0.1.2.tar.gz.

File metadata

  • Download URL: a2a_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for a2a_agent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a3919ab7fa6926f3ff22ac8b8fe9e2ef7b7ca175a753597d3b01ac695772e637
MD5 710206638fa0a0fd93042e45e8705a15
BLAKE2b-256 018c953a440a6d05da8f594dd7e19fda9986889b11f844aa32494b11e466fe0e

See more details on using hashes here.

File details

Details for the file a2a_agent-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: a2a_agent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for a2a_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21c776ab0a5880af3d4d1346486c90883e3fa968f12e732b8fb54022bf180a1d
MD5 681cb25eabf81762212f91d461e06555
BLAKE2b-256 7c0496f2211ae5af9a9d7ce9fd373736ca34d5f87ef31ab6f928fae91b2f3b87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page