TaiChiTiger/IceBreaker

Flask-based web application that generates personalized conversation starters by analyzing LinkedIn and Twitter profiles using LangChain and OpenAI

โ˜… 0Forks 0PythonGitHub โ†—Compare

README

๐ŸงŠ Ice Breaker

An intelligent ice breaker generator powered by LangChain and social media intelligence

Ice Breaker Demo

LangChain Tavily Python Flask License Udemy Course

๐ŸŽฏ Overview

Ice Breaker is a sophisticated AI-powered web application that creates personalized ice breakers by analyzing LinkedIn and Twitter profiles. This project serves as a comprehensive learning tool for mastering LangChain while building a practical generative AI application that combines social media intelligence with natural language generation.

โœจ Key Features

AI Pipeline Flow:

  1. ๐Ÿ” Profile Discovery: Intelligent lookup and discovery of LinkedIn and Twitter profiles
  2. ๐ŸŒ Data Extraction: Advanced web scraping of professional and social media data
  3. ๐Ÿง  AI Analysis: Deep analysis of personality, interests, and professional background
  4. โœ๏ธ Ice Breaker Generation: Context-aware creation of personalized conversation starters
  5. ๐ŸŽจ Smart Formatting: Professional presentation of generated content
  6. ๐Ÿ’ฌ Interactive Interface: User-friendly web interface powered by Flask
  7. ๐Ÿš€ Real-time Processing: Fast end-to-end pipeline from profile input to ice breaker output

Watch Ice Breaker analyze social profiles and generate personalized conversation starters

๐Ÿ› ๏ธ Tech Stack

Component Technology Description
๐Ÿ–ฅ๏ธ Frontend Flask Web application framework
๐Ÿง  AI Framework LangChain ๐Ÿฆœ๐Ÿ”— Orchestrates the AI pipeline
๐Ÿ” LinkedIn Data Scrapin.io Professional profile scraping
๐Ÿฆ Twitter Data Twitter API Social media content analysis
๐ŸŒ Web Search Tavily Enhanced profile discovery
๐Ÿค– LLM OpenAI GPT Powers the conversation generation
๐Ÿ“Š Monitoring LangSmith Optional tracing and debugging
๐Ÿ Backend Python 3.8+ Core application logic

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • OpenAI API key
  • Scrapin.io API key
  • Twitter API credentials
  • Tavily API key

Installation

  1. Clone the repository

    git clone https://github.com/emarco177/ice_breaker.git
    cd ice_breaker
  2. Set up environment variables

    Create a .env file in the root directory with your API keys (see Environment Variables section for details).

  3. Install dependencies

    pipenv install
  4. Start the application

    pipenv run app.py
  5. Open your browser and navigate to http://localhost:5000

๐Ÿงช Testing

Run the test suite to ensure everything is working correctly:

pipenv run pytest .

๐Ÿ’ฐ API Costs & Credits

๐Ÿ“‹ Note: This project uses paid API services for optimal functionality:

โš ๏ธ Important: If you enable LangSmith tracing (LANGCHAIN_TRACING_V2=true), ensure you have a valid LANGCHAIN_API_KEY. Without it, the application will throw an error. If you don't need tracing, simply omit these variables.

๐Ÿ“ Project Structure

ice_breaker/
โ”œโ”€โ”€ agents/                    # AI agents for profile lookup
โ”‚   โ”œโ”€โ”€ linkedin_lookup_agent.py
โ”‚   โ””โ”€โ”€ twitter_lookup_agent.py
โ”œโ”€โ”€ chains/                    # LangChain custom chains
โ”‚   โ””โ”€โ”€ custom_chains.py
โ”œโ”€โ”€ third_parties/            # External API integrations
โ”‚   โ”œโ”€โ”€ linkedin.py
โ”‚   โ””โ”€โ”€ twitter.py
โ”œโ”€โ”€ tools/                    # Utility tools and functions
โ”‚   โ””โ”€โ”€ tools.py
โ”œโ”€โ”€ templates/                # Flask HTML templates
โ”‚   โ””โ”€โ”€ index.html
โ”œโ”€โ”€ static/                   # Static assets
โ”‚   โ”œโ”€โ”€ banner.jpeg
โ”‚   โ””โ”€โ”€ demo.gif
โ”œโ”€โ”€ app.py                    # Flask application entry point
โ”œโ”€โ”€ ice_breaker.py           # Core ice breaker logic
โ”œโ”€โ”€ output_parsers.py        # Response formatting utilities
โ””โ”€โ”€ requirements files       # Pipfile, Pipfile.lock

๐Ÿ”ง Environment Variables

Create a .env file in the root directory:

OPENAI_API_KEY=your_openai_api_key_here
SCRAPIN_API_KEY=your_scrapin_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here

# Optional: Twitter scraping (if you want Twitter data)
TWITTER_API_KEY=your_twitter_api_key_here
TWITTER_API_SECRET=your_twitter_api_secret_here
TWITTER_ACCESS_TOKEN=your_twitter_access_token_here
TWITTER_ACCESS_SECRET=your_twitter_access_secret_here

# Optional: Enable LangSmith tracing
LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=your_langsmith_api_key_here
LANGCHAIN_PROJECT=ice_breaker

โš ๏ธ Important Note: If you enable tracing by setting LANGCHAIN_TRACING_V2=true, you must have a valid LangSmith API key set in LANGCHAIN_API_KEY. Without a valid API key, the application will throw an error. If you don't need tracing, simply remove or comment out these environment variables.

Variable Description Required
OPENAI_API_KEY Your OpenAI API key for LLM access โœ…
SCRAPIN_API_KEY Scrapin.io API key for LinkedIn scraping โœ…
TAVILY_API_KEY Tavily API key for enhanced web search โœ…
TWITTER_API_KEY Twitter API key for social data access (optional) โšช
TWITTER_API_SECRET Twitter API secret (optional) โšช
TWITTER_ACCESS_TOKEN Twitter access token (optional) โšช
TWITTER_ACCESS_SECRET Twitter access token secret (optional) โšช
LANGCHAIN_TRACING_V2 Enable LangSmith tracing (optional) โšช
LANGCHAIN_API_KEY LangSmith API key (required if tracing enabled) โšช
LANGCHAIN_PROJECT LangSmith project name (optional) โšช

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“š Learning Resources

This project is designed as a comprehensive learning tool for understanding:

  • ๐Ÿฆœ LangChain Framework - Agent orchestration and chain composition
  • ๐Ÿ”— API Integration - Working with multiple external services
  • ๐Ÿง  AI Application Architecture - Building production-ready AI systems
  • ๐ŸŒ Web Scraping - Ethical data collection from social platforms
  • ๐Ÿ’ฌ Natural Language Generation - Context-aware content creation

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐ŸŒŸ Support

If you find this project helpful, please consider:

  • โญ Starring the repository
  • ๐Ÿ› Reporting issues
  • ๐Ÿ’ก Contributing improvements
  • ๐Ÿ“ข Sharing with others
  • ๐ŸŽ“ Taking the LangChain Course

๐Ÿ”— Connect with Me

Portfolio LinkedIn Twitter

Built with โค๏ธ by Eden Marco

Contributors

emarco177saurabhkankriyaclaude[bot]TaiChiTiger

Issues