Content
# 🗓️ Meeting Prep Agent
<div align="center">
<img src="images/meeting-prep-agent.gif" alt="Tavily Chatbot Demo" width="600"/>
</div>
Download a full demo video by [clicking here](images/meeting-prep-agent.mp4)
## 👋 Welcome to the Tavily Meeting Prep Agent!
This repository demonstrates how to build a meeting preparation agent with real-time web access, leveraging Tavily's advanced search capabilities. This agent will connect to your Google Calendar via MCP, extract meeting information, and use Tavily search for profile research on the meeting attendees and general information on the companies you are meeting with.
The project is designed for easy customization and extension, allowing you to:
- Integrate proprietary or internal data sources
- Modify the agent architecture or swap out LLMs
---
## 🚀 Features
- 🌐 **Real-time Web Search:** Instantly fetches up-to-date information using Tavily's search API.
- 🧠 **Agentic Reasoning:** Combines MCP and ReAct agent flows for smarter, context-aware responses.
- 🔄 **Streaming Substeps:** See agentic reasoning and substeps streamed live for transparency.
- 🔗 **Citations:** All web search results are cited for easy verification.
- 🗓️ **Google Calendar Integration:** (via MCP) Access and analyze your meeting data.
- ⚡ **Async FastAPI Backend:** High-performance, async-ready backend for fast responses.
- 💻 **Modern React Frontend:** Interactive UI for dynamic user interactions.
- 📬 **Email Context (via iGPT):** Adds internal-only email context for meeting prep.
## System Diagram

---
## 📂 Repository Structure
- **Backend** ([`backend/`](./backend))
- [`agent.py`](./backend/agent.py): Agentic flow (MCP + LangChain-Tavily ReAct agent)
- **Frontend** ([`ui/`](./ui)): React-based UI for meeting insights
- **Server** ([`app.py`](./app.py)): FastAPI server for API endpoints and streaming
---
## 🛠️ Local Setup
**Python version:** 3.13.2 (local development)
### Google Calendar MCP Setup
See [google-calendar-mcp](https://github.com/nspady/google-calendar-mcp) for full details.
**Google Cloud Setup:**
1. Go to the Google Cloud Console and create/select a project.
2. Enable the Google Calendar API.
3. Create OAuth 2.0 credentials:
- Go to Credentials
- Click "Create Credentials" > "OAuth client ID"
- Choose "User data" for the type of data that the app will be accessing
- Add your app name and contact information
- Select "Desktop app" as the application type
4. Add your email as a test user under the OAuth Consent screen.
5. Create a file `gcp-oauth.keys.json` in the root of `google-calendar-mcp` directory.
5. Download your credentials and paste them in `gcp-oauth.keys.json`.
This file should look like:
```json
{
"installed": {
"client_id": "<your-client-id>",
"project_id": "<your-project-id>",
"auth_uri": "<your-auth-uri>",
"token_uri": "<your-token-uri>",
"auth_provider_x509_cert_url": "<your-auth-provider>",
"client_secret": "<your-secret>",
"redirect_uris": ["http://localhost"]
}
}
```
**Install the MCP:**
```bash
cd google-calendar-mcp
npm install
```
**Set config path:**
```bash
GOOGLE_CALENDAR_CONFIG=<absolute-path-to-project>/mcp-use-case/google-calendar-mcp/build/index.js
```
Run the notebook [`mcp-test.ipynb`](./notebooks/mcp-test.ipynb) to check that your MCP setup is working before proceeding.
### 📬 Extending with Email Context (Optional)
By default, the agent prepares a meeting brief using public web research on attendees and the companies you are meeting with.
To ground the briefing in your *real relationship* with meeting attendees, enable **iGPT**. iGPT retrieves **internal-only context** from your connected email and returns meeting-relevant internal context passed into the **LangGraph** flow.
#### What changes when iGPT is available?
A typical enriched brief may include:
- What was last discussed with each attendee (internal threads)
- Commitments made by either side (and what’s still pending)
- Open items / unresolved questions
#### How iGPT is used in this agent
The agent sends company and attendee information (derived from your Google Calendar events) to iGPT and asks it to retrieve relevant prior internal context.
Key rule enforced in the iGPT step:
- **Internal sources only** (no public web information)
#### Setup using the iGPT Playground (recommended for demos)
You need two things:
1) **`IGPT_API_KEY`** (created in the Hub)
2) **`IGPT_USER`** (the `user` value you choose inside the Playground)
#### 1) Create an API key
- Go to: https://igpt.ai/hub/apikeys/
- Create a new key (treat this as a secret - do not share it)
#### 2) Connect your inbox (one-time per user)
You can still connect your email through the Playground, even if you don’t have an iGPT app yet.
1. Open the Playground:
- https://igpt.ai/hub/playground/
2. Go to **Connect Datasource**
3. Choose a **`user`** value (this is your end-user identifier)
- Example for a demo: `demo_user`
4. Submit the request - the Playground will return an **OAuth link**
5. Click the OAuth link and complete the login/consent
6. Indexing will start for that `user`
✅ Important: The `user` value you used in **Connect Datasource** is the same value you must use later when calling iGPT (and what you should place in `IGPT_USER`).
#### 3) Use the same user when querying iGPT
In the Playground “Ask” screen (e.g. `/v1/recall/ask`) you will see a `user` field.
That value must match the one you used when connecting the datasource.
#### Add to your `.env`
Set `IGPT_USER` to the exact same `user` value you used in the Playground:
```env
IGPT_API_KEY=your-igpt-api-key
IGPT_USER=your-playground-user-value
```
**Links**
- API keys: [iGPT Hub - API Keys](https://igpt.ai/hub/apikeys/)
- Documentation: [iGPT Docs](https://docs.igpt.ai/)
- Official website: [iGPT](https://www.igpt.ai/)
### Backend Setup
1. Create and activate a virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
```
2. Install dependencies:
```bash
python3 -m pip install -r requirements.txt
```
3. Set environment variables:
```bash
export TAVILY_API_KEY="your-tavily-api-key"
export OPENAI_API_KEY="your-openai-api-key"
export GROQ_API_KEY="your-groq-api-key"
export GOOGLE_CALENDAR_CONFIG="<absolute-path-to-project>/mcp-use-case/google-calendar-mcp/build/index.js"
```
4. Run the backend server:
```bash
python app.py
```
### Frontend Setup
1. Navigate to the frontend directory:
```bash
cd ui
```
2. Install dependencies:
```bash
npm install
```
3. Start the development server:
```bash
npm run start
```
**.env file example:**
```env
TAVILY_API_KEY=your-tavily-api-key
OPENAI_API_KEY=your-openai-api-key
GROQ_API_KEY=your-groq-api-key
GOOGLE_CALENDAR_CONFIG=your-google-config
```
---
## 📡 API Endpoints
- `POST /api/analyze-meetings`: Handles streamed LangGraph execution
---
## 🤝 Contributing
Feel free to submit issues and enhancement requests!
---
## 📞 Contact
Questions, feedback, or want to build something custom? Reach out!
- Email: [Dean Sacoransky](mailto:deansa@tavily.com)
---
<div align="center">
<img src="images/logo_circle.png" alt="Tavily Logo" width="80"/>
<p>Powered by <a href="https://tavily.com">Tavily</a> – The web API built for AI agents</p>
</div>
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds