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
sdk_version: 5.33.1
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
short_description: A two-agent brainstorming platform
|
| 11 |
-
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# π§ AI Agent Brainstorming Studio
|
| 2 |
+
|
| 3 |
+
## Two AI Minds, One Breakthrough Idea
|
| 4 |
+
|
| 5 |
+
here is a video about:
|
| 6 |
+
https://youtu.be/Yf5Bybwqjkw
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
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.
|
| 10 |
+
|
| 11 |
+
## π Meet Your Brainstorming Team
|
| 12 |
+
|
| 13 |
+
### π‘ **Radical Ideator**
|
| 14 |
+
- **Role:** The Creative Visionary
|
| 15 |
+
- **Specialty:** Breakthrough thinking, wild ideas, "what if" scenarios
|
| 16 |
+
- **Approach:** Pushes boundaries, challenges assumptions, finds unconventional connections
|
| 17 |
+
- **Motto:** *"Let's revolutionize this!"*
|
| 18 |
+
|
| 19 |
+
### π§ **Practical Refinement**
|
| 20 |
+
- **Role:** The Strategic Analyst
|
| 21 |
+
- **Specialty:** Feasibility assessment, systematic evaluation, implementation planning
|
| 22 |
+
- **Approach:** Tests ideas against reality, identifies challenges, builds actionable plans
|
| 23 |
+
- **Motto:** *"How do we make this work?"*
|
| 24 |
+
|
| 25 |
+
## β‘ How They Collaborate
|
| 26 |
+
|
| 27 |
+
1. **πͺοΈ Ideation Phase:** Radical Ideator generates breakthrough concepts
|
| 28 |
+
2. **π Analysis Phase:** Practical Refinement evaluates and refines ideas
|
| 29 |
+
3. **π Iteration:** They build on each other's insights through multiple rounds
|
| 30 |
+
4. **π Results:** You get both creative innovation AND practical implementation paths
|
| 31 |
+
|
| 32 |
+
## π₯ Key Features
|
| 33 |
+
|
| 34 |
+
### β
**Real Python MCP Integration**
|
| 35 |
+
- **Authentic MCP Protocol:** Built with official Python MCP SDK v1.6.0 (FastMCP)
|
| 36 |
+
- **Live Research Enhancement:** Real-time web search, memory management, data analysis
|
| 37 |
+
- **Background Intelligence:** MCP tools work silently to enhance agent responses
|
| 38 |
+
- **100% Research Enhancement:** Agents access real-time information during brainstorming
|
| 39 |
+
|
| 40 |
+
### π **Live Analytics Dashboard**
|
| 41 |
+
- **6-Panel Visual Dashboard:** Real-time plotly charts and graphs
|
| 42 |
+
- **Topic Diversity:** TF-IDF analysis of conversation breadth
|
| 43 |
+
- **Novelty Score:** Innovation indicators and creative thinking metrics
|
| 44 |
+
- **Research Enhancement:** MCP contribution tracking as percentage
|
| 45 |
+
- **Agent Balance:** Participation ratios and collaboration quality
|
| 46 |
+
- **Sentiment Evolution:** Emotional flow throughout the session
|
| 47 |
+
- **Quality Gauge:** Overall session grading (A-D scale)
|
| 48 |
+
|
| 49 |
+
### π― **Intelligent Agent Behavior**
|
| 50 |
+
- **Natural Conversations:** No technical jargon, pure brainstorming focus
|
| 51 |
+
- **Context Building:** Agents build on previous ideas organically
|
| 52 |
+
- **Personality-Driven:** Distinct thinking styles and approaches
|
| 53 |
+
- **Real-time Adaptation:** Responses evolve based on session dynamics
|
| 54 |
+
|
| 55 |
+
### π **Beautiful Interface**
|
| 56 |
+
- **Agent-Focused Design:** Clear presentation of agent personalities
|
| 57 |
+
- **Real-time Updates:** Live metrics and conversation flow
|
| 58 |
+
- **Interactive Charts:** Hover, zoom, and explore trends
|
| 59 |
+
- **Responsive Layout:** Works perfectly on desktop and mobile
|
| 60 |
+
|
| 61 |
+
## π Quick Start
|
| 62 |
+
|
| 63 |
+
### Prerequisites
|
| 64 |
+
- Python 3.10 or higher
|
| 65 |
+
- OpenAI API key (optional - works in demo mode without it)
|
| 66 |
+
|
| 67 |
+
### Option 1: Automated Setup (Recommended)
|
| 68 |
+
|
| 69 |
+
1. **Clone or download the project**
|
| 70 |
+
```bash
|
| 71 |
+
git clone <your-repo-url>
|
| 72 |
+
cd gradio_agent
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
2. **Run the automated setup**
|
| 76 |
+
```bash
|
| 77 |
+
python setup.py
|
| 78 |
+
```
|
| 79 |
+
This will:
|
| 80 |
+
- β
Check Python version compatibility
|
| 81 |
+
- β
Install all dependencies automatically
|
| 82 |
+
- β
Download required NLTK data
|
| 83 |
+
- β
Test all imports
|
| 84 |
+
- β
Offer to launch immediately
|
| 85 |
+
|
| 86 |
+
3. **Launch anytime with**
|
| 87 |
+
```bash
|
| 88 |
+
python launch.py
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
### Option 2: Manual Setup
|
| 92 |
+
|
| 93 |
+
1. **Clone or download the project**
|
| 94 |
+
```bash
|
| 95 |
+
git clone <your-repo-url>
|
| 96 |
+
cd gradio_agent
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
2. **Install dependencies**
|
| 100 |
+
```bash
|
| 101 |
+
pip install -r requirements.txt
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
3. **Set up OpenAI API (Optional)**
|
| 105 |
+
```bash
|
| 106 |
+
# Option 1: Environment variable
|
| 107 |
+
export OPENAI_API_KEY="sk-your-api-key-here"
|
| 108 |
+
|
| 109 |
+
# Option 2: Create .env file
|
| 110 |
+
echo "OPENAI_API_KEY=sk-your-api-key-here" > .env
|
| 111 |
+
|
| 112 |
+
# Option 3: Enter in web interface
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
4. **Launch the brainstorming studio**
|
| 116 |
+
```bash
|
| 117 |
+
python python_mcp_brainstorming.py
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
5. **Open your browser** and go to `http://localhost:7864`
|
| 121 |
+
|
| 122 |
+
## π How to Use
|
| 123 |
+
|
| 124 |
+
### Starting a Brainstorming Session
|
| 125 |
+
|
| 126 |
+
1. **π Enter Your Topic**
|
| 127 |
+
- Type what you want to brainstorm about
|
| 128 |
+
- Examples: "sustainable packaging solutions", "AI-powered education tools"
|
| 129 |
+
|
| 130 |
+
2. **βοΈ Configure Session**
|
| 131 |
+
- **Rounds:** 1-6 back-and-forth exchanges (default: 3)
|
| 132 |
+
- **API Key:** Optional for enhanced responses
|
| 133 |
+
|
| 134 |
+
3. **π Watch the Magic**
|
| 135 |
+
- Agents think creatively and analytically in real-time
|
| 136 |
+
- Live metrics update as they collaborate
|
| 137 |
+
- Visual dashboard shows trends and insights
|
| 138 |
+
|
| 139 |
+
### Understanding the Metrics
|
| 140 |
+
|
| 141 |
+
- **π Topic Diversity (0-1):** How varied and comprehensive the discussion becomes
|
| 142 |
+
- **π‘ Novelty Score (0-1):** Level of innovation and creative thinking demonstrated
|
| 143 |
+
- **π Research Enhancement (%):** Real-time research contribution to idea quality
|
| 144 |
+
- **π€ Agent Balance (0-1):** How well the agents collaborate and build on ideas
|
| 145 |
+
- **π Session Grade (A-D):** Overall brainstorming session quality
|
| 146 |
+
- **π Sentiment:** Emotional tone and enthusiasm tracking
|
| 147 |
+
|
| 148 |
+
### Session Quality Indicators
|
| 149 |
+
|
| 150 |
+
- **π A-Grade (0.8+):** Exceptional brainstorming with high diversity and innovation
|
| 151 |
+
- **π₯ B-Grade (0.6-0.8):** Strong session with good balance and creativity
|
| 152 |
+
- **π₯ C-Grade (0.4-0.6):** Solid brainstorming with room for improvement
|
| 153 |
+
- **π D-Grade (<0.4):** Basic session, consider trying different topics
|
| 154 |
+
|
| 155 |
+
## π― Perfect Topics to Try
|
| 156 |
+
|
| 157 |
+
### π’ **Business & Innovation**
|
| 158 |
+
- "Customer retention strategies for SaaS companies"
|
| 159 |
+
- "Sustainable supply chain optimization"
|
| 160 |
+
- "AI-enhanced customer service solutions"
|
| 161 |
+
|
| 162 |
+
### π¬ **Research & Development**
|
| 163 |
+
- "Next-generation battery technologies"
|
| 164 |
+
- "Personalized medicine approaches"
|
| 165 |
+
- "Climate change mitigation strategies"
|
| 166 |
+
|
| 167 |
+
### π¨ **Creative Projects**
|
| 168 |
+
- "Interactive educational experiences"
|
| 169 |
+
- "Community engagement platforms"
|
| 170 |
+
- "Accessibility-focused product design"
|
| 171 |
+
|
| 172 |
+
### π‘ **Problem Solving**
|
| 173 |
+
- "Reducing food waste in urban areas"
|
| 174 |
+
- "Improving mental health support systems"
|
| 175 |
+
- "Enhancing remote team collaboration"
|
| 176 |
+
|
| 177 |
+
## π§ Technical Architecture
|
| 178 |
+
|
| 179 |
+
### Core Components
|
| 180 |
+
|
| 181 |
+
**π€ AI Agents**
|
| 182 |
+
- `RealPythonMCPAgent`: Base agent class with MCP integration
|
| 183 |
+
- Personality-driven response generation
|
| 184 |
+
- Context-aware conversation building
|
| 185 |
+
|
| 186 |
+
**π Analytics Engine**
|
| 187 |
+
- `BrainstormingMetrics`: Real-time calculation of quality metrics
|
| 188 |
+
- TF-IDF topic diversity analysis
|
| 189 |
+
- Innovation keyword detection
|
| 190 |
+
- Sentiment progression tracking
|
| 191 |
+
|
| 192 |
+
**π MCP Integration**
|
| 193 |
+
- `FastMCP` server with real tool registration
|
| 194 |
+
- `@mcp.tool()` decorators for web search, memory, data analysis
|
| 195 |
+
- Background research enhancement
|
| 196 |
+
- Authentic Python MCP SDK v1.6.0
|
| 197 |
+
|
| 198 |
+
**π¨ Visualization Dashboard**
|
| 199 |
+
- Plotly subplots with 6-panel layout
|
| 200 |
+
- Real-time trend lines and gauges
|
| 201 |
+
- Interactive pie charts and indicators
|
| 202 |
+
- Live metric updates
|
| 203 |
+
|
| 204 |
+
### Technology Stack
|
| 205 |
+
|
| 206 |
+
- **ποΈ Interface:** Gradio 4.0+ (web-based UI)
|
| 207 |
+
- **π§ AI Models:** OpenAI GPT with intelligent fallbacks
|
| 208 |
+
- **π Visualization:** Plotly 5.17+ (interactive charts)
|
| 209 |
+
- **π Analysis:** Scikit-learn (TF-IDF, clustering)
|
| 210 |
+
- **π MCP Protocol:** Official Python MCP SDK v1.6.0
|
| 211 |
+
- **π Data Processing:** NumPy, Pandas for metrics calculation
|
| 212 |
+
- **π¬ NLP:** NLTK, TextBlob for sentiment and text analysis
|
| 213 |
+
|
| 214 |
+
## π What Makes This Special
|
| 215 |
+
|
| 216 |
+
### π― **Authentic MCP Implementation**
|
| 217 |
+
- Uses **real Model Context Protocol** (not simulation)
|
| 218 |
+
- Official Python MCP SDK with FastMCP server
|
| 219 |
+
- Genuine tool registration and execution
|
| 220 |
+
- Background research capabilities
|
| 221 |
+
|
| 222 |
+
### π **Meaningful Metrics**
|
| 223 |
+
- **Academic-grade analysis** using TF-IDF and innovation indicators
|
| 224 |
+
- **Real-time visual feedback** showing session progression
|
| 225 |
+
- **Quality scoring** that actually reflects brainstorming effectiveness
|
| 226 |
+
|
| 227 |
+
### π€ **Natural Agent Collaboration**
|
| 228 |
+
- **Personality-driven responses** that feel authentic
|
| 229 |
+
- **Context building** where agents truly build on each other's ideas
|
| 230 |
+
- **No technical jargon** - pure focus on brainstorming content
|
| 231 |
+
|
| 232 |
+
### π¨ **Beautiful User Experience**
|
| 233 |
+
- **Agent-focused design** highlighting personalities and collaboration
|
| 234 |
+
- **Live visual dashboard** with stunning real-time charts
|
| 235 |
+
- **Responsive interface** that works across devices
|
| 236 |
+
|
| 237 |
+
## π Example Session Results
|
| 238 |
+
|
| 239 |
+
```
|
| 240 |
+
π Session Quality:
|
| 241 |
+
Overall Grade: B (Score: 0.661)
|
| 242 |
+
Topic Diversity: 0.560
|
| 243 |
+
Novelty Score: 0.424
|
| 244 |
+
Research Enhancement: 100.0%
|
| 245 |
+
|
| 246 |
+
π€ Agent Performance:
|
| 247 |
+
Radical Ideator: 3 turns, 341 words
|
| 248 |
+
Practical Refinement: 3 turns, 349 words
|
| 249 |
+
Balance Ratio: 1.000
|
| 250 |
+
|
| 251 |
+
π‘ Innovation Indicators: 12 unique concepts explored
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
## π Troubleshooting
|
| 255 |
+
|
| 256 |
+
### Common Issues
|
| 257 |
+
|
| 258 |
+
**π§ Installation Problems**
|
| 259 |
+
```bash
|
| 260 |
+
# If MCP installation fails
|
| 261 |
+
pip install --upgrade pip
|
| 262 |
+
pip install mcp>=1.0.0
|
| 263 |
+
|
| 264 |
+
# If dependencies conflict
|
| 265 |
+
pip install -r requirements_mcp.txt --upgrade
|
| 266 |
+
```
|
| 267 |
+
|
| 268 |
+
**π API Key Issues**
|
| 269 |
+
- Works perfectly without API key (demo mode)
|
| 270 |
+
- Check OpenAI billing and rate limits
|
| 271 |
+
- Verify key starts with "sk-"
|
| 272 |
+
|
| 273 |
+
**π Visualization Issues**
|
| 274 |
+
- Ensure plotly>=5.17.0 is installed
|
| 275 |
+
- Check browser JavaScript is enabled
|
| 276 |
+
- Try refreshing if charts don't appear
|
| 277 |
+
|
| 278 |
+
### Demo Mode
|
| 279 |
+
- **Full functionality** without OpenAI API key
|
| 280 |
+
- **Intelligent fallback responses** maintain agent personalities
|
| 281 |
+
- **All metrics and visualizations** work normally
|
| 282 |
+
- **MCP tools** provide research enhancement regardless
|
| 283 |
+
|
| 284 |
+
## π Future Enhancements
|
| 285 |
+
|
| 286 |
+
- **π Multiple AI Providers:** Support for Claude, Gemini, local models
|
| 287 |
+
- **π€ Export Features:** Save sessions as reports or presentations
|
| 288 |
+
- **π₯ Multi-User Support:** Collaborative brainstorming with human participants
|
| 289 |
+
- **π§© Custom Agent Personas:** Define your own specialized agent types
|
| 290 |
+
- **π Enhanced MCP Tools:** Integration with more research databases and APIs
|
| 291 |
+
- **π Advanced Analytics:** Deeper conversation analysis and insights
|
| 292 |
+
|
| 293 |
+
## π Performance & Scaling
|
| 294 |
+
|
| 295 |
+
- **β‘ Fast Response Times:** Optimized async processing
|
| 296 |
+
- **π Real-time Updates:** Live metrics without page refresh
|
| 297 |
+
- **πΎ Memory Efficient:** Smart caching and session management
|
| 298 |
+
- **π Scalable Architecture:** Ready for multi-user deployment
|
| 299 |
+
|
| 300 |
+
## π€ Contributing
|
| 301 |
+
|
| 302 |
+
We welcome contributions! Areas of interest:
|
| 303 |
+
- **π§ New MCP Tools:** Additional research capabilities
|
| 304 |
+
- **π¨ UI/UX Improvements:** Enhanced visual design
|
| 305 |
+
- **π Advanced Metrics:** New brainstorming quality indicators
|
| 306 |
+
- **π§ Agent Personalities:** Additional specialist agent types
|
| 307 |
+
|
| 308 |
+
## π License
|
| 309 |
+
|
| 310 |
+
This project demonstrates advanced AI-agent collaboration with real MCP integration.
|
| 311 |
+
Feel free to modify and extend for your own brainstorming needs.
|
| 312 |
+
|
| 313 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
|
| 315 |
+
**Built with β€οΈ using real Python MCP SDK v1.6.0**
|
| 316 |
+
|
| 317 |
+
*Transform your brainstorming with AI agents that think differently but work together perfectly.*
|