• unwind ai
  • Posts
  • Build Multi-Agent AI Meeting Preparation Assistant

Build Multi-Agent AI Meeting Preparation Assistant

Fully-functional multi-agent AI App in less than 200 lines of Python Code (step-by-step instructions)

In today’s fast-paced business world, effective meeting preparation can make or break a deal. What if you could use AI to streamline your prep process?

In this tutorial, we’ll show you how to build an AI-powered Meeting Preparation Assistant using Streamlit and CrewAI. This tool will leverage multiple AI agents to generate insights, strategies, and executive briefings tailored for your upcoming meetings.

What We’re Building

Our Meeting Preparation Assistant combines multiple AI agents working together to analyze key information about your meeting. With CrewAI, each agent takes on a specific role, like analyzing company background, generating industry insights, or creating a tailored meeting strategy.

This assistant will:

  • Use Streamlit for an easy-to-use interface

  • Combine AI agents from CrewAI for complex task management

  • Pull information from external APIs like OpenAI, Anthropic, and Serper

  • Automate the process of meeting prep, giving you insights and strategies in minutes

Prerequisites

Before we begin, make sure you have:

  1. Python installed on your machine (version 3.7 or higher is recommended)

  2. Basic familiarity with Python programming

  3. Your OpenAI API key, Anthropic API key, and Serper API key

  4. A code editor of your choice (we recommend VSCode or Cursor for their excellent Python support)

Step-by-Step Instructions

Step 1: Setting Up the Environment

First, let's get our development environment ready:

  1. Clone the GitHub repository:

git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
  1. Go to the Meeting Agent folder

cd ai_meeting_agent
pip install -r requirements.txt
  1. Get your Anthropic API Key

  • Sign up for an Anthropic account (or the LLM provider of your choice) and obtain your API key.

  1. Get your SerpAPI Key

  1. Get your OpenAI API Key

  • Sign up for an OpenAI account (or the LLM provider of your choice) and obtain your API key.

Step 2: Importing Libraries and Setting Up the App

  1. Import Required Libraries: At the top of your file, add:

import streamlit as st
from crewai import Agent, Task, Crew, Process
from langchain_openai import ChatOpenAI
from langchain_anthropic import ChatAnthropic
from crewai_tools import SerperDevTool
import os

# Streamlit app setup
st.set_page_config(page_title="AI Meeting Agent 📝", layout="wide")
st.title("AI Meeting Preparation Assistant 📝")
  1. Handling API Keys: Next, create a sidebar where the user can enter their API keys:

# Sidebar for API keys
st.sidebar.header("API Keys")
openai_api_key = st.sidebar.text_input("OpenAI API Key", type="password")
anthropic_api_key = st.sidebar.text_input("Anthropic API Key", type="password")
serper_api_key = st.sidebar.text_input("Serper API Key", type="password")

# Check if all API keys are set
if openai_api_key and anthropic_api_key and serper_api_key:
    # Set API keys as environment variables
    os.environ["OPENAI_API_KEY"] = openai_api_key
    os.environ["ANTHROPIC_API_KEY"] = anthropic_api_key
    os.environ["SERPER_API_KEY"] = serper_api_key

    # Initialize the AI models and tools
    gpt4 = ChatOpenAI(model_name="gpt-4o-mini")
    claude = ChatAnthropic(model_name="claude-3-5-sonnet-20240620")
    search_tool = SerperDevTool()
  1. Creating Input Fields: Now, create input fields for the user to provide meeting details:

# Input fields
company_name = st.text_input("Enter the company name:")
meeting_objective = st.text_input("Enter the meeting objective:")
attendees = st.text_area("Enter the attendees and their roles (one per line):")
meeting_duration = st.number_input("Enter the meeting duration (in minutes):", min_value=15, max_value=180, value=60, step=15)
focus_areas = st.text_input("Enter any specific areas of focus or concerns:")
  1. Defining AI Agents: Now, define the AI agents using CrewAI. Each agent will be responsible for different aspects of the meeting preparation process:

# Define the agents
context_analyzer = Agent(
    role='Meeting Context Specialist',
    goal='Analyze and summarize key background information for the meeting',
    backstory='You are an expert at quickly understanding complex business contexts and identifying critical information.',
    verbose=True,
    allow_delegation=False,
    llm=gpt4,
    tools=[search_tool]
)

industry_insights_generator = Agent(
    role='Industry Expert',
    goal='Provide in-depth industry analysis and identify key trends',
    backstory='You are a seasoned industry analyst with a knack for spotting emerging trends and opportunities.',
    verbose=True,
    allow_delegation=False,
    llm=gpt4,
    tools=[search_tool]
)

strategy_formulator = Agent(
    role='Meeting Strategist',
    goal='Develop a tailored meeting strategy and detailed agenda',
    backstory='You are a master meeting planner, known for creating highly effective strategies and agendas.',
    verbose=True,
    allow_delegation=False,
    llm=claude,
)

executive_briefing_creator = Agent(
    role='Communication Specialist',
    goal='Synthesize information into concise and impactful briefings',
    backstory='You are an expert communicator, skilled at distilling complex information into clear, actionable insights.',
    verbose=True,
    allow_delegation=False,
    llm=claude,
)
  1. Creating Tasks: Each agent will handle a task. Define these tasks with relevant instructions:

# Define the tasks
context_analysis_task = Task(
    description=f"""
    Analyze the context for the meeting with {company_name}, considering:
    1. The meeting objective: {meeting_objective}
    2. The attendees: {attendees}
    3. The meeting duration: {meeting_duration} minutes
    4. Specific focus areas or concerns: {focus_areas}
    
    Research {company_name}, including:
    1. Recent news
    2. Key products/services
    3. Major competitors
    """,
    agent=context_analyzer
)
# Similar task definitions for industry_analysis_task, strategy_development_task, and executive_brief_task
  1. Assembling the Crew: Use CrewAI to bring together your agents and tasks:

# Create the crew
meeting_prep_crew = Crew(
    agents=[context_analyzer, industry_insights_generator, strategy_formulator, executive_briefing_creator],
    tasks=[context_analysis_task, industry_analysis_task, strategy_development_task, executive_brief_task],
    verbose=True,
    process=Process.sequential
)
  1. Running the Assistant: Add a button that runs the AI agents when clicked:

# Run the crew when the user clicks the button
if st.button("Prepare Meeting"):
    with st.spinner("AI agents are preparing your meeting..."):
        result = meeting_prep_crew.kickoff()
    st.markdown(result)
  1. Adding Instructions: Help users understand how to use the app:

st.sidebar.markdown("""
## How to use this app:
1. Enter your API keys in the sidebar.
2. Provide meeting details.
3. Click 'Prepare Meeting' to generate a preparation package.

The AI agents will:
- Analyze the meeting context
- Provide industry insights
- Develop a strategy
- Create an executive brief

This may take a few minutes.
""")

Step 3: Running the App

With our code in place, it’s time to run the AI Meeting Assistant application.

  1. Start the Streamlit App In your terminal, navigate to the project folder, and run the following command:

streamlit run meeting_agent.py
  1. Access Your AI Assistant: Open the provided URL (usually http://localhost:8501) in your web browser to start interacting with the app.

Working Application Demo

Conclusion

Congrats! You’ve built an AI-powered Meeting Preparation Assistant using Streamlit and CrewAI. The assistant uses multiple AI agents to help you prepare for meetings with detailed analysis, strategies, and briefs.

Feel free to expand this project by adding more AI tools, integrating with calendars, or pulling real-time data for more accurate meeting prep!

If you enjoyed this tutorial, make sure to subscribe to Unwind AI for more tutorials like this. And don’t forget to share this guide with your friends!

Reply

or to participate.