Skip to content

panforrest/TopDog-Competitor-WebWatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👁 TopDog-Competitor-WebWatcher

Autonomous Competitive Intelligence Agent That Self-Improves

Built for the Self-Improving Agents Hackathon — NYC 2.21.2026


🎯 What It Does

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.


🛠️ Tech Stack

Sponsor Tools (3 tools integrated)

  • Google DeepMind — Gemini 2.0 Flash (URL reading, change detection)
  • Braintrust — Self-improvement engine (scoring, prompt evolution)
  • Lightdash — Live intelligence dashboard (embedded charts)

Supporting Stack

  • Backend: Node.js + TypeScript + Express
  • Frontend: React + TypeScript + Vite
  • Visualization: Recharts
  • Storage: JSON files (lightweight)

🚀 Quick Start

1. Install Dependencies

# Backend
npm install

# Frontend
cd frontend && npm install && cd ..

2. Set Up Environment Variables

cp .env.example .env
# Fill in your API keys in .env

3. Get API Keys

4. Run the Application

# 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:frontend

5. Seed Demo Data (Optional)

npm run seed

📁 Project Structure

TopDog-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)

🎬 Demo Flow

  1. 0:00-0:30 — Show dashboard with 3 competitor URLs
  2. 0:30-1:30 — Click "Run Agent", watch signals appear
  3. 1:30-2:30 — Show self-improvement (prompt rewrite)
  4. 2:30-3:00 — Show score trends and impact

📊 Key Features

  • ✅ 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)

🏆 Judging Criteria Alignment

  • 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

📝 Development Notes

  • See PROJECT_SPECIFICATION.md for detailed specs
  • See BUILD_CHECKLIST.md for step-by-step build guide
  • Pause after each step to test before proceeding

🆘 Troubleshooting

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


📄 License

Built for hackathon submission — 2.21.2026


Built with ❤️ for the Self-Improving Agents Hackathon

About

Autonomous competitive intelligence agent that self-improves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors