Skip to content

Python: Fix stale agent.json reference in A2A sample docstring - #7281

Merged
eavanvalkenburg merged 2 commits into
microsoft:mainfrom
amit12cool:fix/a2a-agent-card-url
Jul 23, 2026
Merged

Python: Fix stale agent.json reference in A2A sample docstring#7281
eavanvalkenburg merged 2 commits into
microsoft:mainfrom
amit12cool:fix/a2a-agent-card-url

Conversation

@amit12cool

@amit12cool amit12cool commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Motivation & Context

The A2A hosting sample used /.well-known/agent.json in three places, but the
correct A2A specification path is /.well-known/agent-card.json. These stale
references made the sample broken and misleading out of the box.

Description & Review Guide

  • What are the major changes?
    • python/samples/04-hosting/a2a/a2a_server.http: corrected the agent card
      GET endpoint for all three agents (hostInvoice, hostPolicy,
      hostLogistics) from /.well-known/agent.json to
      /.well-known/agent-card.json.
    • python/samples/04-hosting/a2a/a2a_server.py: corrected the module
      docstring and the startup print statement that both referenced the old
      /.well-known/agent.json path.
  • What is the impact of these changes?
    Running the A2A sample now works end-to-end: agent card discovery GET
    requests succeed, and the URL printed to the console on startup matches the
    actual endpoint.
  • What do you want reviewers to focus on?
    Confirm no other files in the sample still reference the old agent.json path.

Related Issue

Fixes #7286

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI review requested due to automatic review settings July 23, 2026 09:24
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 09:24 — with GitHub Actions Inactive
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 09:24 — with GitHub Actions Inactive
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 09:24 — with GitHub Actions Inactive
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Jul 23, 2026
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 09:25 — with GitHub Actions Inactive

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.

Pull request overview

Updates the Python A2A hosting sample to consistently reference the current AgentCard endpoint (/.well-known/agent-card.json) instead of the stale /.well-known/agent.json path.

Changes:

  • Updated the A2A server sample’s top-of-file documentation string to reference /.well-known/agent-card.json.
  • Updated the sample’s startup console output to print the agent-card.json endpoint.
  • Updated the accompanying .http sample requests to query /.well-known/agent-card.json.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
python/samples/04-hosting/a2a/a2a_server.py Aligns in-file docs and the startup “Agent card” URL with the agent-card.json endpoint.
python/samples/04-hosting/a2a/a2a_server.http Aligns sample HTTP requests with the agent-card.json endpoint.

Comment thread python/samples/04-hosting/a2a/a2a_server.py
@amit12cool
amit12cool force-pushed the fix/a2a-agent-card-url branch from a8a1d70 to bf2b740 Compare July 23, 2026 11:13
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 11:13 — with GitHub Actions Inactive
@amit12cool
amit12cool temporarily deployed to github-app-auth July 23, 2026 11:13 — with GitHub Actions Inactive
@eavanvalkenburg
eavanvalkenburg added this pull request to the merge queue Jul 23, 2026
Merged via the queue into microsoft:main with commit 59b9792 Jul 23, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: A2A sample uses stale /.well-known/agent.json instead of /.well-known/agent-card.json

4 participants