Skip to content

feat: add A2A protocol channel for agent-to-agent communication#444

Closed
zeroasterisk wants to merge 1 commit into
withastro:mainfrom
zeroasterisk:feat/a2a-channel
Closed

feat: add A2A protocol channel for agent-to-agent communication#444
zeroasterisk wants to merge 1 commit into
withastro:mainfrom
zeroasterisk:feat/a2a-channel

Conversation

@zeroasterisk

Copy link
Copy Markdown

Summary

Adds @flue/a2a — a channel adapter that makes any Flue agent speak the A2A (Agent-to-Agent) protocol for inter-agent discovery and messaging.

Why

The A2A protocol enables interoperability between AI agents across different frameworks. With this channel, Flue agents can be discovered and messaged by any A2A-compatible client — including agents built with ADK, LangChain, CrewAI, or other frameworks.

What it does

  • Agent Card: serves /.well-known/agent-card.json so other agents can discover this agent's capabilities
  • message/send: accepts A2A JSON-RPC messages and routes them to the Flue agent
  • Task lifecycle: tracks task state (submitted → working → completed/failed)
  • Skills: maps Flue skills to A2A skill descriptors

How to test

cd packages/a2a && npm install && npm start

# Discover
curl http://localhost:3000/.well-known/agent-card.json

# Send message
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"message/send","params":{"message":{"messageId":"1","role":"user","parts":[{"kind":"text","text":"Hello"}]}},"id":"1"}'

Files

  • packages/a2a/src/index.ts — Channel factory and HTTP server
  • packages/a2a/src/handlers.ts — A2A JSON-RPC method handlers
  • packages/a2a/src/types.ts — A2A protocol type definitions
  • packages/a2a/src/errors.ts — A2A error codes
  • packages/a2a/README.md — Usage docs

A2A Protocol

The A2A specification is governed by the Linux Foundation with 150+ supporting organizations. This implementation targets protocol version 1.0.

Adds @flue/a2a — a channel adapter that makes Flue agents speak the
A2A (Agent-to-Agent) protocol for inter-agent discovery and messaging.

Features:
- Agent Card serving at /.well-known/agent-card.json
- message/send JSON-RPC handler with task lifecycle
- Skill mapping from Flue skills to A2A descriptors
- protocolVersion 1.0 compliant

The A2A protocol (https://a2a-protocol.org/) enables interoperability
between AI agents across different frameworks and platforms. This
channel lets any Flue agent participate in A2A ecosystems.
@astrobot-houston

Copy link
Copy Markdown

Thanks for the contribution! We're closing this PR and moving the conversation to the existing thread: #285

We've moved to a model where bugs and feature proposals are discussed in issues/discussions before code review, so the community can help prioritize and shape the work. Your branch is linked from the new thread so the implementation isn't lost — please join us there to continue the conversation.

— astrobot 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants