Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
simplify readme
  • Loading branch information
lordlinus authored Nov 10, 2024
1 parent 1bc8ac3 commit efe532d
Showing 1 changed file with 6 additions and 105 deletions.
111 changes: 6 additions & 105 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,103 +1,13 @@
# Travel Chatbot - Multi-Agent System

This repository contains a Python-based multi-agent travel chatbot designed to assist users with travel planning, booking flights, hotels, car rentals, and providing destination information. The system leverages a routing agent to direct user messages to the appropriate specialized agents and uses a group chat manager to coordinate complex tasks involving multiple agents.
Autogen core api based chatbot for planning trips, booking flights, hotels, car rentals, and providing destination information. The system routes user requests to specialized agents for a streamlined experience.

## Table of Contents
## Key Features

- [Introduction](#introduction)
- [Architecture Overview](#architecture-overview)
- [Components](#components)
- [Router Agent](#router-agent)
- [User Proxy Agent](#user-proxy-agent)
- [Travel Agents](#travel-agents)
- [Flight Agent](#flight-agent)
- [Hotel Agent](#hotel-agent)
- [Car Rental Agent](#car-rental-agent)
- [Activities Agent](#activities-agent)
- [Destination Agent](#destination-agent)
- [Group Chat Manager](#group-chat-manager)
- [Message Flow](#message-flow)
- [Usage](#usage)
- [Running the Application](#running-the-application)
- [Testing](#testing)
- [Dependencies](#dependencies)
- [Configuration](#configuration)
- [Directory Structure](#directory-structure)
- [Conclusion](#conclusion)

## Introduction

The Travel Chatbot is a conversational AI system that assists users in planning and booking their travel itineraries. It uses a multi-agent architecture where each agent specializes in a specific aspect of travel planning. The Router Agent directs user requests to the appropriate agents based on the intent, and the Group Chat Manager coordinates tasks that require multiple agents.

## Architecture Overview

The system is built using an event-driven architecture with the following key components:

- **Router Agent**: Determines the user's intent and routes messages to the appropriate agent(s).
- **User Proxy Agent**: Acts as an interface between the user and the system, handling WebSocket communication.
- **Travel Agents**: Specialized agents for handling flights, hotels, car rentals, activities, and destination information.
- **Group Chat Manager**: Coordinates complex tasks that involve multiple agents, compiling their responses into a cohesive plan.
- **Agent Runtime**: Manages the lifecycle and communication of all agents in the system.

The agents communicate through a messaging system, publishing and subscribing to topics relevant to their functions.

## Components

### Router Agent

- **File**: `backend/agents/travel_router.py`
- **Class**: `SemanticRouterAgent`
- **Function**: Analyzes user messages to determine intent and routes them to the appropriate agent(s). If multiple agents are required, it forwards the request to the Group Chat Manager to coordinate their responses.

### User Proxy Agent

- **File**: `backend/app.py`
- **Class**: `UserProxyAgent`
- **Function**: Manages WebSocket connections with the user, sending and receiving messages. Forwards user messages to the Router Agent and sends agent responses back to the user.

### Travel Agents

#### Default Agent

- **File**: `backend/agents/ext_agents.py`
- **Class**: `DefaultAgent`
- **Function**: Llama index based agent with Wikipedia Tool to help answer questions about the destination or any general information

#### Activities Agent

- **File**: `backend/agents/travel_activities.py`
- **Class**: `ActivitiesAgent`
- **Function**: Provides information on activities and tours in the destination city, utilizing Bing Custom Search to search for keywords and returs a structured output.

#### Car Rental Agent

- **File**: `backend/agents/travel_car.py`
- **Class**: `CarRentalAgent`
- **Function**: Manages car rental bookings, simulating rental options and reservations.

#### Destination Agent

- **File**: `backend/agents/travel_destination.py`
- **Class**: `DestinationAgent`
- **Function**: Supplies general information about the destination, such as weather, best time to visit, and local attractions. It uses the LLM capability to answer and gives out a structured output.

#### Flight Agent

- **File**: `backend/agents/travel_flight.py`
- **Class**: `FlightAgent`
- **Function**: Handles flight booking requests, simulating flight search and booking processes. Can hand off complex requests back to the Router Agent.

#### Hotel Agent

- **File**: `backend/agents/travel_hotel.py`
- **Class**: `HotelAgent`
- **Function**: Handles hotel booking requests, simulating hotel search and booking processes using tools like OpenAI models.

### Group Chat Manager

- **File**: `backend/agents/travel_group_chat.py`
- **Class**: `GroupChatManager`
- **Function**: Orchestrates tasks that require coordination between multiple agents, such as creating a comprehensive travel plan. Collects responses from individual agents and compiles them into a final plan presented to the user.
Router Agent: Determines user intent and routes messages.
User Proxy Agent: Manages WebSocket connections between users and agents.
Specialized Agents: Handles flights, hotels, car rentals, activities, and destination details.
Group Chat Manager: Coordinates responses from multiple agents to provide a comprehensive travel plan.

## Message Flow

Expand Down Expand Up @@ -176,11 +86,6 @@ The project uses several external libraries and services:
The application requires several environment variables to be set, which can be placed in a `.env` file in the `backend` directory:

```ini
# Cosmos DB Configuration
COSMOSDB_ENDPOINT=your-cosmosdb-endpoint
COSMOSDB_DATABASE=your-database-name
COSMOSDB_CONTAINER=your-container-name

# Azure OpenAI Configuration
AZURE_OPENAI_DEPLOYMENT_NAME=your-deployment-name
AZURE_OPENAI_API_VERSION=your-api-version
Expand All @@ -190,10 +95,6 @@ AZURE_OPENAI_API_KEY=your-openai-api-key
# Bing Custom Search
BING_CUSTOM_CONFIG_ID=your-bing-config-id
BING_CUSTOM_SEARCH_KEY=your-bing-search-key

# Development Settings
DEV_BYPASS_AUTH=true
VISITOR_PASSWORD=your-visitor-password
```

## Directory Structure
Expand Down

0 comments on commit efe532d

Please sign in to comment.