Spaces:
Configuration error
π§ AI Agent Brainstorming Studio
Two AI Minds, One Breakthrough Idea
here is a video about: https://youtu.be/Yf5Bybwqjkw
A sophisticated brainstorming platform where two specialized AI agents collaborate in real-time to explore your ideas from every angle. Enhanced with real Python MCP integration for research-powered insights and beautiful live analytics.
π Meet Your Brainstorming Team
π‘ Radical Ideator
- Role: The Creative Visionary
- Specialty: Breakthrough thinking, wild ideas, "what if" scenarios
- Approach: Pushes boundaries, challenges assumptions, finds unconventional connections
- Motto: "Let's revolutionize this!"
π§ Practical Refinement
- Role: The Strategic Analyst
- Specialty: Feasibility assessment, systematic evaluation, implementation planning
- Approach: Tests ideas against reality, identifies challenges, builds actionable plans
- Motto: "How do we make this work?"
β‘ How They Collaborate
- πͺοΈ Ideation Phase: Radical Ideator generates breakthrough concepts
- π Analysis Phase: Practical Refinement evaluates and refines ideas
- π Iteration: They build on each other's insights through multiple rounds
- π Results: You get both creative innovation AND practical implementation paths
π₯ Key Features
β Real Python MCP Integration
- Authentic MCP Protocol: Built with official Python MCP SDK v1.6.0 (FastMCP)
- Live Research Enhancement: Real-time web search, memory management, data analysis
- Background Intelligence: MCP tools work silently to enhance agent responses
- 100% Research Enhancement: Agents access real-time information during brainstorming
π Live Analytics Dashboard
- 6-Panel Visual Dashboard: Real-time plotly charts and graphs
- Topic Diversity: TF-IDF analysis of conversation breadth
- Novelty Score: Innovation indicators and creative thinking metrics
- Research Enhancement: MCP contribution tracking as percentage
- Agent Balance: Participation ratios and collaboration quality
- Sentiment Evolution: Emotional flow throughout the session
- Quality Gauge: Overall session grading (A-D scale)
π― Intelligent Agent Behavior
- Natural Conversations: No technical jargon, pure brainstorming focus
- Context Building: Agents build on previous ideas organically
- Personality-Driven: Distinct thinking styles and approaches
- Real-time Adaptation: Responses evolve based on session dynamics
π Beautiful Interface
- Agent-Focused Design: Clear presentation of agent personalities
- Real-time Updates: Live metrics and conversation flow
- Interactive Charts: Hover, zoom, and explore trends
- Responsive Layout: Works perfectly on desktop and mobile
π Quick Start
Prerequisites
- Python 3.10 or higher
- OpenAI API key (optional - works in demo mode without it)
Option 1: Automated Setup (Recommended)
Clone or download the project
git clone <your-repo-url> cd gradio_agentRun the automated setup
python setup.pyThis will:
- β Check Python version compatibility
- β Install all dependencies automatically
- β Download required NLTK data
- β Test all imports
- β Offer to launch immediately
Launch anytime with
python launch.py
Option 2: Manual Setup
Clone or download the project
git clone <your-repo-url> cd gradio_agentInstall dependencies
pip install -r requirements.txtSet up OpenAI API (Optional)
# Option 1: Environment variable export OPENAI_API_KEY="sk-your-api-key-here" # Option 2: Create .env file echo "OPENAI_API_KEY=sk-your-api-key-here" > .env # Option 3: Enter in web interfaceLaunch the brainstorming studio
python python_mcp_brainstorming.pyOpen your browser and go to
http://localhost:7864
π How to Use
Starting a Brainstorming Session
π Enter Your Topic
- Type what you want to brainstorm about
- Examples: "sustainable packaging solutions", "AI-powered education tools"
βοΈ Configure Session
- Rounds: 1-6 back-and-forth exchanges (default: 3)
- API Key: Optional for enhanced responses
π Watch the Magic
- Agents think creatively and analytically in real-time
- Live metrics update as they collaborate
- Visual dashboard shows trends and insights
Understanding the Metrics
- π Topic Diversity (0-1): How varied and comprehensive the discussion becomes
- π‘ Novelty Score (0-1): Level of innovation and creative thinking demonstrated
- π Research Enhancement (%): Real-time research contribution to idea quality
- π€ Agent Balance (0-1): How well the agents collaborate and build on ideas
- π Session Grade (A-D): Overall brainstorming session quality
- π Sentiment: Emotional tone and enthusiasm tracking
Session Quality Indicators
- π A-Grade (0.8+): Exceptional brainstorming with high diversity and innovation
- π₯ B-Grade (0.6-0.8): Strong session with good balance and creativity
- π₯ C-Grade (0.4-0.6): Solid brainstorming with room for improvement
- π D-Grade (<0.4): Basic session, consider trying different topics
π― Perfect Topics to Try
π’ Business & Innovation
- "Customer retention strategies for SaaS companies"
- "Sustainable supply chain optimization"
- "AI-enhanced customer service solutions"
π¬ Research & Development
- "Next-generation battery technologies"
- "Personalized medicine approaches"
- "Climate change mitigation strategies"
π¨ Creative Projects
- "Interactive educational experiences"
- "Community engagement platforms"
- "Accessibility-focused product design"
π‘ Problem Solving
- "Reducing food waste in urban areas"
- "Improving mental health support systems"
- "Enhancing remote team collaboration"
π§ Technical Architecture
Core Components
π€ AI Agents
RealPythonMCPAgent: Base agent class with MCP integration- Personality-driven response generation
- Context-aware conversation building
π Analytics Engine
BrainstormingMetrics: Real-time calculation of quality metrics- TF-IDF topic diversity analysis
- Innovation keyword detection
- Sentiment progression tracking
π MCP Integration
FastMCPserver with real tool registration@mcp.tool()decorators for web search, memory, data analysis- Background research enhancement
- Authentic Python MCP SDK v1.6.0
π¨ Visualization Dashboard
- Plotly subplots with 6-panel layout
- Real-time trend lines and gauges
- Interactive pie charts and indicators
- Live metric updates
Technology Stack
- ποΈ Interface: Gradio 4.0+ (web-based UI)
- π§ AI Models: OpenAI GPT with intelligent fallbacks
- π Visualization: Plotly 5.17+ (interactive charts)
- π Analysis: Scikit-learn (TF-IDF, clustering)
- π MCP Protocol: Official Python MCP SDK v1.6.0
- π Data Processing: NumPy, Pandas for metrics calculation
- π¬ NLP: NLTK, TextBlob for sentiment and text analysis
π What Makes This Special
π― Authentic MCP Implementation
- Uses real Model Context Protocol (not simulation)
- Official Python MCP SDK with FastMCP server
- Genuine tool registration and execution
- Background research capabilities
π Meaningful Metrics
- Academic-grade analysis using TF-IDF and innovation indicators
- Real-time visual feedback showing session progression
- Quality scoring that actually reflects brainstorming effectiveness
π€ Natural Agent Collaboration
- Personality-driven responses that feel authentic
- Context building where agents truly build on each other's ideas
- No technical jargon - pure focus on brainstorming content
π¨ Beautiful User Experience
- Agent-focused design highlighting personalities and collaboration
- Live visual dashboard with stunning real-time charts
- Responsive interface that works across devices
π Example Session Results
π Session Quality:
Overall Grade: B (Score: 0.661)
Topic Diversity: 0.560
Novelty Score: 0.424
Research Enhancement: 100.0%
π€ Agent Performance:
Radical Ideator: 3 turns, 341 words
Practical Refinement: 3 turns, 349 words
Balance Ratio: 1.000
π‘ Innovation Indicators: 12 unique concepts explored
π Troubleshooting
Common Issues
π§ Installation Problems
# If MCP installation fails
pip install --upgrade pip
pip install mcp>=1.0.0
# If dependencies conflict
pip install -r requirements_mcp.txt --upgrade
π API Key Issues
- Works perfectly without API key (demo mode)
- Check OpenAI billing and rate limits
- Verify key starts with "sk-"
π Visualization Issues
- Ensure plotly>=5.17.0 is installed
- Check browser JavaScript is enabled
- Try refreshing if charts don't appear
Demo Mode
- Full functionality without OpenAI API key
- Intelligent fallback responses maintain agent personalities
- All metrics and visualizations work normally
- MCP tools provide research enhancement regardless
π Future Enhancements
- π Multiple AI Providers: Support for Claude, Gemini, local models
- π€ Export Features: Save sessions as reports or presentations
- π₯ Multi-User Support: Collaborative brainstorming with human participants
- π§© Custom Agent Personas: Define your own specialized agent types
- π Enhanced MCP Tools: Integration with more research databases and APIs
- π Advanced Analytics: Deeper conversation analysis and insights
π Performance & Scaling
- β‘ Fast Response Times: Optimized async processing
- π Real-time Updates: Live metrics without page refresh
- πΎ Memory Efficient: Smart caching and session management
- π Scalable Architecture: Ready for multi-user deployment
π€ Contributing
We welcome contributions! Areas of interest:
- π§ New MCP Tools: Additional research capabilities
- π¨ UI/UX Improvements: Enhanced visual design
- π Advanced Metrics: New brainstorming quality indicators
- π§ Agent Personalities: Additional specialist agent types
π License
This project demonstrates advanced AI-agent collaboration with real MCP integration. Feel free to modify and extend for your own brainstorming needs.
Built with β€οΈ using real Python MCP SDK v1.6.0
Transform your brainstorming with AI agents that think differently but work together perfectly.