This repository contains a tutorial for implementing a Currency Agent using the A2A Python SDK.
- 🇺🇸 English
- 🇪🇸 Spanish
- 🇮🇳 Hindi
- 🇸🇦 Arabic
- 🇩🇪 German
- 🇯🇵 Japanese
- 🇨🇳 Chinese (Simplified)
- 🇫🇷 French
- 🇵🇹 Portuguese
- 🇷🇺 Russian
This tutorial demonstrates how to create a Currency Agent using the official Google SDK a2a-python. The agent is designed to handle currency conversion requests and provide real-time exchange rate information.
- Real-time currency conversion
- Exchange rate queries
- Multi-language support
- Streaming response capability
- Error handling
- Comprehensive testing
- uv 0.7.2
- Python 3.13+
- OpenAI/OpenRouter API key
- Clone the repository:
git clone https://github.com/sing1ee/a2a-python-currency.git
cd a2a-python-currency
- Create and activate virtual environment:
uv venv
source .venv/bin/activate
- Install dependencies:
uv add a2a-sdk uvicorn dotenv click
- Set up environment variables:
echo OPENROUTER_API_KEY=your_api_key >> .env
echo OPENROUTER_BASE_URL=your_base_url >> .env
- Run the server:
uv run python main.py
- Run the client:
uv run python test_client.py
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.