Skip to content

ChesterCaii/FlowPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlowPilot

An AI-powered incident response agent that automates on-call duties using AWS Bedrock, Temporal, and sponsor integrations.

Overview

FlowPilot is a SaaS agent that "stands in" for your on-call engineer. It:

  1. Senses CloudWatch alarms via webhook
  2. Reasons via AWS Bedrock (Claude or Titan)
  3. Executes remediation actions (pod restarts via kubectl or Block/Goose)
  4. Communicates with multi-language reports (DeepL), diagrams, and voice alerts (Rime)

Built on Temporal for durable workflows and wrapped in MCP so the LLM can directly call out to sponsor tools.

Key Features

  • 🧠 AI-Driven Decision Making: Uses AWS Bedrock (Claude 3 Sonnet) to decide whether to reboot or ignore alerts
  • 🔄 Automated Remediation: Executes kubernetes commands to restart failing services
  • 🌎 Multi-Language Reports: Automatically translates incident reports to French and German using DeepL
  • 📊 Visual Incident Diagrams: Generates system diagrams of affected components
  • 🔊 Voice Alerts: Converts incident reports to voice alerts using Rime
  • ⏱️ Durable Workflows: Built on Temporal to ensure reliable execution even during failures
  • 🖥️ Interactive Dashboard: Web UI to monitor incidents, view diagrams, and hear voice alerts

Integrations

  • Temporal: Core workflow orchestration with durable execution and retries
  • AWS Bedrock: AI decisioning using Claude 3 Sonnet model
  • DeepL: Multi-language translation of incident reports
  • Block/Goose: Secure command execution (simulated in development)
  • Rime: Voice alert generation for audible notifications
  • MCP/guMCP Protocol: Standardized agent-to-agent communication

Setup Instructions

Prerequisites

  • Node.js 18+ and npm
  • Temporal server (local dev or cloud)
  • AWS account with Bedrock access
  • Sponsor API keys (see .env configuration)

Installation

  1. Clone the repository
git clone https://github.com/your-username/flowpilot.git
cd flowpilot
  1. Install dependencies
npm install
  1. Create a .env file based on required variables:
# AWS Bedrock Configuration
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
BEDROCK_MODEL_ID=anthropic.claude-3-sonnet-20240229-v1:0

# DeepL API for multi-language translation
DEEPL_API_KEY=your_deepl_api_key

# Rime for voice alerts
RIME_KEY=your_rime_api_key

# Block/Goose (if using)
BLOCK_GOOSE_API_KEY=your_goose_api_key

Running the Application

  1. Use our all-in-one demo script
chmod +x demo.sh
./demo.sh

Or run services individually:

  1. Start Temporal server (in a separate terminal)
npm run dev:temporal
  1. Start the worker (in a separate terminal)
npm run dev:worker
  1. Start the API server (in a separate terminal)
npm run dev:api
  1. Access the Web UI
open http://localhost:3000
  1. Trigger a test incident
curl -X POST http://localhost:3000/alarm -H "Content-Type: application/json" -d '{"AlarmName": "high-cpu-usage"}'

Interactive Web Dashboard

The FlowPilot web dashboard provides a real-time view of your incident response system:

  • Incident Monitoring: View all current and past incidents
  • AI Decision Tracking: See what decisions were made for each alert
  • Visualization: View system diagrams of affected components
  • Voice Playback: Listen to voice alerts directly in the browser
  • Quick Actions: Trigger test alerts to see the system in action
  • Integration Status: See which sponsor integrations are active

Access the dashboard at http://localhost:3000 when the API server is running.

Testing

To test FlowPilot without external dependencies, you can:

  1. Use the test script
npm run test
  1. Or directly call the workflow
npx ts-node src/test.ts

Demo Scenarios

For hackathon demonstrations, I've prepared several scenarios:

  1. High CPU Usage: Simulates a service with excessive CPU consumption
  2. Memory Leak: Demonstrates the system detecting and remedying a memory leak
  3. API Failure: Shows how the system handles connectivity issues
  4. MCP/A2A Protocol Demo: Demonstrates agent-to-agent communication

Run a full demo with ./demo.sh and select option 5.

Project Structure

  • /src - Main source code
    • /activities.ts - Core activities with sponsor integrations
    • /agent.ts - Express API for receiving alerts
    • /worker.ts - Temporal worker configuration
    • /mcp.ts - MCP wrapper for activities
    • /workflows/diagnose.ts - Main workflow definition
    • /protocols/mcpAdapter.ts - MCP/A2A protocol implementation
    • /mcp-integration.ts - MCP demo functionality
  • /public - Web UI dashboard
  • /diagrams - Generated system visualizations (created at runtime)
  • /audio - Generated voice alerts (created at runtime)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors