OpsPulse for Alexa+: Autonomous CloudOps & SRE Copilot Inspiration When production outages occur at 3:00 AM, every second spent context-switching between complex observability dashboards, terminal consoles, and incident chat channels amplifies downtime cost. We observed that while Site Reliability Engineers (SREs) know precisely what telemetry they need, the mechanics of querying multi-region clusters, parsing verbose stack traces, and triggering canary rollbacks introduces significant human cognitive friction. With Amazon opening Alexa+ to outside developers alongside the Model Context Protocol (MCP), we recognized an inflection point: smart ambient voice devices can become active, reliable incident command cockpits. We were inspired to build OpsPulse—a zero-friction bridge that connects hands-free Alexa+ voice interactions directly to enterprise cloud infrastructure, orchestrating triage and emergency rollbacks through open-standard agentic tooling. What It Does OpsPulse turns any Alexa+-enabled interface into an automated SRE copilot powered by a self-hosted Streamable HTTP MCP server:
- Conversational Infrastructure Telemetry: Ingests voice requests like "Alexa, check health for payments-service" and instantly surfaces real-time latency distributions, replica health, and active alarms.
- GenAI Root-Cause Triage (Amazon Bedrock): Dispatches dense application error logs and stack traces to Anthropic Claude 3.5 Sonnet on AWS Bedrock to extract root causes and suggest actionable remediation playbooks in seconds.
- Autonomous Remediation: Executes safe canary traffic draining and service deployment rollbacks on command ("Alexa, rollback payments-service to version v2.4.1"), immediately confirming the transition from DEGRADED to HEALTHY.
- Live Protocol Telemetry: Surfaces transparent, real-time JSON-RPC 2.0 inspectability alongside spoken responses, ensuring developers maintain auditability and deterministic control over autonomous agent actions. How We Built It We designed OpsPulse around a decoupled, three-tier architecture adhering to open standards: ┌────────────────────────────────────────────────────────┐ │ Simulated Alexa+ Cockpit UI │ │ (Glassmorphic Dark UI + Web Speech API + TTS) │ └───────────────────────────┬────────────────────────────┘ │ SSE Handshake / Streamable HTTP ┌───────────────────────────▼────────────────────────────┐ │ Self-Hosted MCP Server (FastAPI / Starlette) │ │ - Spec: 2025-11-25+ Streamable HTTP Transport │ │ - Endpoints: GET /mcp/sse, POST /mcp/message │ │ - Tools: get_service_health, trigger_rollback │ └─────────────┬────────────────────────────┬─────────────┘ │ Boto3 SDK (Async Executor) │ ┌─────────────▼──────────────┐ ▼ │ Amazon Bedrock │ ┌──────────────────────┐ │ Claude 3.5 Sonnet Engine │ │ SRE Catalog Mutator │ │ (AWS Builder Track) │ │ & Health Transitions │ └────────────────────────────┘ └──────────────────────┘
- MCP Server & Streamable HTTP Transport
We implemented the backend using Starlette and FastAPI running on Uvicorn, adhering strictly to the 2025-11-25 MCP specification:
- GET /mcp/sse: Establishes the Server-Sent Events stream, immediately negotiating an active session by yielding event: endpoint\ndata: /mcp/message\n\n with a 20-second keep-alive loop.
- POST /mcp/message: Routes JSON-RPC 2.0 messages across initialize, notifications/initialized, tools/list, and tools/call.
- SRE Domain Engine & Amazon Bedrock
- Tool Layer: Exposes schema-validated tools (get_service_health, trigger_rollback, and analyze_incident_log).
- Bedrock Integration: Uses boto3 to offload inference requests to anthropic.claude-3-5-sonnet-20240620-v1:0. To protect the event loop from blocking I/O during model generation, calls are wrapped inside asynchronous thread executors. We implemented local fallback rule-based diagnostic generators to ensure uninterrupted evaluation even when AWS credentials are offline.
- Quantitative SRE Modeling To calculate health state and evaluate error budgets in our telemetry calculations, we implemented latency percentiles and error-budget burn formulas directly into the service catalog: When the burn rate exceeds the predefined safety bound, the catalog flags the service as DEGRADED, prompting the autonomous rollback pathway.
- Alexa+ Cockpit Client Simulator
Built with modern HTML5, CSS3 glassmorphism, and vanilla JavaScript:
- Incorporates a dynamic voice ring/orb with distinct keyframe animations for IDLE, LISTENING, THINKING, and SPEAKING states.
- Implements the Web Speech API for hands-free voice dictation and synthetic text-to-speech feedback.
- Houses a dual-stream inspector panel rendering live JSON-RPC request and response telemetry payloads. Challenges We Faced
- MCP SDK Global Reference Leak & SSE Deadlock: During initial testing of the official mcp SDK (v2.2.0), low-level mcp.server.Server lacked specific high-level tool decorators, raising an unhandled attribute error. Because reference pointers (sdk_mcp_server) remained non-null in memory, incoming GET /mcp/sse connections were redirected into an uninitialized transport rather than falling back to the native SSE session generator, resulting in client connection deadlocks. We resolved this by sanitizing fallback exceptions to guarantee clean failover to our native Starlette SSE pipeline.
- Full-Duplex Session Synchronization: Coordinating asynchronous voice recognition events, browser speech synthesis queues, and incoming SSE transport chunks without freezing the DOM required building a custom event queue in the frontend, preventing audio stutter and race conditions.
- Asynchronous Non-Blocking LLM Invocations: Initial synchronous calls to Amazon Bedrock through boto3 caused slight delays in the FastAPI event loop, temporarily stalling incoming SSE keep-alive heartbeats. Wrapping Bedrock calls in asynchronous execution workers (asyncio.to_thread) restored sub-millisecond event loop responsiveness. What We Learned
- The Power of the Model Context Protocol: Standardizing tool exposure via JSON-RPC over Streamable HTTP abstracts away proprietary assistant plumbing. Writing tools once under MCP allows them to be consumed flexibly across Alexa+, agent workbenches, and browser clients.
- Resilient Agent Design: High-stakes DevOps workflows require agents that provide clear auditability. Pairing conversational voice outputs with live telemetry payload viewers builds trust and prevents catastrophic command execution.
- Hybrid Cloud Fallback Architecture: Hackathons and edge environments encounter intermittent connectivity; engineering transparent fallback mechanisms ensures demo-day reliability while highlighting modern cloud intelligence when connected to Amazon Bedrock.
Built With
- amazon-bedrock
- aws-boto3
- claude-3-5-sonnet
- css3
- fastapi
- html5
- javascript
- mcp
- model-context-protocol
- python
- sse
- starlette
- uvicorn
- web-speech-api
Log in or sign up for Devpost to join the conversation.