Skip to content

Add Support for Agent-to-Agent Communication #5

@ravediamond

Description

Problem

The current Agent Protocol specification focuses solely on human-agent interactions through threads and runs. But I think many applications will require many specialized agents working together. Currently, there's no specified way for:

  • Agents to discover other agents and their capabilities
  • Agents to communicate directly with each other
  • Coordinating work between multiple agents
  • Delegating tasks between agents
  • Sharing context and knowledge between agents

Proposed Solution

Add new endpoints that enable agent discovery and communication:

# Agent Registry
GET /agents
Response:
{
  "agents": [{
    "id": "agent-123",
    "name": "Research Assistant",
    "capabilities": {
      "tasks": ["research", "summarize"],
      "input_types": ["text", "pdf"],
      "output_types": ["text", "json"]
    },
    "status": "active"
  }]
}

# Agent Communication
POST /threads/{thread_id}/messages
{
  "from_agent": "agent_id",
  "to_agent": "agent_id",
  "content": {},
  "type": "request|response"
}

# Agent Task Delegation
POST /threads/{thread_id}/delegate
{
  "delegate_to": "agent_id",
  "permissions": ["read", "write", "execute"],
  "task": {
    "type": "task_type",
    "input": {},
    "constraints": {}
  }
}

# Agent Shared State Creation 
POST /threads/{thread_id}/shared_state
{
  "namespace": "shared_namespace",
  "access": ["agent_id1", "agent_id2"],
  "state": {}
}


This solution would provide:

  1. A registry where agents can publish their capabilities and discover others
  2. Standard message formats for agent-to-agent communication. I think this would need a specific format optimized for agent-to-agent communication.
  3. Integration with existing thread model for conversation history

What do you think ?

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