Skip to content

A2A follow-up: adopt named-instance runtime for inter-agent sessions and per-instance identity #2883

@erosika

Description

@erosika

Context

PR #3999 adds profile-scoped Honcho identity with shared workspace and cross-profile observability, building on #3681 (profiles) and #4037 (config isolation).

The follow-up is A2A: making Hermes profiles communicate as distinct runtime peers -- both structured delegation and autonomous peer-to-peer conversation -- while sharing context through Honcho's workspace model.

What #3999 already provides

Primitive Status How it maps to A2A
Profile -> Honcho peer Done Each profile is a distinct AI peer (hermes.coder, hermes.researcher)
Shared workspace Done All profiles see the same user context, sessions, project history
Peer identity Done Each profile accumulates its own representation and conclusions
Cross-profile observability Done hermes honcho status --all, hermes honcho peers
Enable/disable per profile Done hermes honcho enable/disable
Eager peer creation Done Peer exists in Honcho at profile creation time

What's missing for A2A

1. Cross-profile delegation (structured)

delegate_task currently spawns child AIAgent instances in the same process. It doesn't know about profiles. A profile "researcher" should be able to delegate to profile "coder" as a distinct peer.

Minimal change: extend delegate_task to accept a profile target. The child agent runs with the target profile's HERMES_HOME, config, SOUL.md, and Honcho peer identity. The parent and child share a workspace so Honcho context flows naturally.

delegate_task(
    task="refactor the auth module",
    profile="coder",
)

2. Autonomous agent-to-agent conversation (organic)

Profiles should be able to initiate and sustain open-ended conversations with each other without user mediation. Not task delegation -- actual peer dialogue where both agents have agency over the conversation.

Use cases:

  • Two agents collaborating on a shared project (coder + researcher exploring an architecture)
  • Agents discussing the user's context (building a richer shared model, like Cosmania's multi-agent discussions)
  • Ambient agent-to-agent interaction (agents chatting for fun, discovering insights, serendipitous collaboration)
  • Demo-ready: visible conversations in the Discord/Telegram/Matrix channel where the user can watch and intervene

Transport options (lightest first):

  1. API server relay -- each profile already has an API server mode. One profile POSTs to another's endpoint. Lightest, process-isolated, already exists.
  2. Shared platform channel -- both profiles in the same Discord/Telegram thread. User-visible by default. Agents see each other's messages as incoming gateway events.
  3. Local message bus -- SQLite queue in shared HERMES_HOME. Background conversations the user doesn't see unless they check.

Conversation control:

  • Max turn limit per conversation (prevent infinite loops)
  • User can watch, interrupt, or join at any time
  • Conversations are logged to Honcho (both peers writing to the shared workspace)
  • Agent decides when to end the conversation (or hits the turn cap)

3. Inter-profile session model

When two profiles converse, what happens in Honcho?

4. Peer-to-peer context retrieval

A profile should be able to query what another profile knows. Already possible through Honcho's shared workspace -- hermes.coder can call dialectic_query targeting hermes.researcher's peer ID.

Minimal change: extend honcho_context tool to accept a --peer argument for targeting a specific profile's AI representation.

5. Addressing

Profiles are the canonical addressing model. hermes.coder is both the Honcho peer ID and the profile identifier. No separate registry needed -- hermes_cli.profiles.list_profiles() is the discovery mechanism, resolve_active_host() is the resolution mechanism.

Conversation visibility model

Mode Where it happens User sees it? Use case
Visible Shared platform channel (Discord thread, Telegram group) Yes, real-time Demo, collaboration, user can jump in
Background Local message bus or API relay On demand (hermes a2a log) Ambient processing, overnight tasks
Delegated Process-local (delegate_task --profile) Via task summary Structured work handoff

Scope

  • Extend delegate_task to support cross-profile targets
  • Add send_message target type profile:<name> for direct agent-to-agent messaging
  • Define inter-profile session boundaries in Honcho
  • Extend honcho_context for peer-to-peer context queries
  • Add conversation turn limits and user intervention hooks
  • Keep process-local for v1 (cross-network is a separate concern)

Open questions

  1. Should cross-profile delegation use the same per-directory session or create dedicated delegation sessions?
  2. Should the child agent inherit the parent's conversation history or start fresh with only the task description?
  3. How should Honcho attribute messages in a multi-peer session (both AI peers writing to the same session)?
  4. Should there be a hermes honcho ask <profile> <question> CLI shortcut for quick peer-to-peer queries?
  5. For visible conversations: should agents auto-create a thread/topic in the platform, or use an existing channel?
  6. What's the default turn limit for autonomous conversations? (Suggest: 10 turns, configurable)

Related

Suggested follow-up PRs

  1. feat(a2a): cross-profile delegation with shared Honcho context
  2. feat(a2a): autonomous agent-to-agent conversation via gateway channels
  3. feat(honcho): peer-to-peer context queries across profiles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions