Skip to content

imryanl3/agentdoor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentDoor

Lighthouse for the AI Agent Era

AgentDoor scans any website and produces an Agent Readiness Score (0–100) measuring how well the site works with AI agents. It identifies specific issues across 5 dimensions and provides actionable fix recommendations.

Just as Google Lighthouse measures website performance for browsers, AgentDoor measures website readiness for AI agents.

Why This Matters

AI agents (Claude, GPT, OpenClaw, Gemini) are shifting from answering questions to taking action on the web — placing orders, managing accounts, booking appointments. Websites that work well with agents will capture this traffic. Those that don't will lose it.

AgentDoor answers the simplest question no one has answered yet: "Does my website work well with AI Agents? If not, how do I fix it?"

Scoring System

Dimension Weight What It Measures
Readability 25 pts Schema.org markup, semantic HTML, content without JS, meta/OG tags
Structured Data 25 pts JSON-LD, OpenAPI spec, llms.txt, structured pricing/product data
Navigability 20 pts sitemap.xml, crawlable links, page hierarchy, breadcrumbs
Actionability 20 pts Form labels, CAPTCHA-free forms, CTA buttons, no anti-bot blocking
Discoverability 10 pts robots.txt allows agents, llms.txt, MCP endpoint, agent sitemap

Grades: A+ (90–100), A (80–89), B (70–79), C (60–69), D (40–59), F (0–39)

Quick Start

Prerequisites

  • Node.js 18+
  • npm

Setup

git clone <repo-url> && cd AgentDoor
npm install
npx playwright install chromium

Run

Terminal 1 — Backend API (port 3001):

npm run dev

Terminal 2 — Frontend (port 3000):

cd frontend && npm run dev

Open http://localhost:3000 in your browser.

Test via curl

# Single scan
curl -X POST http://localhost:3001/api/scan \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://stripe.com"}'

# Compare two sites
curl -X POST http://localhost:3001/api/compare \
  -H 'Content-Type: application/json' \
  -d '{"urls": ["https://stripe.com", "https://example.com"]}'

Enable AI Analysis (optional)

ANTHROPIC_API_KEY=sk-ant-... npm run dev

When set, the scanner uses Claude to generate an executive summary, llms.txt content, and enhanced recommendations. Without it, all 21 rule-based checks still run normally.

Architecture

Frontend (Next.js :3000)  →  Backend API (Express :3001)  →  Scanner (Playwright)
                                                           →  Claude API (optional)

The backend is stateless — each POST /api/scan triggers the full pipeline:

  1. Playwright loads the page (headless Chromium, 15s timeout, images/fonts blocked for speed)
  2. Extracts HTML, meta tags, JSON-LD, forms, links, robots.txt, llms.txt, sitemap.xml, MCP endpoint — all in parallel
  3. Runs 5 check modules (21 individual checks) to produce dimension scores
  4. Scoring engine aggregates into total score + grade
  5. (Optional) Claude API generates summary and recommendations

API

POST /api/scan

// Request
{ "url": "https://example.com" }

// Response
{
  "url": "https://example.com",
  "scannedAt": "2026-02-24T10:30:00Z",
  "score": 47,
  "grade": "D",
  "label": "Needs Work",
  "dimensions": { ... },
  "topIssues": [ ... ],
  "generatedFixes": { "llmsTxt": "..." },
  "aiSummary": "...",
  "aiRecommendations": [ ... ]
}

POST /api/compare

// Request
{ "urls": ["https://stripe.com", "https://example.com"] }

// Response
{ "reports": [ <report1>, <report2> ] }

Tech Stack

Layer Technology
Frontend Next.js 16, Tailwind CSS, React
Backend Node.js, Express, TypeScript
Scanner Playwright (headless Chromium)
AI Claude API (Anthropic SDK) — optional

Project Structure

├── src/
│   ├── server.ts                    # Express API server
│   └── scanner/
│       ├── types.ts                 # Shared TypeScript interfaces
│       ├── crawler.ts               # Playwright page loader + data extractor
│       ├── scoring.ts               # Score aggregation + grade mapping
│       ├── ai/analyzer.ts           # Claude API integration (optional)
│       └── checkers/
│           ├── readability.ts       # 5 checks, 25 pts
│           ├── structuredData.ts    # 4 checks, 25 pts
│           ├── navigability.ts      # 4 checks, 20 pts
│           ├── actionability.ts     # 4 checks, 20 pts
│           └── discoverability.ts   # 4 checks, 10 pts
├── frontend/
│   └── app/
│       ├── page.tsx                 # Main UI (scan + compare mode)
│       ├── components/              # ScoreGauge, DimensionBars, IssuesList, etc.
│       └── fixtures/demos.ts        # Pre-scanned demo data for fallback
├── spec.md                          # Full product specification
└── CLAUDE.md                        # AI assistant context

Demo Mode

The frontend includes 3 pre-scanned demo fixtures (stripe.com, github.com, example.com) that load instantly. If the backend is unavailable, scanning a demo URL automatically falls back to cached data — useful for presentations without a live internet connection.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors