Implement A2A protocol plugin for agent-to-agent communication #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements Agent-to-Agent (A2A) protocol support enabling BotSharp to communicate with remote agents through standardized interfaces, replacing direct HTTP calls with semantic routing and bidirectional async communication.
Implementation
Core Services
A2AClient: Manages remote agent invocations with async callback supportA2ACardResolver: Fetches and parses agent capability cards from remote endpointsAgentRegistry: Semantic agent discovery with natural language queries and confidence scoringIntegration
A2AAgentHook: Injects discovered A2A agents into routing pipeline at instruction load timeQueryAgentRegistryFnfor semantic search,InvokeA2AAgentFnfor remote invocationProtocol
/a2a/carddescribe capabilities and parameters/a2a/invokewith conversation contextUsage
Query registry semantically:
Invoke remote agent with async support:
Configuration
{ "AgentProtocol": { "EnableA2AClient": true, "RegistryEndpoint": "https://registry.example.com/api", "CallbackEndpoint": "https://botsharp.example.com/api/a2a/callback", "RemoteAgents": { "agent-id": "https://remote-agent.example.com" } } }Router automatically discovers and routes to A2A agents without code changes. Falls back to standard routing on failure.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.