feat(bindu): A2A microservice adapter for agent-to-agent calls#14559
feat(bindu): A2A microservice adapter for agent-to-agent calls#14559raahulrahl wants to merge 4 commits into
Conversation
Adds an optional adapter that exposes Hermes' AIAgent as a Bindu A2A
microservice — same agent, same skills, same memory, new interface.
Where `hermes gateway` makes Hermes talk to humans on messaging
platforms, `hermes-bindu` makes it talk to other agents over the open
A2A JSON-RPC protocol with a cryptographic DID identity, OAuth2 auth,
and optional x402 micropayments.
Scope is deliberately small:
- New `bindu_adapter/` directory, ~200 lines of glue.
- New `[bindu]` extra in pyproject and `hermes-bindu` entry point.
- Short section in the top-level README pointing at the adapter's
own detailed README for the full story.
- `.bindu/` added to .gitignore (Bindu writes per-agent DID keys
and OAuth credentials there; never commit).
Nothing in existing install paths changes — base Hermes is untouched,
and the adapter only activates when a user opts in with
`pip install -e '.[bindu]'` and runs `hermes-bindu`.
Without this, `pip install -e '.[bindu]'` installs the [bindu] extra but setuptools skips the bindu_adapter package itself — the hermes-bindu console script then fails with `ModuleNotFoundError: No module named 'bindu_adapter'` on first invocation. Caught while testing the adapter end-to-end. Mirrors how acp_adapter is listed.
Compress from ~210 lines to ~110 for faster review. Lead with a "Verified working" table showing both the no-auth and auth-on round-trip results, plus an abridged boot log excerpt so reviewers can see the full auth stack came up cleanly. Drops the longer explanatory prose from the value-prop section in favor of a crisper two-line "additive, not replacement" framing, since the top-level README already pitches the why.
Surface the Bindu source repo and its tagline up front so a reviewer skimming the adapter README lands on the project context immediately, without scrolling to the Links section. Also adds the docs URL to the bottom Links list for completeness.
|
Thanks @alt-glitch — useful pointer, I wasn't tracking #4135 or #11025 when I opened this. Landscape as I understand it now:
What's genuinely different here rather than overlapping:
Happy to retarget onto whichever A2A foundation lands first (this adapter would slot on top as an opt-in identity/auth/payments layer), or close if maintainers prefer a single-path solution. No strong opinion on the order — deferring to whatever direction you pick on #514. |
|
Thanks @raahulrahl — clean breakdown. Three genuinely different shapes in one frame:
A layered path that wastes nothing:
@teknium1 — happy to coordinate merge order if you want to sequence rather than pick one. |
|
Thanks @raahulrahl and @Ridwannurudeen for the detailed comparison — very helpful to see all three approaches side by side. Quick update on #11025: we've shipped a v2 since the original PR. The architecture has changed significantly. What changed: The original #11025 required patching Hermes gateway source code — modifying v2 is a hybrid plugin — 7 files dropped into The key addition is instant wake via webhook: when an A2A message arrives, the plugin POSTs an HMAC-signed webhook to Hermes' internal endpoint, triggering an immediate agent turn. The entire request → queue → webhook → agent processes → response cycle completes synchronously within the same HTTP call (120s timeout). No polling delay. Other improvements since the original PR:
Updated repo: https://github.com/iamagenius00/hermes-a2a (README rewritten to reflect v2) The session-injection design @Ridwannurudeen highlighted is still the core — A2A messages go into the agent's live session, not a clone. The difference is it no longer requires touching Hermes source to make that work. Re: @raahulrahl's DID/OAuth2/x402 — those are genuinely orthogonal features. Cryptographic identity and payment rails aren't something #11025 or #4135 attempt. Could see those layering on top of any of the three approaches. |
|
v2's plugin shape further reduces integration friction with #4135 — no gateway patches to coordinate around. One coordination point worth surfacing for @teknium1: Server-side, v2's plugin and #4135's The DID/OAuth2/x402 layer from #14559 attaches to either, agreed. |
|
Closing in favor of #41711, which consolidates the entire A2A protocol cluster into a single platform-adapter plugin with zero core edits. This pr contributed the bindu microservice-adapter direction. The 'same agent, new interface' framing informed the inbound adapter. DID/Ed25519 identity, OAuth2 scopes and x402 micropayments are noted as future scope in the new plugin's DESIGN.md rather than dropped. Thanks @raahulrahl! See #41711 — the PR body has a table tracing each requirement back to its source issue/PR. |
What this adds
An optional adapter that lets you run Hermes as an A2A (Agent-to-Agent) microservice. Where
hermes gatewaymakes Hermes talk to humans on Telegram/Discord/Slack/etc.,hermes-bindumakes it talk to other agents over the open A2A JSON-RPC protocol — with a cryptographic DID identity, OAuth2 auth, and optional x402 micropayments.Same agent, same skills, same memory, new interface. ~200 lines of glue.
Why would Hermes users want this?
Hermes is already excellent at the human-facing surface. What this unlocks is the other direction:
agent:read/agent:write/agent:executescopes.It's additive, not a replacement for the gateway. All three (
hermes,hermes gateway,hermes-bindu) can run against the same config and share skills, memory, tools, and context files.Scope I kept deliberately small
This touches five things, and only one of them isn't new:
bindu_adapter/(new)acp_adapter/pattern.pyproject.toml[bindu]extra andhermes-binduscript. Addedhermes-agent[bindu]to the[all]extra alongside[acp]..gitignore.bindu/— Bindu writes per-agent DID keys and OAuth creds there; never commit.README.mdbindu_adapter/README.md. I did not add ahermes bindusubcommand inhermes_cli/main.py— happy to in a follow-up if you want parity withhermes acp, but I wanted to keep this PR reviewable.hermes_cli/main.py,run_agent.py, anything inagent/Design choices worth calling out
pip install hermes-agentis unchanged. If a user runshermes-binduwithout installing the extra, they get a clean error pointing at the install command, not a stack trace.AIAgentper process. The handler keeps one long-livedAIAgentso the provider's prompt cache stays valid across A2A calls. Bindu is the source of truth for conversation history; Hermes owns the live model state.HERMES_BINDU_TIER. Defaults toread(web search + extract only).sandboxadds file + moa.fullexposes everything including terminal and code-exec — the adapter README calls out that you must never combinefullwith the public FRP tunnel.~/.hermes/.env. Same dotenv loading asrun_agent.pyso users don't maintain two env files. Adapter-specific knobs use theHERMES_BINDU_*prefix.What I tested
message/send→ polltasks/get→ DID-signed artifact returned with correct answer.OPENROUTER_API_KEY.python -m bindu_adapterandhermes-binduentry points both work.ImportErrorbranch prints the install hint.Things I'd love a reviewer to push back on
hermes bindube a subcommand now? I left it out to minimize the diff againsthermes_cli/main.py, but if you'd prefer parity withhermes acpin this PR I can add it — it's ~20 lines.bindu. I used>=0.3.18. Happy to tighten to~=0.3.18if you want stricter.hermes-agent.nousresearch.com/docsinstead of in-tree, happy to port it.Thanks for the review — excited to see Hermes on the A2A network.