Daily competitor intelligence agent for ProAgentStore. Monitors a list of competitor URLs, detects content changes, and generates AI-written reports with trend analysis.
- Cron fires at 07:00 UTC every day
- For each configured competitor URL, the agent fetches the page and strips HTML
- Content is SHA-256 hashed and compared to the previous snapshot stored in the Durable Object
- When a change is detected, Workers AI (
llama-3.3-70b) writes a 2-4 sentence change summary - After all competitors are checked, AI writes an executive briefing covering all changes
- The full report (summary + per-competitor items) is saved in the DO, keeping the last 90 days
All write endpoints require Authorization: Bearer <ADMIN_TOKEN>. Reads are public.
| Method | Path | Auth | Description |
|---|---|---|---|
POST |
/competitors |
yes | Add a competitor URL |
DELETE |
/competitors/:id |
yes | Remove a competitor |
GET |
/competitors |
no | List all competitors |
GET |
/reports |
no | List report summaries (latest first, ?limit=N) |
GET |
/reports/latest |
no | Full latest report with per-competitor items |
curl -X POST https://competitor-intel.proagentstore.online/competitors \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "label": "Example Co"}'curl https://competitor-intel.proagentstore.online/reports/latestpnpm install
wrangler deploywrangler secret put ADMIN_TOKEN
# then add to Doppler project pags:
doppler secrets set ADMIN_TOKEN=<value> --project pags --config prdUse the POST /competitors endpoint above. The cron runs automatically at 07:00 UTC.
pnpm dev
# Trigger the cron manually:
curl "http://localhost:8787/__scheduled?cron=0+7+*+*+*"| Binding | Type | Purpose |
|---|---|---|
AI |
Workers AI | Change summaries + executive briefings |
INTEL |
Durable Object | Competitor list, hash state, snapshots, reports |
| Key | Value | Description |
|---|---|---|
competitors |
Competitor[] |
All configured competitors |
state:<id> |
CompetitorState |
Hash + fetch/change timestamps per competitor |
snap:<id> |
string (truncated at 50KB) |
Previous text snapshot for AI diffing |
report:<iso-ts> |
ReportEntry |
Full report; last 90 retained |