Skip to content

harshgdev/squash-a2a

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SquashA2A

A multi-agent application demonstrating how to orchestrate conversations between different agents to schedule a squash game.

This application contains four agents:

  • Host Agent: The primary agent that orchestrates the scheduling task, built using Google ADK.
  • Kyle Agent: An agent representing Kyle's calendar and preferences, built using LangChain.
  • Mike Agent: An agent representing Mike's calendar and preferences, built using Google ADK.
  • Neel Agent: An agent representing Neel's calendar and preferences, built using CrewAI.

Available Tools

Here are the available tool functions for the Host Agent, along with a brief description of each:

  • list_court_availabilities(date): Retrieves the schedule for a specific date (YYYY-MM-DD), showing which hourly slots are "open," "booked," or "unknown."

  • find_next_available_slot(days_to_check): Scans the schedule starting from the current day to find the very next available 1-hour time slot.

  • book_squash_court(start_time, end_time, reservation_name): Books a court for a specific time range under a given name, provided the slot is currently open.

  • cancel_reservation(date, time, reservation_name): Cancels an existing reservation if the provided name matches the booking on file.

  • lookup_reservations_by_name(name): Searches the entire schedule for any future reservations held by a specific person.

  • get_weather(): Returns a random weather forecast for the court location (e.g., "Sunny," "Windy," "Rain") to help decide if play is possible.

  • get_facility_info(): Provides static details about the facility's amenities, such as court surface type, lighting availability, and gear rental options.

  • report_maintenance_issue(issue_type, description): Allows the user to log a maintenance ticket (e.g., for a broken net or slippery surface), returning a confirmation ticket ID.

Setup and Deployment

Prerequisites

Before running the application locally, ensure you have the following installed:

  1. uv: The Python package management tool used in this project. Follow the installation guide: https://docs.astral.sh/uv/getting-started/installation/
  2. python 3.12 Python 3.12 is required to run a2a-sdk
  3. set up .env

Create a .env file in the root of the directory containing the 4 agents directories with your Google API Key:

GOOGLE_API_KEY="your_api_key_here" 

Run the Agents

You will need to run each agent in a separate terminal window. The first time you run these commands, uv will create a virtual environment and install all necessary dependencies before starting the agent.

Terminals 1, 2 and 3: For agents other than the Host Agent

cd X_agent
uv venv
source .venv/bin/activate
uv run --active .

Terminal 4: Run Host Agent

cd host_agent
uv venv
source .venv/bin/activate
uv run --active adk web      

Interact with the Host Agent

Once all agents are running, open your browser and navigate to the ADK Web UI (usually http://127.0.0.1:8000).

You can now ask the Host Agent to perform complex tasks, such as:

  • "Find a time when Kyle, Mike, and Neel are free for squash day after tomorrow."

  • "Check the weather for the court on Friday."

  • "What kind of surface do the courts have?"

  • "Book a court for me next Tuesday at 5 PM."

About

A multi-agent application demonstrating how to orchestrate conversations between different agents to schedule a squash game.

Resources

Stars

Watchers

Forks

Contributors

Languages