Repository navigation
Align A2A client, hosting, and examples with .NET - #1268
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Task-mode handler paths can silently discard session persistence failures after emitting terminal success.
1 open finding
What changed in this PR
Aligns the A2A provider, hosting lifecycle, persistence, factories, and examples with the pinned .NET implementation.
Changes:
- Adds agent/card factories, run modes, session persistence, and isolation-scoped task storage.
- Refines conversion, metadata, streaming, continuation, and handler behavior.
- Updates A2A tests and examples for the revised APIs.
| File | Description |
|---|---|
provider/a2aprovider/taskstore.go |
Adds isolation-key task storage. |
provider/a2aprovider/taskstore_test.go |
Tests partitioning, pagination, and concurrency. |
provider/a2aprovider/task.go |
Adds task conversion helpers. |
provider/a2aprovider/sessionstore.go |
Adds persistent session-store abstraction. |
provider/a2aprovider/session.go |
Exposes stored task state. |
provider/a2aprovider/hosting_convert.go |
Filters and converts hosted output. |
provider/a2aprovider/hosting_convert_test.go |
Updates conversion coverage. |
provider/a2aprovider/handler.go |
Adds native handler and terminal-event handling. |
provider/a2aprovider/factory_test.go |
Tests card and resolver factories. |
provider/a2aprovider/executor.go |
Adds session persistence and run-mode execution. |
provider/a2aprovider/convert_test.go |
Expands task and content conversion tests. |
provider/a2aprovider/card.go |
Adds card-based agent factories. |
provider/a2aprovider/artifact_stream.go |
Revises streamed artifact identity. |
provider/a2aprovider/artifact_stream_test.go |
Updates artifact-ID expectations. |
provider/a2aprovider/agentrunmode.go |
Adds configurable response modes. |
provider/a2aprovider/a2a.go |
Revises client conversion and metadata handling. |
provider/a2aprovider/a2a_test.go |
Expands client behavior coverage. |
examples/05-end-to-end/a2a_client_server/README.md |
Documents the policy-client scenario. |
examples/05-end-to-end/a2a_client_server/a2a_server/main.go |
Hosts the policy agent over two transports. |
examples/05-end-to-end/a2a_client_server/a2a_client/main.go |
Uses direct discovery and shared sessions. |
examples/02-agents/providers/a2a/main.go |
Uses the resolver factory. |
examples/02-agents/a2a/stream_reconnection/main.go |
Reconnects after the first update. |
examples/02-agents/a2a/protocol_selection/main.go |
Uses factory transport selection. |
examples/02-agents/a2a/polling_for_task_completion/main.go |
Uses the card factory. |
examples/02-agents/a2a/as_function_tools/main.go |
Wraps the whole remote agent as one tool. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This comment has been minimized.
This comment has been minimized.
API consistency review
Changed Go contract
Upstream evidence reviewed
AssessmentThis PR is a parity-focused rewrite that introduces several new exported Go types/functions whose names, defaults, and behavior track existing .NET counterparts closely:
|

Summary
AgentRunModefactories, owned session persistence, and isolation-key-scoped native task storage.Parity Scope
Source and sample behavior were checked against
microsoft/agent-frameworkcommit0c9944cc9f577d51277ac7c55dbc388b60a577af(Agent Framework 1.22.0; A2A assemblies are preview).The branch is based on current
mainand contains only the A2A SDK, catalog, and example changes; earlier catalog-refactor commits are not included.Validation
Validated the exact publication tree on Windows ARM64 with Go 1.26.1 and Go 1.27.0:
agent,provider/a2aprovider, andtool/agenttoolunit suites.No cloud-backed E2E/replay suites, .NET test execution, benchmarks, or race runs were performed. Race execution is unsupported on the native Windows ARM64 toolchain. Temporary probes and build artifacts remain outside the repository.