Let's build a multi-agent best flight finder app, step-by-step (100% local):
Before we begin, here's a quick demo of what we're building!
You will learn:
- @CrewAIInc for multi-agent orchestration
- @BrowserbaseHQ's headless browser tool
- @Ollama to locally server DeepSeek-R1
Let's go! π
You will learn:
- @CrewAIInc for multi-agent orchestration
- @BrowserbaseHQ's headless browser tool
- @Ollama to locally server DeepSeek-R1
Let's go! π
VIDEO
Here's an overview of what the app does:
β Parse the query (SF to New York on 21st September) to create a Kayak search URL
β Visit the URL and extract top 5 flights
β For each flight, go to the details to find available airlines
β Summarize flight info
Now let's jump into code!
β Parse the query (SF to New York on 21st September) to create a Kayak search URL
β Visit the URL and extract top 5 flights
β For each flight, go to the details to find available airlines
β Summarize flight info
Now let's jump into code!
1οΈβ£ Define LLM
CrewAI nicely integrates with all the popular LLMs and providers out there!
Here's how you set up a local DeepSeek using Ollama:
CrewAI nicely integrates with all the popular LLMs and providers out there!
Here's how you set up a local DeepSeek using Ollama:

2οΈβ£ Flight Search Agent
This agent mimics a real human searching for flights by browsing the web.
It's powered by @browserbasehq's headless-browser tool and can look up flights on sites like Kayak!
Check this outπ
This agent mimics a real human searching for flights by browsing the web.
It's powered by @browserbasehq's headless-browser tool and can look up flights on sites like Kayak!
Check this outπ

3οΈβ£ Summarisation Agent
After retrieving the flight details, we need a concise summary of all available options.
This is where our Summarization Agent steps in to make sense of the results for easy reading.
Check this outπ
After retrieving the flight details, we need a concise summary of all available options.
This is where our Summarization Agent steps in to make sense of the results for easy reading.
Check this outπ

Now that we have both our agents ready, it's time to understand the tools powering them.
1. Kayak tool
2. Browserbase tool
Let's write their code one-by-one.
1. Kayak tool
2. Browserbase tool
Let's write their code one-by-one.

4οΈβ£ Kayak tool
A customΒ KayakΒ tool to translate the user input into a validΒ Kayak search URL.
(FYI Kayak is a popular fight and hotel booking)
A customΒ KayakΒ tool to translate the user input into a validΒ Kayak search URL.
(FYI Kayak is a popular fight and hotel booking)

5οΈβ£ Browserbase Tool
The flight search agent uses the Browserbase tool to simulate human browsing and gather flight data.
To be precise it automatically navigates Kayak website and interact with the web page.
Check this outπ
The flight search agent uses the Browserbase tool to simulate human browsing and gather flight data.
To be precise it automatically navigates Kayak website and interact with the web page.
Check this outπ

6οΈβ£ Setup Crew
Once the agents and tools are defined, we orchestrate them using @CrewAIInc.
Define their tasks, sequence their actions, and watch them collaborate in real time!
Check this outπ
Once the agents and tools are defined, we orchestrate them using @CrewAIInc.
Define their tasks, sequence their actions, and watch them collaborate in real time!
Check this outπ

7οΈβ£ Kickoff and results
Finally, we feed the userβs request (departure city, arrival city, travel dates) into the Crew and let it run! π
Check this outπ
Finally, we feed the userβs request (departure city, arrival city, travel dates) into the Crew and let it run! π
Check this outπ

Streamlit UI
To make this accessible, we wrapped the entire system in a @Streamlit interface.
Itβs a simple chat-like UI where you enter your flight details and see the results in real time!
Check this outπ
To make this accessible, we wrapped the entire system in a @Streamlit interface.
Itβs a simple chat-like UI where you enter your flight details and see the results in real time!
Check this outπ

I used @LightningAI β‘οΈ Studio for developing this application!
You will find all the code & everything you need to run it! β¨
Clone a FREE studio now & take it for a spin...π
lightning.ai/akshay-ddods/sβ¦
You will find all the code & everything you need to run it! β¨
Clone a FREE studio now & take it for a spin...π
lightning.ai/akshay-ddods/sβ¦
That's a wrap!
If you're interested in:
- LLMs π§
- AI Agents π€
- ML/AI Engineering βοΈ
Find me βΒ @akshay_pachaarΒ βοΈ
Everyday, I share tutorials on above topics!
If you're interested in:
- LLMs π§
- AI Agents π€
- ML/AI Engineering βοΈ
Find me βΒ @akshay_pachaarΒ βοΈ
Everyday, I share tutorials on above topics!
Generated by Thread Navigator
Press β + S to quick-export
