# GEO Platform Agents

## Agent Registry

| Agent | Name | Type | Supported Tasks | File |
|-------|------|------|----------------|------|
| CitationDetectorAgent | citation_detector | CITATION_DETECTOR | citation_detect, citation_batch | backend/app/agent_framework/agents/citation_detector.py |
| ContentGeneratorAgent | content_generator | CONTENT_GENERATOR | content_generate, content_regenerate | backend/app/agent_framework/agents/content_generator_agent.py |
| DeAIAgent | deai_agent | DEAI_AGENT | deai_process | backend/app/agent_framework/agents/deai_agent.py |
| GEOOptimizerAgent | geo_optimizer | GEO_OPTIMIZER | geo_optimize | backend/app/agent_framework/agents/geo_optimizer.py |
| MonitorAgent | monitor | PERFORMANCE_TRACKER | monitor_track, monitor_check_single | backend/app/agent_framework/agents/monitor_agent.py |
| SchemaAdvisorAgent | schema_advisor | SCHEMA_ADVISOR | schema_advise | backend/app/agent_framework/agents/schema_advisor.py |
| CompetitorAnalyzerAgent | competitor_analyzer | COMPETITOR_ANALYZER | competitor_analyze, competitor_gap_analysis | backend/app/agent_framework/agents/competitor_analyzer.py |
| TrendAgent | trend_agent | TREND_AGENT | trend_insight, trend_hotspot | backend/app/agent_framework/agents/trend_agent.py |

## Running Agents

### Standalone Mode (No Redis Required)
```bash
cd geo/backend
python3 -m app.agent_framework.standalone [agent_name|all]
```

### With Redis Queue
Agents auto-register via Registry when Redis is available. Tasks dispatched via TaskDispatcher.

## Agent Framework Components
- BaseAgent: Abstract base class (backend/app/agent_framework/base_agent.py)
- Dispatcher: Task distribution (backend/app/agent_framework/dispatcher.py)
- Registry: Agent registration (backend/app/agent_framework/registry.py)
- Protocol: Message types and AgentType enum (backend/app/agent_framework/protocol.py)
- ConfigManager: Agent configuration (backend/app/agent_framework/config_manager.py)

## New Agent Data Models
- MonitoringRecord + ContentBaseline (backend/app/models/monitoring.py)
- SchemaSuggestion (backend/app/models/schema_suggestion.py)
- CompetitorInsight (backend/app/models/competitor_insight.py)
- TrendInsight (backend/app/models/trend_insight.py)

## New Agent API Endpoints
- /api/v1/monitoring - MonitorAgent API
- /api/v1/competitor - CompetitorAnalyzer API
- /api/v1/schema - SchemaAdvisor API
- /api/v1/trends - TrendAgent API
