Skip to content

Feature Request: Support Agent-to-Agent (A2A) Multi-Agent Collaboration #7708

Description

@axzhcode

Feature Request: Agent-to-Agent (A2A) Multi-Agent Collaboration

Summary

Hermes should support native Agent-to-Agent (A2A) communication, where one agent can directly send tasks to another named agent, wait for results, and continue collaborating — similar to OpenClaw's multi-agent architecture. This enables real peer-to-peer multi-agent workflows, not just parent-to-child delegation.

Problem

Currently Hermes has two separate concepts that don't integrate well:

  1. Profiles (hermes profile create coder) — fully isolated agents with own SOUL.md, memory, skills, gateway, but they cannot communicate with each other
  2. delegate_task — creates temporary subagents for parallel work, but they share the parent's SOUL.md, memory, and personality (no real role specialization)

Neither approach supports true agent-to-agent collaboration where:

  • Agent A can discover and call Agent B by name
  • Agent B can respond, do work, and return results
  • Agents can have distinct personas, memories, and capabilities
  • Multiple agents can collaborate on a shared task in a peer-to-peer manner

Proposed Solution: A2A Protocol

Introduce an A2A protocol where agents can communicate as peers:

# Agent A (the coordinator) calls Agent B directly
a2a_send(
  target="finance",
  task="Analyze BYD stock valuation",
  context="User wants investment advice for EV sector",
  await_response=True  # blocking call, returns result
)

Or async:

task_id = a2a_send(
  target="researcher",
  task="Gather market data on EV sector",
  await_response=False  # fire and forget
)
result = a2a_await(task_id)  # later, get the result

Architecture Requirements

Session Key Changes:

# Current (hardcoded)
agent:main:{platform}:{chat_type}:{chat_id}

# Proposed (agent-aware)
agent:{agent_name}:{platform}:{chat_type}:{chat_id}

Agent Registry:
Agents register themselves to a shared registry so they can discover each other:

agents:
  finance:
    soul: agents/finance/SOUL.md
    memory_dir: agents/finance/memories/
    model: deepseek/deepseek-chat
    address: finance@localhost:3001
  researcher:
    soul: agents/researcher/SOUL.md
    memory_dir: agents/researcher/memories/
    model: xiaomi/mimo-v2-pro

Message Routing:

  • Platform binding — different chat accounts → different agents
  • Explicit mention — @finance 分析一下
  • Intent detection — auto-route by keywords

Existing Related Work

Why A2A vs Just delegate_task?

Aspect delegate_task A2A
Agent identity Temporary, anonymous Named, persistent
Communication Parent→child only Peer-to-peer
Memory isolation ❌ Shared ✅ Per-agent
SOUL.md isolation ❌ Shared ✅ Per-agent
Bidirectional ❌ No ✅ Yes
Long-running agents ❌ Ephemeral ✅ Persistent
Suitable for Parallel batch work Collaborative workflows

Priority

This is a blocker for multi-agent production use cases where agents need to collaborate as peers. An A2A protocol would unlock workflows like:

  • Coordinator agent breaking down tasks and dispatching to specialists
  • Specialist agents returning results and triggering follow-up tasks
  • Human-in-the-loop with agents consulting each other

Happy to participate in design discussion — feel free to tag me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions