This directory contains a sample implementation of a Foundry Agent SDK Agent-to-Agent (A2A) client and agent server.
agent.py: Contains the implementation of the Foundry Agent SDK agent and its executor.aqgent_executor.py: Contains the implementation of the executor that processes incoming messages and generates responses.client.py: Contains the implementation of the A2A client that communicates with the Foundry Agent SDK agent.
- Ensure you have Python 3.13 or higher installed.
- Install UVicorn on Windows for running the agent server:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - If on macOS or Linux, you can install UVicorn using curl:
curl -LsSf https://astral.sh/uv/install.sh | sh - Install the required dependencies using pip:
uv sync
For information on installing uv, see the UV Installation Guide
- Start the Foundry Agent SDK agent server.
- Run the A2A client to send a message to the agent and receive the response.
To start the agent server, run the following command in the terminal:
uv run .To run the A2A client, execute the following command in a separate terminal:
uv run client.py