Skip to content

Abduliiz/Cursor-hacks

Repository files navigation

Agent Monitor - Multi-Agent Monitoring & Documentation Engine

A real-time monitoring and documentation engine for multi-agent workflows. Tracks agent activity, detects hallucinations, and manages agent replacement.

Architecture

Layer 1 - Real-Time Documentation: Continuously tracks every agent action and streams it into per-agent markdown files. Documents the model, prompt, files touched, and summaries.

Layer 2 - Real-Time Monitoring: Watches all agent markdown files for hallucinations. When detected: interrupts the agent, notifies the user, suggests prebuilt replacement agents from the registry, and onboards the new agent with full context.

Graph Visualization: Each agent's markdown file is rendered as a visual process graph showing steps, hallucination flags, and agent replacements.

Tech Stack

  • Framework: Next.js 16 (App Router)
  • Styling: TailwindCSS
  • Database: SQLite via Prisma
  • Real-time: Server-Sent Events (SSE)
  • File watching: chokidar
  • Graph: reactflow
  • State: Zustand

Getting Started

cp .env.example .env.local
# Add NIA_API_KEY and/or CLOD_API_KEY for Layer 2 (see below)

npm install
npx prisma migrate dev --name init
npx prisma generate
npx tsx prisma/seed.ts
npm run dev

Integrations (Layer 2 + shipping)

Integration Role
Nia POST https://apigcp.trynia.ai/v2/search with your API key. Index your repo or docs in Nia; optional NIA_SEARCH_REPOSITORIES scopes search.
CloD OpenAI-compatible LLM judge (CLOD_API_KEY, CLOD_BASE_URL).
Greptile PR merge gate on GitHub — see CONTRIBUTING.md. Optional webhook: POST /api/integrations/greptile with GREPTILE_WEBHOOK_SECRET.

Human-in-the-loop: POST /api/monitor/evaluate runs rules → Nia → CloD. If flagged, the agent moves to awaiting_replacement until a human confirms POST /api/agents/:id/replace with humanConfirmed: true.

Team

  • Abdulrahman: Layer 1 + Layer 2 engine, hallucination detection, agent registry
  • Abdullah: Graph visualization system
  • zaimen: Frontend, dashboard, UI components
  • Tejas: MCP integration, API routes, webhooks

Project Structure

src/
├── app/           # Next.js pages + API routes
├── engine/        # Core engine (Layer 1, Layer 2, MCP)
├── components/    # React components
├── hooks/         # Custom React hooks
├── lib/           # Utilities
└── store/         # Zustand stores

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages