feat(a2a): add secure peer protocol integration - #63182
Conversation
Related: #41711 (core-team consolidated A2A plugin, |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the substantial security and lifecycle work. The feature is not present on current main, but it overlaps active A2A implementations that need a maintainer-led consolidation.
Problems
pyproject.toml:220addsa2a-sdk[http-server,sqlite]==1.1.0.AGENTS.md:559-575requires bounded PyPI ranges for non-CI dependencies.- This PR changes 12 core files, including
gateway/run.py,model_tools.py,run_agent.py, andhermes_cli/main.py, alongside the plugin. Current open A2A work #41711 and #46241 overlaps this transport and gateway-contract surface; #56434 also identifies this PR as a competing implementation.
Suggested changes
- Use the repository's bounded dependency form and regenerate the lockfile.
- Reconcile the generic gateway-contract work with the implementation maintainers select, then carry the credential-bound identity/task-storage pieces as focused follow-ups rather than merging parallel A2A stacks.
Automated hermes-sweeper review.
|
Addressed the dependency-policy review thread in a6dff21.
Validation: 29 focused A2A tests and 12 packaging-metadata tests passed. |
# Conflicts: # gateway/run.py
|
Follow-up: merged current upstream Post-merge validation: 50 A2A, multiplex-profile, and packaging tests passed. |
|
Thanks @ComicBit — the SDK-isolated, CLI-skill-first architecture here was a thoughtful application of the narrow-waist model. A2A support has now landed on main via #77109 taking the other fork in the road: a stdlib platform plugin (plugins/platforms/a2a/) with zero SDK dependency, v1.0-conformant against the official a2a-sdk, with client tools in an opt-in toolset. That supersedes this integration path, so closing with credit. Your peer-management UX ideas (named peers, explicit context continuation via hermes a2a) are worth revisiting as a follow-up against the landed plugin if you're interested. |
What does this PR do?
Adds an opt-in, authenticated Hermes-to-Hermes integration for the official Agent2Agent Protocol 1.0. A Hermes instance can expose a task-oriented A2A endpoint and contact named peers through
hermes a2a, including card discovery, send/get/list/cancel, and explicit context continuation.The integration follows Hermes' narrow-waist model: the agent uses a plugin-local CLI skill instead of gaining a permanent model tool, and the official SDK is isolated behind the optional
a2aextra.Why / integration gap
Hermes' existing platform path is designed around messaging delivery. A standards-compliant A2A endpoint additionally needs synchronous request/response dispatch, protocol task ownership and cancellation, and a host-enforced tool boundary. This PR adds those generic gateway contracts and consumes them from the A2A platform rather than introducing an A2A-specific bypass in the agent core.
Type of Change
Changes Made
a2a-sdk==1.1.0server/client plugin with Agent Card and JSON-RPC task lifecycle support.hermes a2a.Security and compatibility
API_SERVER_KEYand arbitrary request URLs are rejected.configuredpolicy preserves existing platform behavior.Validation
Notes for reviewers
This is intentionally a draft while it is rebased onto current
main; the branch base is 67 commits behind and overlaps recent upstream edits in four files.