Skip to content

sing1ee/a2a-python-currency

Repository files navigation

A2A Python Currency Agent

This repository contains a tutorial for implementing a Currency Agent using the A2A Python SDK.

Available Languages

Overview

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.

Features

  • Real-time currency conversion
  • Exchange rate queries
  • Multi-language support
  • Streaming response capability
  • Error handling
  • Comprehensive testing

Requirements

  • uv 0.7.2
  • Python 3.13+
  • OpenAI/OpenRouter API key

Quick Start

  1. Clone the repository:
git clone https://github.com/sing1ee/a2a-python-currency.git
cd a2a-python-currency
  1. Create and activate virtual environment:
uv venv
source .venv/bin/activate
  1. Install dependencies:
uv add a2a-sdk uvicorn dotenv click
  1. Set up environment variables:
echo OPENROUTER_API_KEY=your_api_key >> .env
echo OPENROUTER_BASE_URL=your_base_url >> .env
  1. Run the server:
uv run python main.py
  1. Run the client:
uv run python test_client.py

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Implementing CurrencyAgent with A2A Python SDK

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages