File tree Expand file tree Collapse file tree
samples/python/agents/helloworld Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,24 +13,34 @@ The sample codebase is structured around three core components.
1313## Prerequisites
1414
1515- ** Python** : Version 3.10 or higher.
16- - ** Package Manager** : Install [ uv] ( https://github.com/astral-sh/uv ) for dependency management and execution.
1716
1817## Quick Start
1918
20- 1 . ** Start the Server**
19+ 1 . ** Set up a Virtual Environment and Install Dependencies**
20+
21+ Create and activate a virtual environment, then install the required packages:
22+
23+ ``` bash
24+ python -m venv .venv
25+ source .venv/bin/activate
26+ pip install -r requirements.txt
27+ ```
28+
29+ 2 . ** Start the Server**
2130
2231 Run the A2A agent server locally on port ` 9999 ` :
2332
2433 ``` bash
25- uv run .
34+ python __main__.py
2635 ```
2736
28- 2 . ** Run the Test Client**
37+ 3 . ** Run the Test Client**
2938
30- In a separate terminal, execute the test client to verify communication with the agent:
39+ In a separate terminal, activate the virtual environment and execute the test client to verify communication with the agent:
3140
3241 ``` bash
33- uv run test_client.py
42+ source .venv/bin/activate
43+ python test_client.py
3444 ```
3545
3646 ** Expected Output Snippet** :
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ dependencies = [
99 " dotenv>=0.9.9" ,
1010 " httpx>=0.28.1" ,
1111 " pydantic>=2.11.4" ,
12+ " pytest>=8.0.0" ,
1213 " python-dotenv>=1.1.0" ,
1314 " sse-starlette>=2.3.5" ,
1415 " starlette>=0.46.2" ,
Original file line number Diff line number Diff line change 1+ # This file was autogenerated by uv via the following command:
2+ # uv pip compile pyproject.toml -o requirements.txt
3+ a2a-sdk == 1.1.0
4+ # via helloworld (pyproject.toml)
5+ annotated-types == 0.7.0
6+ # via pydantic
7+ anyio == 4.14.0
8+ # via
9+ # httpx
10+ # sse-starlette
11+ # starlette
12+ certifi == 2026.6.17
13+ # via
14+ # httpcore
15+ # httpx
16+ # requests
17+ cffi == 2.0.0
18+ # via cryptography
19+ charset-normalizer == 3.4.7
20+ # via requests
21+ click == 8.4.1
22+ # via uvicorn
23+ cryptography == 49.0.0
24+ # via google-auth
25+ dotenv == 0.9.9
26+ # via helloworld (pyproject.toml)
27+ google-api-core == 2.31.0
28+ # via a2a-sdk
29+ google-auth == 2.55.0
30+ # via google-api-core
31+ googleapis-common-protos == 1.75.0
32+ # via
33+ # a2a-sdk
34+ # google-api-core
35+ h11 == 0.16.0
36+ # via
37+ # httpcore
38+ # uvicorn
39+ httpcore == 1.0.9
40+ # via httpx
41+ httpx == 0.28.1
42+ # via
43+ # helloworld (pyproject.toml)
44+ # a2a-sdk
45+ httpx-sse == 0.4.3
46+ # via a2a-sdk
47+ idna == 3.18
48+ # via
49+ # anyio
50+ # httpx
51+ # requests
52+ iniconfig == 2.3.0
53+ # via pytest
54+ json-rpc == 1.15.0
55+ # via a2a-sdk
56+ packaging == 26.2
57+ # via
58+ # a2a-sdk
59+ # pytest
60+ pluggy == 1.6.0
61+ # via pytest
62+ proto-plus == 1.28.0
63+ # via google-api-core
64+ protobuf == 6.33.6
65+ # via
66+ # a2a-sdk
67+ # google-api-core
68+ # googleapis-common-protos
69+ # proto-plus
70+ pyasn1 == 0.6.3
71+ # via pyasn1-modules
72+ pyasn1-modules == 0.4.2
73+ # via google-auth
74+ pycparser == 3.0
75+ # via cffi
76+ pydantic == 2.13.4
77+ # via
78+ # helloworld (pyproject.toml)
79+ # a2a-sdk
80+ pydantic-core == 2.46.4
81+ # via pydantic
82+ pygments == 2.20.0
83+ # via pytest
84+ pytest == 9.1.1
85+ # via helloworld (pyproject.toml)
86+ python-dotenv == 1.2.2
87+ # via
88+ # helloworld (pyproject.toml)
89+ # dotenv
90+ requests == 2.34.2
91+ # via google-api-core
92+ sse-starlette == 3.4.4
93+ # via helloworld (pyproject.toml)
94+ starlette == 1.3.1
95+ # via
96+ # helloworld (pyproject.toml)
97+ # sse-starlette
98+ typing-extensions == 4.15.0
99+ # via
100+ # pydantic
101+ # pydantic-core
102+ # typing-inspection
103+ typing-inspection == 0.4.2
104+ # via pydantic
105+ urllib3 == 2.7.0
106+ # via requests
107+ uvicorn == 0.49.0
108+ # via helloworld (pyproject.toml)
You can’t perform that action at this time.
0 commit comments