# MCP Production Project Structure
## π New Organized Structure
```
blackhole_mcp_production/
βββ π core/ # Core MCP system
β βββ mcp_server.py # Main production server
β βββ mcp_client.py # Command-line client
β βββ conversation_engine.py # Conversational AI with MongoDB search
β βββ inter_agent_coordinator.py # Agent communication coordinator
β βββ config.py # Configuration management
β
βββ π agents/ # Production agents directory
β βββ __init__.py # Agent discovery
β βββ base_agent.py # Base agent class
β βββ agent_manager.py # Agent lifecycle management
β β
β βββ π live_data/ # Live data agents
β β βββ __init__.py
β β βββ weather_agent.py # π€οΈ Live weather monitoring
β β βββ news_agent.py # π° Live news (future)
β β
β βββ π processing/ # Processing agents
β β βββ __init__.py
β β βββ math_agent.py # π’ Mathematical calculations
β β βββ image_ocr_agent.py # πΌοΈ Image text extraction
β β βββ document_agent.py # π Document analysis
β β βββ text_analyzer_agent.py # π Text analysis (future)
β β
β βββ π communication/ # Communication agents
β β βββ __init__.py
β β βββ email_agent.py # π§ Email automation
β β βββ calendar_agent.py # π
Calendar management
β β βββ notification_agent.py # π Notifications (future)
β β
β βββ π specialized/ # Specialized agents
β βββ __init__.py
β βββ workflow_agent.py # π Complex workflows
β βββ search_agent.py # π Advanced search
β
βββ π database/ # Database management
β βββ __init__.py
β βββ mongodb_manager.py # MongoDB connection & operations
β βββ conversation_history.py # Chat history management
β βββ agent_logs.py # Agent activity logging
β βββ query_cache.py # Query caching system
β βββ schemas/ # Database schemas
β βββ conversation_schema.py
β βββ agent_log_schema.py
β βββ extracted_data_schema.py
β
βββ π storage/ # Data storage
β βββ π agent_logs/ # Agent execution logs
β βββ π conversation_history/ # Chat conversations
β βββ π extracted_data/ # OCR & document extracts
β βββ π uploaded_files/ # User uploaded files
β βββ π processed_outputs/ # Agent processing results
β
βββ π web_interface/ # Web interface
β βββ static/ # CSS, JS, images
β βββ templates/ # HTML templates
β βββ app.py # Web application
β
βββ π tests/ # Testing suite
β βββ test_agents.py # Agent testing
β βββ test_database.py # Database testing
β βββ test_integration.py # Integration testing
β
βββ π config/ # Configuration files
β βββ .env # Environment variables
β βββ agent_config.yaml # Agent configurations
β βββ database_config.yaml # Database settings
β
βββ π scripts/ # Utility scripts
β βββ setup_project.py # Project setup
β βββ migrate_data.py # Data migration
β βββ start_production.py # Production startup
β
βββ π docs/ # Documentation
β βββ API.md # API documentation
β βββ AGENTS.md # Agent documentation
β βββ DEPLOYMENT.md # Deployment guide
β
βββ requirements.txt # Dependencies
βββ README.md # Project overview
βββ docker-compose.yml # Docker configuration
```
## π― Key Features
### π€ Agent Organization
- **live_data/**: Real-time data agents (weather, news, etc.)
- **processing/**: Data processing agents (math, OCR, documents)
- **communication/**: Communication agents (email, calendar)
- **specialized/**: Complex workflow and search agents
### πΎ MongoDB Integration
- **Conversation History**: All user interactions stored
- **Agent Logs**: Complete agent execution tracking
- **Extracted Data**: OCR text, document analysis results
- **Query Cache**: Fast retrieval of previous results
### π Intelligent Search
- **MongoDB First**: Search existing data before calling agents
- **Conversational AI**: Context-aware responses
- **Inter-Agent Communication**: Agents collaborate for complex queries
### π Data Flow
1. User query β MongoDB search first
2. If found β Conversational response
3. If not found β Route to appropriate agent(s)
4. Agent processing β Store results in MongoDB
5. Inter-agent communication for complex tasks
6. Final response to user