✨ Visual Editor

close

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135Β°

style Card Style

40px
16px

text_fields Typography

16px
Akshay πŸš€
@akshay_pachaar
Let's build a multi-agent best flight finder app, step-by-step (100% local):
Akshay πŸš€
@akshay_pachaar
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! πŸš€
Video thumbnail
VIDEO
Akshay πŸš€
@akshay_pachaar
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!
Akshay πŸš€
@akshay_pachaar
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:
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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.
Thread image
Akshay πŸš€
@akshay_pachaar
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)
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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πŸ‘‡
Thread image
Akshay πŸš€
@akshay_pachaar
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…
Akshay πŸš€
@akshay_pachaar
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!
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export