Skip to content

chore(helloworld): python sample A2A 1.0.x update#621

Open
Iwaniukooo11 wants to merge 4 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/helloworld-python-sample-update
Open

chore(helloworld): python sample A2A 1.0.x update#621
Iwaniukooo11 wants to merge 4 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/helloworld-python-sample-update

Conversation

@Iwaniukooo11

@Iwaniukooo11 Iwaniukooo11 commented Jun 22, 2026

Copy link
Copy Markdown

Description

Migrates the helloworld python sample to align with the A2A SDK v1.0.x specifications, and updates dependency management from uv to standard pip and requirements.txt.

Changes

1. A2A v1.0.x API Migration

  • Modernized SDK Imports: Cleaned up legacy imports by routing them through the public SDK facade (a2a.types) instead of the private autogenerated protobuf module (a2a.types.a2a_pb2). This was applied to:
    • TaskState in agent_executor.py
    • Role, SendMessageRequest, and GetExtendedAgentCardRequest in test_client.py

2. Dependency Management Migration (uv to pip)

  • Added requirements.txt: Autogenerated and pinned all runtime dependencies to ensure identical installations.
  • **Deleted pyproject.toml
  • **Deleted uv.lock
  • Updated README.md: Replaced uv instructions with standard python virtual environment setup (python -m venv .venv) and pip installation steps.

Verification

Verified that:

  1. The virtual environment sets up cleanly via pip install -r requirements.txt.
  2. The server starts up successfully via python __main__.py.
  3. The interactive test client runs and connects successfully via python test_client.py.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the 'helloworld' Python agent sample to use a standard virtual environment and pip setup instead of the uv package manager in the README instructions. It also adds a requirements.txt file, adds pytest to the dependencies in pyproject.toml, and simplifies imports from a2a.types.a2a_pb2 to a2a.types in agent_executor.py and test_client.py. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@Iwaniukooo11 Iwaniukooo11 force-pushed the mateusziwaniuk/helloworld-python-sample-update branch from b447785 to 03f2775 Compare June 22, 2026 07:55

@sokoliva sokoliva Jun 29, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keep this to be consistent with the rest of the samples and a2aproject in which we have uv.lock present. Having uv.lock helps ensure users get a working environment by allowing for consistent and reproducible installations across machines.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's remove this, and stick to uv.lock. From Astral's Documentation: "In general, we recommend against using both a uv.lock and a requirements.txt file. The uv.lock format is more powerful and includes features that cannot be expressed in requirements.txt. If you find yourself exporting a uv.lock file, consider opening an issue to discuss your use case."

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove (discussed in other comments)


```bash
uv run .
python __main__.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Revert (discussed in other comments)

@sokoliva sokoliva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We follow the Conventional Commits specification for our commit messages and PR titles. Titles should be prefixed, one of the most popular prefixes are: fix:, feat:, chore:, ci:, docs:, style:, refactor:, perf:, test:.

For this PR title I propose the prefix chore:. Example: #566

@sokoliva sokoliva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Helloworld sample was updated quite recently so not many changes are needed. Let's keep the from a2a.types.a2a_pb2 -> from a2a.types change but revert the others.

@Iwaniukooo11 Iwaniukooo11 force-pushed the mateusziwaniuk/helloworld-python-sample-update branch from 03f2775 to 488b492 Compare June 30, 2026 09:06
@Iwaniukooo11 Iwaniukooo11 changed the title Mateusziwaniuk/helloworld python sample update chore: helloworld python sample A2A 1.0.3 update Jun 30, 2026
@Iwaniukooo11 Iwaniukooo11 changed the title chore: helloworld python sample A2A 1.0.3 update chore(helloworld): python sample A2A 1.0.3 update Jun 30, 2026

@msampathkumar msampathkumar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Discussed with the requester. More changes are in progress.

For time being we will move forward with-out uv. In future, we hope every sample follow simple requirement.txt file and also build a simple CICD system that checks and installs these requirements and uses pytest for automated tests

@Iwaniukooo11 Iwaniukooo11 changed the title chore(helloworld): python sample A2A 1.0.3 update chore(helloworld): python sample A2A 1.0.x update Jul 1, 2026
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.

3 participants