Skip to content

Agent-to-agent direct messaging (A2X protocol) #5

@Dhwanil25

Description

@Dhwanil25

Overview

Currently agents run in parallel without direct communication — they only share context through the orchestrator and final synthesis. A2X (Agent-to-Agent Exchange) would let agents message each other mid-task to share intermediate findings, ask clarifying questions, or hand off work.

How it should work

  1. An agent can emit a structured message: { to: 'agent-id', type: 'query' | 'handoff' | 'share', content: '...' }
  2. The receiving agent gets the message prepended to its next prompt
  3. The canvas shows a live animated arrow between the two nodes when a message is sent

Benefits

  • Researcher can share a key finding with the Analyst before finishing its full output
  • Coder can ask the Reviewer a clarifying question mid-implementation
  • Planner can redirect a worker if the task scope changes

Architecture notes

  • multiAgentEngine.tsexecuteWorkers() runs workers concurrently via Promise.all; A2X would require a shared message bus (e.g. a Map<agentId, string[]>) polled between streaming chunks
  • Canvas already renders messages array — extend with type field to show different arrow styles

Related

  • Mentioned in README roadmap

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions