A small Next.js app for drafting, testing, and explaining agent-permissions.json files. You can try it live at https://agent-permissions-tools.vercel.app/.
- Quick Builder: Toggle common rules (navigation, forms, downloads, rate limits) and copy a ready-to-ship JSON.
- Generator: Fetch a single landing page, stream intermediate logs, and get an LLM-generated draft policy. Shows any existing
.well-known/agent-permissions.json. - Parser / Explainer: Paste a policy to see human-friendly summaries of verbs, selectors, and directives.
- Themes: Light/dark toggle (defaults to system).
- Node.js 18+
OPENAI_API_KEYset in.env.local
npm install
npm run dev
# visit http://localhost:3000POST /api/generate– body:{ url: string, instructions?: string }- Returns crawl snapshot, existing policy (if found), streamed process log, and generated policy.
- Retrieval is single-page only; links are not crawled.
- Robots.txt is respected when present.
src/app/page.tsx– UI (tabs, builder, generator, parser)src/app/api/generate/route.ts– generation endpointsrc/lib/crawl.ts– single-page fetchersrc/lib/robots.ts– robots.txt handling