Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonykipkemboi/trip_planner_agent
CrewAI agents that can plan your vacation.
https://github.com/tonykipkemboi/trip_planner_agent
crewai llm llms open-source openai python
Last synced: 2 months ago
JSON representation
CrewAI agents that can plan your vacation.
- Host: GitHub
- URL: https://github.com/tonykipkemboi/trip_planner_agent
- Owner: tonykipkemboi
- License: mit
- Created: 2024-01-16T09:09:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-19T15:04:05.000Z (8 months ago)
- Last Synced: 2024-11-30T07:14:27.105Z (2 months ago)
- Topics: crewai, llm, llms, open-source, openai, python
- Language: Python
- Homepage:
- Size: 10.4 MB
- Stars: 99
- Watchers: 3
- Forks: 50
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - tonykipkemboi/trip_planner_agent - CrewAI agents that can plan your vacation. (Python)
- awesome_ai_agents - VacAIgent - VacAIgent is a Streamlit-integrated, CrewAI framework-based AI application (Trip Planner Agent) that automates and enhances trip planning through a user-friendly interface, demonstrating collaborative AI agent task execution and offering an interactive web app experience for tailoring travel plans [github](https://github.com/tonykipkemboi/trip_planner_agent) (Learning / Repositories)
README
# 🏖️ VacAIgent: Streamlit-Integrated AI Crew for Trip Planning
_Forked and enhanced from the_ [_crewAI examples repository_](https://github.com/joaomdmoura/crewAI-examples/tree/main/trip_planner)
![Beach Vacation Scene ~ generated by GPT-4V](images/beach.png)
## Introduction
VacAIgent leverages the CrewAI framework to automate and enhance the trip planning experience, integrating a user-friendly Streamlit interface. This project demonstrates how autonomous AI agents can collaborate and execute complex tasks efficiently, now with an added layer of interactivity and accessibility through Streamlit.
**Check out the video below for code walkthrough** 👇
(_Trip example originally developed by [@joaomdmoura](https://x.com/joaomdmoura)_)
## CrewAI Framework
CrewAI simplifies the orchestration of role-playing AI agents. In VacAIgent, these agents collaboratively decide on cities and craft a complete itinerary for your trip based on specified preferences, all accessible via a streamlined Streamlit user interface.
## Streamlit Interface
The introduction of [Streamlit](https://streamlit.io/) transforms this application into an interactive web app, allowing users to easily input their preferences and receive tailored travel plans.
## Running the Application
To experience the VacAIgent app:
- **Configure Environment**: Set up the environment variables for [Browseless](https://www.browserless.io/), [Serper](https://serper.dev/), and [OpenAI](https://openai.com/). Use the `secrets.example` as a guide to add your keys then move that file (`secrets.toml`) to `.streamlit/secrets.toml`.
- **Install Dependencies**: Execute `pip install -r requirements.txt` in your terminal.
- **Launch the App**: Run `streamlit run streamlit_app.py` to start the Streamlit interface.★ **Disclaimer**: The application uses GPT-4 by default. Ensure you have access to OpenAI's API and be aware of the associated costs.
## Details & Explanation
- **Streamlit UI**: The Streamlit interface is implemented in `streamlit_app.py`, where users can input their trip details.
- **Components**:
- `./trip_tasks.py`: Contains task prompts for the agents.
- `./trip_agents.py`: Manages the creation of agents.
- `./tools directory`: Houses tool classes used by agents.
- `./streamlit_app.py`: The heart of the Streamlit app.## Using GPT 3.5
To switch from GPT-4 to GPT-3.5, pass the llm argument in the agent constructor:
```python
from langchain.chat_models import ChatOpenAIllm = ChatOpenAI(model='gpt-3.5-turbo') # Loading gpt-3.5-turbo (see more OpenAI models at https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4)
class TripAgents:
# ... existing methodsdef local_expert(self):
return Agent(
role='Local Expert',
goal='Provide insights about the selected city',
tools=[SearchTools.search_internet, BrowserTools.scrape_and_summarize_website],
llm=llm,
verbose=True
)```
## Using Local Models with Ollama
For enhanced privacy and customization, you can integrate local models like Ollama:
### Setting Up Ollama
- **Installation**: Follow Ollama's guide for installation.
- **Configuration**: Customize the model as per your requirements.### Integrating Ollama with CrewAI
Pass the Ollama model to agents in the CrewAI framework:
```python
from langchain.llms import Ollamaollama_model = Ollama(model="agent")
class TripAgents:
# ... existing methodsdef local_expert(self):
return Agent(
role='Local Expert',
tools=[SearchTools.search_internet, BrowserTools.scrape_and_summarize_website],
llm=ollama_model,
verbose=True
)```
## Benefits of Local Models
- **Privacy**: Process sensitive data in-house.
- **Customization**: Tailor models to fit specific needs.
- **Performance**: Potentially faster responses with on-premises models.## License
VacAIgent is open-sourced under the MIT License.