An intelligent ice breaker generator powered by LangChain and social media intelligence
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.
AI Pipeline Flow:
- ๐ Profile Discovery: Intelligent lookup and discovery of LinkedIn and Twitter profiles
- ๐ Data Extraction: Advanced web scraping of professional and social media data
- ๐ง AI Analysis: Deep analysis of personality, interests, and professional background
- โ๏ธ Ice Breaker Generation: Context-aware creation of personalized conversation starters
- ๐จ Smart Formatting: Professional presentation of generated content
- ๐ฌ Interactive Interface: User-friendly web interface powered by Flask
- ๐ 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
| 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 |
- Python 3.8 or higher
- OpenAI API key
- Scrapin.io API key
- Twitter API credentials
- Tavily API key
-
Clone the repository
git clone https://github.com/emarco177/ice_breaker.git cd ice_breaker -
Set up environment variables
Create a
.envfile in the root directory with your API keys (see Environment Variables section for details). -
Install dependencies
pipenv install
-
Start the application
pipenv run app.py
-
Open your browser and navigate to
http://localhost:5000
Run the test suite to ensure everything is working correctly:
pipenv run pytest .๐ Note: This project uses paid API services for optimal functionality:
Scrapin.io ๐ผ - LinkedIn data scraping
Sign up for API accessTavily ๐ - Enhanced web search and profile discovery
Sign up for Tavily API accessTwitter API ๐ฆ - Social media content access
Paid service for accessing Twitter data
โ ๏ธ Important: If you enable LangSmith tracing (LANGCHAIN_TRACING_V2=true), ensure you have a validLANGCHAIN_API_KEY. Without it, the application will throw an error. If you don't need tracing, simply omit these variables.
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
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 settingLANGCHAIN_TRACING_V2=true, you must have a valid LangSmith API key set inLANGCHAIN_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) | โช |
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.
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
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider:
- โญ Starring the repository
- ๐ Reporting issues
- ๐ก Contributing improvements
- ๐ข Sharing with others
- ๐ Taking the LangChain Course
Built with โค๏ธ by Eden Marco
