Skip to main content

hermes-mesh

Agent-to-agent session relay for Hermes fleet agents.

Standard A2A is request/response — fine for one-shot jobs, inadequate for conversational fleet coordination. hermes-mesh adds session-preserving communication: when one agent dispatches to another, the recipient knows who asked, what they're responding to, and what action to take.

Tools

  • mesh_list — list all agents in the fleet mesh vault.
  • mesh_register — register or update an agent identity in the fleet mesh vault.
  • mesh_send — send a session-preserving message to another fleet agent.
Caller: mesh_send(agent="britney", message="Review this plan")
  │
  ├─ 1. Resolves Britney's identity from the fleet vault
  ├─ 2. Pads [mesh][from:linda][to:britney][id:uuid][action:do][reply:yes]
  ├─ 3. HMAC-SHA256 signs with the sender's own secret
  └─ 4. POSTs to Britney's mesh adapter endpoint

Britney's gateway receives the message on its mesh platform adapter, routes it into her active session, and she sees it as an inbound mesh trigger with full sender context.

mesh_send returns {"state": "completed", "status": "delivered", ...} on success, with message_id and task_id populated.

What it does NOT do

This plugin is a mesh layer, not a full A2A implementation. Standard A2A operations (discover, call, serve, JSON-RPC, Agent Cards) are handled by the hermes-agent-a2a plugin, which provides Google A2A 1.0 compliance. The upstream hermes-agent core does not provide A2A support.

Install

pip install hermes-mesh

Or from source:

git clone https://github.com/emiltsoi/hermes-mesh.git
cd hermes-mesh
pip install -e .

Configure

1. Enable the mesh platform adapter

Add hermes-mesh to plugins.enabled and enable the mesh platform in config.yaml:

plugins:
  enabled:
    - hermes-mesh

platforms:
  mesh:
    enabled: true
    extra:
      port: 8744
      secret: <mesh-adapter-hmac-secret>
      route: receive          # listens on /mesh/receive
      agent_name: agent0      # local agent name
      target_session: "telegram:dm:<chat_id>"  # optional session routing

Each agent's gateway should listen on its own mesh port. The default port is 8645.

2. Set up fleet identity

Each agent needs an identity in $HERMES_HOME/fleet/mesh/agents/<name>/identity.yaml (legacy fleet/a2a/agents is also checked, but hermes-mesh targets use the mesh adapter URL):

id: britney
name: britney
description: Principal SWE — Orchestrator
transports:
  hermes_webhook:
    protocol: hermes-webhook
    url: http://127.0.0.1:8745/mesh/receive
    auth:
      type: hmac-sha256
      secret: <britney-mesh-adapter-secret>

The hermes_webhook.url must point at the target agent's mesh adapter endpoint (/mesh/<route>). The hermes_webhook.auth.secret is the target's adapter secret; messages are signed with the sender's own secret for per-agent HMAC authentication.

3. Register local agents

You can also register identities at runtime:

mesh_register(name="britney", url="http://127.0.0.1:8745/mesh/receive", secret="...", role="agent")

4. Environment

export MESH_AGENT_NAME=linda            # Who the sender is
export MESH_WEBHOOK_DELIVERY_RETRIES=3  # Delivery retry count
export MESH_WEBHOOK_DELIVERY_BACKOFF=1  # Initial retry backoff in seconds
export MESH_WEBHOOK_DELIVERY_TIMEOUT=5  # Per-attempt timeout
export TELEGRAM_BOT_TOKEN=...           # For float delivery
export TELEGRAM_HOME_CHANNEL=...        # Where floats go

A2A_* names (A2A_AGENT_NAME, A2A_WEBHOOK_DELIVERY_RETRIES, etc.) are still accepted as fallbacks for backward compatibility.

CTA Protocol

Messages carry a 2D Call To Action in the header:

Field Values Meaning
action do Recipient should take action
info Informational — acknowledge
reply yes Sender expects a reply
no Fire-and-forget

Relationship to hermes-agent-a2a

hermes-mesh replaces the mesh functionality of the now-archived hermes-agent-a2a plugin. Standard A2A (discover, call, serve, Agent Cards, JSON-RPC, security) is provided by the hermes-agent-a2a plugin; the upstream hermes-agent core does not include A2A support.

The old plugin's a2a_send_session_message is the genesis of this project — a focused, dependency-light extraction of the only unique feature the old plugin had that the upstream standard doesn't cover.

License

MIT — see LICENSE.

Download files

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

Source Distribution

hermes_mesh-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

hermes_mesh-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file hermes_mesh-0.1.0.tar.gz.

File metadata

  • Download URL: hermes_mesh-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hermes_mesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7b0b6e96a90269529a3f2ff11b7cd07d4592d1ff63b39112960633a65d439a5d
MD5 85f2c045625774415ead6442338f321e
BLAKE2b-256 30d80c6a389c53a21038ad2dd37377ae0cd467d177cb2d7e767eadcef79b3d67

See more details on using hashes here.

File details

Details for the file hermes_mesh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hermes_mesh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hermes_mesh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a12794f206311ad5a8fe7eac23ce670b210d8e7e10ffcb52056ed40fa496aad0
MD5 e7ca2fc021243b4d6c4106bb8797c75c
BLAKE2b-256 5f31c9bbd42660d30dd8d4d68c4f661c2d8e318f53ec67d2a78b046da338332d

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