Skip to content

chore(signing-and-veryfing): python sample A2A 1.0.3 update#622

Open
Iwaniukooo11 wants to merge 5 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/signing-and-verifying-sample-update
Open

chore(signing-and-veryfing): python sample A2A 1.0.3 update#622
Iwaniukooo11 wants to merge 5 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/signing-and-verifying-sample-update

Conversation

@Iwaniukooo11

Copy link
Copy Markdown

Overview

This PR modernizes the signing_and_verifying Python sample, aligning it with the a2a-sdk v1.0.3 / v1.1.0 specifications. It also transitions the project from uv to standard pip and a pinned requirements.txt while removing unused database dependencies.


Key Changes

A2A SDK v1.0.3/v1.1.0 Migration

  • Starlette Direct Routing: Removed the legacy A2AStarletteApplication wrapper in __main__.py in favor of direct Starlette routing via create_agent_card_routes and create_jsonrpc_routes.
  • Asynchronous Signer Support: Wrapped the synchronous EC signer in async def helpers to satisfy the SDK's unconditional await constraint on card modifiers.
  • Unified Client: Replaced ClientFactory in test_client.py with the modern create_client helper.
  • Lean Execution Pipeline: Refactored agent_executor.py to enqueue a standard Message directly, preserving the original 1-line execution model and avoiding unnecessary task-state tracking overhead.

Dependency and Build Optimization

  • Database Dependency Removal: Removed the [sqlite] extra from a2a-sdk in pyproject.toml since the sample relies solely on InMemoryTaskStore. This successfully uninstalls sqlalchemy and aiosqlite.
  • Venv Transition: Replaced uv.lock with a clean, fully pinned requirements.txt.
  • Documentation: Updated README.md setup and execution steps to use standard virtualenv and pip commands.

Verification

End-to-end integration tests were executed successfully. The client successfully resolves the public card, downloads the public key-ring, verifies the signature, authenticates, and retrieves the verified extended agent card.

@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 signing and verifying agent sample to use standard Python virtual environments and pip instead of uv, refactors the server setup to use standard Starlette routes instead of A2AStarletteApplication, and updates the client initialization to use the unified create_client factory. The review feedback suggests improving code readability by adding type hints to the new asynchronous helper functions and using list unpacking to define the routes list more declaratively.

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.

Comment thread samples/python/agents/signing_and_verifying/__main__.py Outdated
Comment thread samples/python/agents/signing_and_verifying/__main__.py
@Iwaniukooo11 Iwaniukooo11 force-pushed the mateusziwaniuk/signing-and-verifying-sample-update branch from a06bea8 to c9fdac6 Compare June 23, 2026 09:29
@Iwaniukooo11 Iwaniukooo11 changed the title Mateusziwaniuk/signing and verifying sample update chore(signing-and-veryfing): python sample A2A 1.0.3 update Jun 30, 2026
@Iwaniukooo11 Iwaniukooo11 force-pushed the mateusziwaniuk/signing-and-verifying-sample-update branch from c9fdac6 to c2bd8e5 Compare June 30, 2026 09:15
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.

1 participant