Exposing an AI agent using the A2A protocol > Overview > Step 2. Set up the adapter
  

Step 2. Set up the adapter

To set up and run the adapter, create and activate a Python virtual environment and install the appropriate dependencies.
Before you create the Python virtual environment, ensure that the host machine has Python 3.10 or greater and pip installed.
    1Run the following command to create a Python virtual environment:
    python -m venv venv
    2Run one of the following commands to activate the virtual environment:
    3Run the following command to install the Python dependencies:
    pip install -r requirements.txt
    This command installs the libraries listed in the requirements.txt file. You only need to do this once for each environment you create.