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
.env
file 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