Python: add agent-framework-hosting-a2a channel (#6306)

* feat(python): add agent-framework-hosting-a2a channel

Add a hosting channel that exposes the host target (agent or workflow)
as a peer agent over the Agent-to-Agent (A2A) protocol (JSON-RPC plus a
served agent card). Requests are handled by a host-routed
HostAgentExecutor that drives the host pipeline (ChannelContext.run/
run_stream) instead of wrapping the target directly, so sessions,
linking, and run/response hooks apply. Maps the A2A conversation/context
id to a ChannelSession isolation key and the caller to a ChannelIdentity;
streaming emits incremental task artifacts.

Includes tests, README, and workspace registration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address A2A hosting channel review feedback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Eduard van Valkenburg
2026-06-12 12:20:54 +02:00
committed by GitHub
Unverified
parent 36ce0950e4
commit 5534198142
9 changed files with 853 additions and 0 deletions
+23
View File
@@ -48,6 +48,7 @@ members = [
"agent-framework-gemini",
"agent-framework-github-copilot",
"agent-framework-hosting",
"agent-framework-hosting-a2a",
"agent-framework-hosting-activity-protocol",
"agent-framework-hosting-discord",
"agent-framework-hosting-invocations",
@@ -647,6 +648,28 @@ provides-extras = ["serve", "disk"]
[package.metadata.requires-dev]
dev = [{ name = "httpx", specifier = ">=0.28.1" }]
[[package]]
name = "agent-framework-hosting-a2a"
version = "1.0.0a260424"
source = { editable = "packages/hosting-a2a" }
dependencies = [
{ name = "a2a-sdk", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "agent-framework-hosting", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
{ name = "starlette", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
]
[package.metadata]
requires-dist = [
{ name = "a2a-sdk", specifier = ">=1.0.0,<2" },
{ name = "agent-framework-core", editable = "packages/core" },
{ name = "agent-framework-hosting", editable = "packages/hosting" },
{ name = "starlette", specifier = ">=0.37" },
]
[package.metadata.requires-dev]
dev = []
[[package]]
name = "agent-framework-hosting-activity-protocol"
version = "1.0.0a260424"