Spaces:
Runtime error

agentready / README.md
sk1999's picture
Deploy AgentReady v0.2.0 (Docker Space)
e014005 verified
|
Raw History Blame Contribute Delete
4.65 kB
---
title: AgentReady
emoji: "πŸ€–"
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 8000
pinned: false
license: mit
---
<!-- The YAML block above configures a Hugging Face Docker Space (see deploy/README.md,
"Option D"); it is ignored by GitHub/PyPI and other deploy targets. -->
# AgentReady
<!-- Replace OWNER/REPO with the GitHub slug after the repo is created (see docs/repo-setup.md). -->
[![CI](https://github.com/OWNER/REPO/actions/workflows/ci.yml/badge.svg)](https://github.com/OWNER/REPO/actions/workflows/ci.yml)
**Make your website legible to AI agents.** Point AgentReady at a domain and it
crawls the site, scores its **agent-readiness** honestly, and generates the
machine-facing artifacts agents need β€” an **`llms.txt`**, a **markdown mirror**,
and **schema.org JSON-LD** suggestions β€” plus a prioritized fix list.
> Status: **0.2.0 (alpha)** β€” a ground-up v2 rework. See
> [`AgentReady_Implementation_Plan_v2.md`](AgentReady_Implementation_Plan_v2.md).
## What it does
1. **Crawl** β€” polite, same-origin crawl with an **SSRF-safe** fetcher, a
`robots.txt` **AI-bot access matrix** (GPTBot, ClaudeBot, PerplexityBot,
Google-Extended, CCBot, Bingbot, …), and sitemap discovery.
2. **Extract** β€” `selectolax` parse with **main-content isolation** and a full
block model (headings, paragraphs, lists, tables, code, quotes) plus
render-mode detection (is the content there without running JS?).
3. **Score** β€” an honest **Agent-Readiness Score (0–100)** across **Access,
Renderability, Structure, Meaning, and Machine artifacts**. Access is a
**gate**: a great page that blocks AI crawlers scores near zero.
4. **Generate** β€” `llms.txt`, a per-page markdown mirror + index, JSON-LD
suggestions, and a manifest with per-page source hashes.
Two ways to run the same core: a **CLI/library** and a **FastAPI** hosted audit.
## Install
```bash
pip install -e ".[dev]" # dev extras: pytest, ruff, mypy
agentready --version
```
Requires Python 3.11+. Runtime deps: httpx, selectolax, pydantic, FastAPI, uvicorn.
## CLI
```bash
# Audit a site and print a report
agentready audit --url https://example.com --pages 10
# Write artifacts (llms.txt, markdown mirror, JSON-LD, manifest) + audit.json
agentready audit --url https://example.com --out ./out
# Machine-readable output
agentready audit --url https://example.com --json
```
## Hosted audit (web app + API)
```bash
agentready serve --port 8000 # then open http://127.0.0.1:8000
# or
docker compose up --build
```
API: `POST /api/audits {url, pages}` β†’ job id; `GET /api/audits/{id}` β†’ status +
result; `GET /api/audits/{id}/artifacts.zip` β†’ all artifacts; `GET /healthz`.
The hosted path always runs with SSRF protection on and per-IP rate limiting.
## Scoring
Deterministic and transparent β€” weights live in a versioned
[`scorespec.json`](src/agentready/score/scorespec.json) and every check emits
evidence and a fix. See [`docs/scoring.md`](docs/scoring.md) for the calibration
notes (why a site scores what it does, and why Access is a gate).
## Layout
```
src/agentready/
contracts/ # pydantic models (PageDoc, SiteDoc, CrawlResult, Check, SiteAudit, Artifact, ScoreSpec, JobEvent)
crawl/ # SSRF-safe fetch, robots AI-bot matrix, sitemap, frontier, crawler
extract/ # selectolax parse, block model, markdown mirror, render-mode
score/ # checks + engine + scorespec.json
artifacts/ # llms.txt, markdown mirror, JSON-LD, manifest
service/ # audit orchestration (crawl -> score -> artifacts)
api/ # FastAPI job API + static UI
cli.py
eval/ # labeled extraction eval + F1 gate
scripts/ # benchmark
fixtures/sites # perfect, js-shell, blocked, legacy-messy, docs-site
tests/ # pytest (crawl/extract/score/artifacts/service/api/eval)
```
## Development
```bash
make test # pytest
make lint # ruff
make typecheck # mypy
make eval # extraction precision/recall + F1 gate
make benchmark DOMAINS="example.com python.org"
```
## Security
The fetcher validates every resolved IP against private/loopback/link-local/
reserved/metadata ranges on each redirect hop, so hosting the audit does not turn
it into an internal-network scanner. Only audit domains you own or are authorized
to scan.
## Not yet (roadmap)
Optional JS-render path (Playwright), visibility monitoring across assistants,
multi-tenant billing/auth, CMS plugins, and the MCP action layer. Deferred until
the hosted audit is proven β€” see the implementation plan.
## License
[MIT](LICENSE). Changelog in [CHANGELOG.md](CHANGELOG.md).