feat(interop): add A2A (Agent-to-Agent) protocol support#4166
Closed
5queezer wants to merge 8 commits intozeroclaw-labs:masterfrom
Closed
feat(interop): add A2A (Agent-to-Agent) protocol support#41665queezer wants to merge 8 commits intozeroclaw-labs:masterfrom
5queezer wants to merge 8 commits intozeroclaw-labs:masterfrom
Conversation
0d05a27 to
f036781
Compare
602d5aa to
c27e48c
Compare
6c90740 to
23ef01d
Compare
2 tasks
dca06fc to
a3a7c5f
Compare
Collaborator
|
Hey @5queezer — this PR currently has failing CI checks. Could you rebase against current |
6083a16 to
3622fa4
Compare
Contributor
Author
|
Rebased onto master and all checks pass locally ( Tested manually via Telegram: single-turn A2A calls work between agents, each agent prints its reasoning to a shared group chat for verification. Happy to record a demo if helpful. |
faf2a66 to
6bded3b
Compare
Implement native A2A protocol support enabling ZeroClaw agents to communicate with external A2A-compatible agents across hosts. Components: - A2A server (src/gateway/a2a.rs): inbound JSON-RPC 2.0 handlers for message/send and tasks/get, agent card at /.well-known/agent-card.json - A2A client tool (src/tools/a2a.rs): outbound tool with discover, send, status, and result actions Security hardening: - Constant-time bearer token comparison (timing side-channel prevention) - SSRF protection: private IP blocking, DNS resolution validation, redirect hop validation - Security policy enforcement: autonomy gating and rate limiting - Error redaction: generic messages to callers, full details logged - Config API masking for a2a.bearer_token - Manual Debug impl redacting bearer_token Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add MAX_TASKS capacity limit to prevent memory exhaustion DoS - Warn at startup when A2A has no auth configured - Warn at startup when agent card exposes internal bind address - Stop echoing user-supplied task_id in error messages - Document DNS rebinding TOCTOU in SSRF validation - Derive Default for A2aConfig (fixes clippy) - Add 39 tests covering auth, task lifecycle, capacity, and HTTP actions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the new A2A protocol configuration keys, security notes, and defaults across all maintained config reference locales. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t A2A The A2A tool was registered in the tool registry but missing from the bootstrap system prompt tool_descs list, making it invisible to models that rely on text-based tool instructions (e.g. OpenAI Codex). Additionally, the SSRF protection unconditionally blocked localhost and private IPs, preventing same-host multi-instance A2A communication (multiple ZeroClaw bots on a single Raspberry Pi). The new allow_local flag on A2aTool, derived from whether a2a.public_url points to a local address, permits same-host A2A while maintaining SSRF protection for public deployments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests were calling validate_url as a static method after it was changed to take &self for the allow_local flag. Updated all test callsites to use instance method and added a test for allow_local=true. Fixed cargo fmt on A2aTool::new call in mod.rs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a2a.notify_chat_id is set, inbound A2A task results are posted to the configured Telegram chat (e.g. a group). This makes inter-agent communication visible to users watching the group — useful for multi-instance setups where each bot has its own persona. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add `debouncer` field to ChannelRuntimeContext test initializer and `auth_limiter` field to A2A test AppState to fix compilation after rebase onto master which introduced these new required struct fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6bded3b to
b86c192
Compare
Add module-level doc comments to both A2A files listing what's implemented and what's missing vs the full A2A spec. Links to issue #3566 for tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b86c192 to
c885dd4
Compare
JacobGaoZQ
pushed a commit
to JacobGaoZQ/zeroclaw
that referenced
this pull request
Apr 14, 2026
Compare current A2A branch code with upstream PR zeroclaw-labs#4166, listing all additions including stream action, new config fields, frontend test page, and documentation. 🤖 Generated with [Qoder][https://qoder.com]
JacobGaoZQ
pushed a commit
to JacobGaoZQ/zeroclaw
that referenced
this pull request
Apr 15, 2026
Remove files not part of PR zeroclaw-labs#4166: - A2A implementation status document - A2A test report - A2A test screenshots (12 files) - Strands A2A server script - LangChain A2A server script - A2A server startup script - A2A requirements files Keep: - docs/a2a-comparison.md (comprehensive A2A documentation) - python/zeroclaw_tools/* (Python companion package, from version bump) - python/pyproject.toml, README.md, tests/* (from version bump) 🤖 Generated with [Qoder](https://qoder.com)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mastersrc/tools/a2a.rs), inbound JSON-RPC 2.0 server (src/gateway/a2a.rs), auto-generated agent card,A2aConfigschema, same-host localhost A2A for multi-instance Pi setupsprocess_messagepipelineLabel Snapshot
highMgateway,tool,config,onboardtool: a2a,gateway: a2aChange Metadata
featuremultiLinked Issue
Validation Evidence
Security Impact
Mitigations:
allow_localonly whenpublic_urlpoints to localhost. Bearer tokens per-call, not logged.GET /.well-known/agent-card.jsonunauthenticated (metadata only).POST /a2arequires bearer token (PairingGuard ora2a.bearer_token, constant-time comparison).a2a.enabled = false).allow_localis a blanket bypass — peer allowlist planned in [Feature][interop]: A2A peer discovery for same-host and LAN #4643.Privacy and Data Hygiene
passCompatibility / Migration
[a2a]section with#[serde(default)]i18n Follow-Through
en,vi,zh-CN: YesHuman Verification
Side Effects / Blast Radius
Rollback Plan
a2a.enabled = falsea2a.enabled(defaultfalse)Risks and Mitigations
process_messagewith existing rate limiting. TaskStore eviction planned in [Feature][interop]: A2A peer discovery for same-host and LAN #4643.public_urlis local — peer allowlist planned in [Feature][interop]: A2A peer discovery for same-host and LAN #4643