Skip to content

feat: add experimental A2A server (simple profile) and sample - #209

Open
Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 1 commit into
tsuyoshiushio-a2a-frd-and-designfrom
tsuyoshiushio-p3-working-a2a-sample
Open

Tsuyoshi Ushio (TsuyoshiUshio) wants to merge 1 commit into
tsuyoshiushio-a2a-frd-and-designfrom
tsuyoshiushio-p3-working-a2a-sample

Conversation

@TsuyoshiUshio

@TsuyoshiUshio Tsuyoshi Ushio (TsuyoshiUshio) commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implement the experimental A2A server simple profile from FRD 0009 (#208). Add a runnable sample.

  • Opt-in typed config: builtin_endpoints.a2a with mode: simple and an explicit url.
  • Per-agent Agent Card (/agents/{name}/.well-known/agent-card.json) and A2A 1.0 JSON-RPC route (/agents/{name}/a2a).
  • Only non-streaming SendMessage with user text parts. The response is one direct agent Message.
  • Uses the public MAF agent-framework-hosting-a2a conversion and the A2A SDK request handler. Reuses the existing HTTP auth, non-streaming runner, workflow bindings, and runtime sessions.
  • Fixed limits for request size, parts, text, response size, and in-flight requests per agent.
  • Rejects Tasks, streaming, subscribe/cancel, push notifications, REST, non-text parts, and wire versions other than 1.0.
  • docs/design/a2a-server.md describes the design of this PR. Future scope is listed as planned work only.

Sample

samples/a2a-incident-triage has a server and two clients: a MAF A2AAgent client (client.py) and a raw JSON-RPC client (raw_client.py). The client runs in a separate environment, because it needs MAF core 1.15+. The server stays on core 1.13. See the sample README.

Local runs need Azure Functions Core Tools 4.14 or later (see #211).

Dependencies

New [a2a] extra: agent-framework-hosting-a2a==1.0.0a260730, agent-framework-hosting==1.0.0a260730, a2a-sdk[http-server]==1.1.2. Existing pins do not change.

Validation

  • ruff, mypy, and generate_config_reference.py --check are clean.
  • Unit tests: 1,342 passed.
  • Local Functions host test with client.py and raw_client.py passed.

Stack

Base: #208 (FRD only).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical request-size enforcement and several moderate correctness and validation issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds an experimental P3 A2A 1.0 non-streaming server with authenticated routes, typed configuration, isolated client tooling, tests, and documentation.

Changes:

  • Adds A2A registration, validation, authentication, limits, and JSON-RPC handling.
  • Adds incident-triage samples and real-host interoperability coverage.
  • Adds optional dependencies, CI validation, and generated documentation.

Open findings:

  • Critical: Request bodies are fully buffered before the advertised size limit is enforced.
  • Moderate: E2E setup omits the server A2A extra; malformed ports and trailing-slash URLs are accepted; cached Agent Cards are mutated per request.
  • Nit: Front-matter documentation incorrectly requires explicitly specifying mode.
File Description
tests/​test_registration_endpoints.py Optional dependency guidance tests
tests/​test_registration_auth.py A2A authorization scope tests
tests/​test_registration_a2a.py Protocol, card, route, and limit tests
tests/​test_config_validation.py A2A URL validation tests
tests/​test_config_schema.py A2A schema tests
tests/​test_config_merge.py Configuration merge tests
tests/​test_config_fixtures.py A2A fixture coverage
tests/​test_app_routes.py Route and binding tests
tests/​fixtures/​config_scenarios/​20_a2a_simple/​main.agent.md Simple A2A configuration fixture
tests/​endtoend/​test_a2a.py Real-host interoperability test
tests/​endtoend/​apps/​a2a-simple/​requirements.txt E2E server dependencies
tests/​endtoend/​apps/​a2a-simple/​main.agent.md Deterministic agent configuration
tests/​endtoend/​apps/​a2a-simple/​host.json E2E host configuration
tests/​endtoend/​apps/​a2a-simple/​function_app.py Deterministic E2E application
src/​azure_functions_agents/​registration/​endpoints.py Optional A2A registration
src/​azure_functions_agents/​registration/​a2a.py A2A cards and JSON-RPC routes; request and card lifecycle findings
src/​azure_functions_agents/​registration/​_auth.py Scoped authorization support
src/​azure_functions_agents/​config/​validation.py Trusted URL validation; malformed port finding
src/​azure_functions_agents/​config/​schema.py Typed A2A configuration
src/​azure_functions_agents/​config/​merge.py A2A configuration merging
src/​azure_functions_agents/​config/​__init__.py Public configuration export
src/​azure_functions_agents/​app.py A2A endpoint discovery and registration
samples/​README.md Sample catalog update
samples/​a2a-incident-triage/​src/​requirements.txt Server sample dependencies
samples/​a2a-incident-triage/​src/​main.agent.md Sample agent configuration
samples/​a2a-incident-triage/​src/​local.settings.template.json Local settings template
samples/​a2a-incident-triage/​src/​host.json Sample host configuration
samples/​a2a-incident-triage/​src/​function_app.py Sample Function App
samples/​a2a-incident-triage/​src/​.funcignore Sample ignore rules
samples/​a2a-incident-triage/​requirements-client.txt Isolated client dependencies
samples/​a2a-incident-triage/​README.md Sample setup and usage
samples/​a2a-incident-triage/​raw_client.py Raw JSON-RPC client
samples/​a2a-incident-triage/​client.py MAF A2A client
README.md User-facing A2A documentation
pyproject.toml A2A dependency extras
eng/​templates/​jobs/​ci-tests.yml A2A wheel validation
eng/​scripts/​install_e2e_dependencies.py E2E dependency setup; missing server-extra finding
eng/​scripts/​generate_config_reference.py Generated reference support
docs/​index.md Documentation landing-page update
docs/​getting-started.md A2A onboarding guidance
docs/​front-matter-spec.md A2A authoring documentation; mode requirement nit
docs/​front-matter-reference.md Generated configuration reference
docs/​frds/​README.md FRD status update
docs/​frds/​0009-a2a-server.md P3 scope and decisions
docs/​design/​a2a-server.md A2A architecture
docs/​design/​a2a-implementation-plan.md Implementation sequencing
docs/​architecture.md Runtime architecture updates
.gitignore Isolated E2E environment exclusion

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/azure_functions_agents/registration/a2a.py Outdated
Comment thread eng/scripts/install_e2e_dependencies.py
Comment thread docs/front-matter-spec.md
@TsuyoshiUshio
Tsuyoshi Ushio (TsuyoshiUshio) force-pushed the tsuyoshiushio-p3-working-a2a-sample branch from d504a3f to 550b8a3 Compare September 25, 2026 19:28
@TsuyoshiUshio Tsuyoshi Ushio (TsuyoshiUshio) changed the title feat: add working A2A server sample feat: add experimental A2A server (simple profile) and sample Sep 25, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TsuyoshiUshio
Tsuyoshi Ushio (TsuyoshiUshio) force-pushed the tsuyoshiushio-p3-working-a2a-sample branch from 550b8a3 to 663db8f Compare September 25, 2026 19:43
@TsuyoshiUshio
Tsuyoshi Ushio (TsuyoshiUshio) marked this pull request as ready for review September 25, 2026 19:44

This branch has not been deployed

No deployments
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