Skip to content

midenotch/CortiCops

Repository files navigation

Incident Commander Agent

A decentralized agentic application for Cortensor Hackathon #4 that autonomously monitors router/validator health, detects anomalies using redundant inference (Proof of Inference), and generates verifiable incident reports.

Features

Core Functionality

  • Live Health Dashboard: Real-time monitoring of router latency, validator uptime, and miner response times
  • Anomaly Detection Panel: Autonomous detection with Proof of Inference (PoI) cross-validation
  • Incident Timeline: Chronological feed of generated incidents with PoUW scoring
  • Mock Ticket Queue: Automated ticket creation and management
  • Agent Status Orb: Visual indicator of current agent state (monitoring → delegating → validating → reporting)
  • Configuration Panel: Environment settings and accessibility controls

Design Aesthetic

Built with a Glassmorphism/HUD design archetype featuring:

  • Deep space gradient backgrounds (#0a0e1a to #1a1f2e)
  • Translucent panels with backdrop blur effects
  • Neon accent palette (cyan #00d9ff, magenta #ff006e, amber #ffbe0b)
  • Animated glow borders and pulsing elements
  • Space Grotesk for headings, JetBrains Mono for data display

Key Interactions

  • Auto-Refresh Loop: Dashboard polls every 5 seconds for new metrics
  • Anomaly Drill-Down: Expandable cards showing PoI validation and raw data
  • Force Check: Manual trigger for immediate monitoring cycle
  • Ticket Actions: Acknowledge or resolve tickets in real-time
  • Agent Pause/Resume: Toggle autonomous monitoring on/off
  • Export Reports: Download verifiable JSON reports with cryptographic hashing
  • Reduce Motion: Accessibility toggle for animation-sensitive users

Technology Stack

  • Framework: React 18 + TypeScript + Vite
  • UI Components: shadcn/ui with Radix UI primitives
  • Styling: Tailwind CSS with custom glassmorphic utilities
  • Charts: Recharts for real-time metric visualization
  • Notifications: Sonner for toast notifications
  • Fonts: Space Grotesk, JetBrains Mono, Inter

Getting Started

Prerequisites

  • Node.js 18+
  • npm, yarn, pnpm, or bun

Installation

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Development

The application runs in mock mode by default, simulating Cortensor network behavior without requiring API keys. All monitoring data, anomalies, and incidents are generated locally for development and demonstration purposes.

Architecture

Component Structure

src/
├── components/
│   ├── dashboard/
│   │   ├── IncidentCommanderDashboard.tsx  # Main dashboard container
│   │   ├── HealthDashboard.tsx             # Metric cards with charts
│   │   ├── AnomalyPanel.tsx                # Anomaly detection display
│   │   ├── IncidentTimeline.tsx            # Incident history feed
│   │   ├── TicketQueue.tsx                 # Ticket management
│   │   ├── AgentStatusOrb.tsx              # Agent state indicator
│   │   └── ConfigurationPanel.tsx          # Settings modal
│   └── ui/                                  # shadcn components
├── lib/
│   ├── mockData.ts                          # Data generation utilities
│   └── utils.ts                             # Helper functions
└── types/
    └── incident.ts                          # TypeScript definitions

State Management

  • React hooks for local state management
  • 5-second polling interval for metrics updates
  • Random anomaly generation (30% probability per cycle)
  • Automatic incident creation for warning/critical anomalies
  • Auto-ticket generation with status tracking

Deployment

This application is optimized for deployment on:

  • Vercel
  • Netlify
  • Static hosting services

Simply run npm run build and deploy the dist/ directory.

Hackathon Context

Built for Cortensor Hackathon #4 to demonstrate:

  • Autonomous agent orchestration
  • Proof of Inference validation
  • Proof of Useful Work scoring
  • Decentralized infrastructure monitoring
  • Real-time anomaly detection

License

MIT License - Built for Cortensor Hackathon #4

Acknowledgments

  • Cortensor team for hackathon infrastructure
  • shadcn for the exceptional UI component library
  • Radix UI for accessible primitives

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages