2. Set Up Your Environment
Prerequisites
- Python 3.10 or higher.
- Access to a terminal or command prompt.
- Git, for cloning the repository.
- A code editor (for example, Visual Studio Code) is recommended.
Clone the repository
If you have not already, clone the A2A samples repository:
git clone https://github.com/a2aproject/a2a-samples.git -b main --depth 1
cd a2a-samplesPython environment and SDK installation
Using a virtual environment is recommended for Python projects. The A2A Python SDK uses uv for dependency management, but you can use pip with venv as well.
1. Create and activate a virtual environment (using the standard library venv):
python -m venv .venv
source .venv/bin/activatepython -m venv .venv
.venv\Scripts\activate2. Install the A2A SDK and its required Python dependencies:
pip install -r samples/python/requirements.txtThis command installs the dependency list shipped with the
a2a-samples repository, not a package list this tutorial pins itself. As checked on 2026-11-01, the repository’s main was at commit 6603ba3f (2026-08-04), whose samples/python/requirements.txt pins a2a-sdk[http-server]>=0.3.0 and leaves uvicorn and python-dotenv unpinned; cloning main means the versions you actually get follow upstream and the latest PyPI releases. For a reproducible environment, check out that commit first (git checkout 6603ba3f) and then install.Verify installation
After installation, you should be able to import the a2a package in a Python interpreter:
python -c "import a2a; print('A2A SDK imported successfully')"If this command runs without error and prints the success message, your environment is set up correctly.
Next step
Continue with Agent Skills and Agent Card .