Autonomous Competitive Intelligence Agent That Self-Improves
Built for the Self-Improving Agents Hackathon — NYC 2.21.2026
WebWatcher is an autonomous AI agent that:
- Monitors competitor websites in real-time using Google DeepMind's Gemini 3 Pro
- Detects strategic changes (pricing, features, messaging)
- Scores relevance using Braintrust's evaluation framework
- Self-Improves by rewriting its own detection prompts when scores drop
- Visualizes intelligence in a live dashboard with embedded charts
The "Wow" Factor: Watch the agent autonomously rewrite its own prompt file when it detects low relevance scores — true self-improvement in action.
- Google DeepMind — Gemini 2.0 Flash (URL reading, change detection)
- Braintrust — Self-improvement engine (scoring, prompt evolution)
- Lightdash — Live intelligence dashboard (embedded charts)
- Backend: Node.js + TypeScript + Express
- Frontend: React + TypeScript + Vite
- Visualization: Recharts
- Storage: JSON files (lightweight)
# Backend
npm install
# Frontend
cd frontend && npm install && cd ..cp .env.example .env
# Fill in your API keys in .env- Gemini: https://aistudio.google.com/apikey
- Braintrust: https://www.braintrust.dev → Settings → API Keys
- Lightdash: https://app.lightdash.cloud → Settings → API tokens
- Airia: https://app.airia.ai → Settings → API Keys
# Terminal 1: Backend API
npm run dev:api
# Terminal 2: Agent (optional, runs on schedule)
npm run dev:agent
# Terminal 3: Frontend
npm run dev:frontendnpm run seedTopDog-Competitor-WebWatcher/
├── agent/ # Core agent logic
│ ├── index.ts # Main agent loop
│ ├── gemini.ts # Gemini integration
│ ├── braintrust.ts # Braintrust scoring + self-improvement
│ ├── lightdash.ts # Lightdash integration
│ ├── prompts.ts # Detection prompts (self-rewritten)
│ └── store.ts # JSON file storage
├── api/ # Express REST API
│ ├── server.ts # Express app
│ └── routes/ # API endpoints
├── frontend/ # React dashboard
│ └── src/
│ ├── components/ # UI components
│ └── lib/ # API client
├── data/ # JSON storage (signals, scores, history)
├── scripts/ # Utility scripts (seed, etc.)
└── .env # API keys (not in git)
- 0:00-0:30 — Show dashboard with 3 competitor URLs
- 0:30-1:30 — Click "Run Agent", watch signals appear
- 1:30-2:30 — Show self-improvement (prompt rewrite)
- 2:30-3:00 — Show score trends and impact
- ✅ Real-time competitor monitoring
- ✅ Strategic change detection (pricing, features, messaging)
- ✅ Relevance scoring via Braintrust
- ✅ Autonomous prompt rewriting
- ✅ Live dashboard visualization
- ✅ Real-time updates (1-5 second polling)
- Autonomy: ✅ Agent runs without manual intervention, self-improves
- Idea: ✅ Solves real competitive intelligence pain point
- Technical Implementation: ✅ Clean architecture, 3 sponsor tools integrated
- Tool Use: ✅ Google DeepMind + Braintrust + Lightdash
- Presentation: ✅ 3-minute demo with visual wow factor
- See
PROJECT_SPECIFICATION.mdfor detailed specs - See
BUILD_CHECKLIST.mdfor step-by-step build guide - Pause after each step to test before proceeding
CORS Error: Add app.use(cors({ origin: '*' })) to api/server.ts
API Keys Not Working: Double-check .env file, ensure no extra spaces
Agent Too Slow: Use seed data for demo, show one live call
Lightdash Not Configured: Use embedded Recharts as fallback
Built for hackathon submission — 2.21.2026
Built with ❤️ for the Self-Improving Agents Hackathon