This backend implements an agentic AI system using the Strands Agents SDK for the AWS Superhack AgenticAI hackathon. The system uses multiple specialized AI agents that work together to correlate infrastructure metrics with support tickets and generate proactive insights for MSPs.
Latest Improvements:
- Enhanced Data Persistence: DynamoDB tables with Global Secondary Indexes (GSIs) for efficient querying
- Full-text Search: AWS OpenSearch integration for powerful search capabilities
- Advanced Analytics: Time-series analytics with aggregations and multiple aggregation types
- Improved Performance: Proper pagination and Decimal/Float conversion handling
The backend implements a multi-agent architecture with the following specialized agents:
- Orchestrator Agent - Central coordinator that routes requests to specialized agents
- Data Ingestion Agent - Handles loading metrics and tickets data from storage
- Anomaly Detection Agent - Specializes in detecting anomalies in metrics data
- Ticket Analysis Agent - Analyzes support tickets and clusters similar issues
- Correlation Agent - Correlates anomalies with ticket clusters to identify patterns
- Insight Generation Agent - Creates human-readable insights and recommendations
- Notification Agent - Handles sending notifications and proactive digests
- Health Check Agent - Monitors system health and status
The backend now includes enhanced data persistence and search capabilities:
- Enhanced DynamoDB Storage - Tables with Global Secondary Indexes (GSIs) for efficient querying
- OpenSearch Integration - Full-text search and analytics capabilities
- Automatic Indexing - Real-time indexing of insights, anomalies, and clusters
- Time-Series Analytics - Aggregations and analytics for metrics data
- Agentic AI Pipeline: Uses Strands Agents SDK to implement a multi-agent system
- Dual-mode Architecture: Supports both local development and AWS deployment
- Enhanced Data Persistence: DynamoDB tables with Global Secondary Indexes (GSIs) for efficient querying
- Full-text Search: AWS OpenSearch integration with automatic indexing and relevance scoring
- Advanced Analytics: Time-series analytics with aggregations and multiple aggregation types
- Proactive Insights: Correlates infrastructure metrics with support tickets
- RESTful API: Provides endpoints for insights, analysis, and health checks
- Scheduled Processing: Automated pipeline execution with configurable intervals
- Extensible Design: Modular architecture for adding new agents and capabilities
- Python 3.10+
- pip package manager
- Virtual environment (recommended)
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Install Strands Agents SDK:
pip install strands-agents strands-agents-tools
-
Copy the example environment file:
cp .env.example .env
-
Edit the .env file to set your configuration:
- Set
MODE=localfor local development orMODE=awsfor AWS deployment - Configure AWS credentials if using AWS mode
- Set OpenSearch configuration for AWS mode (endpoint, index prefix, SSL settings)
- Adjust other settings as needed
- Set
uvicorn main:app --reload --port 8000The API will be available at http://localhost:8000
For AWS deployment, the application can be deployed as Lambda functions with API Gateway.
GET /- Root endpoint with system informationGET /health- Health check endpointGET /health/config- System configurationGET /health/status- Detailed status informationGET /insights- List insights with paginationGET /insights/{id}- Get detailed insight informationDELETE /insights/{id}- Delete an insightGET /insights/{id}/related- Get related insightsPOST /analysis/run- Trigger on-demand analysisGET /analysis/status/{run_id}- Get analysis run statusGET /analysis/history- Get analysis run historyGET /search/insights- Full-text search for insights with filteringGET /search/analytics- Time-series analytics with aggregations
The agentic pipeline follows this workflow:
- Data Ingestion: Load recent metrics and tickets data
- Anomaly Detection: Identify unusual patterns in metrics
- Ticket Analysis: Cluster similar support tickets
- Correlation: Link anomalies with ticket clusters
- Insight Generation: Create actionable insights
- Data Indexing: Automatically index insights in OpenSearch
- Notification: Send proactive digests (if configured)
To add a new specialized agent:
- Create a new agent class in the
app/agents/directory - Inherit from
ProactivePulseAgent - Implement the agent's specific functionality
- Register the agent with the OrchestratorAgent
Run tests with pytest:
pytestFor AWS deployment, the application can be packaged as Lambda functions with API Gateway.
See the main project README for detailed deployment instructions.
MIT License - AWS Superhack AgenticAI Hackathon 2025