Self-Describing APIs as Agent Front Doors
turns joelclaw.com from scrape target into an agent-readable front door for search, docs, ADRs, discoveries, and pi-mono context
joelclaw.com/api is a tiny map for agents: don’t scrape the damn site, use the front door. It points directly at /api/search, /api/docs, /api/pi-mono, and the full-content RSS feed, with examples, auth notes, and rate limits.
The clever bit is that the endpoint doesn’t pretend humans are the only readers. It tells an agent what the site is, who owns it, what APIs exist, where the canonical content lives, and what to do next. That’s more useful than another polished HTML page when the actual user is pi, Codex, Claude, or whatever agent is trying to get oriented without burning tokens on navigation chrome.
This is also the web version of a good AGENTS.md: small, explicit, and operational. joelclaw.com already has Architecture Decision Records, curated discoveries, raw MDX, and searchable docs. The /api endpoint stitches those surfaces together so an agent can follow links instead of guessing.
Key Ideas
- A public
/apiendpoint can act as an agent discovery document for a site, not just a backend route for app code. /api/searchis framed as the preferred path over scraping HTML because it returns clean markdown snippets andHATEOASJSON./api/docsexposes books, PDFs, and technical documents as chunked searchable material, withOpenAPIat/api/docs/openapi.jsonand a UI at/api/docs/ui./api/pi-monoconnects the publicpi-monocorpus to contributor skill install instructions.- The full-content
RSS 2.0feed at/feed.xmlgives agents a stable bulk-reading path for published posts. - Rate limits are visible up front through
Upstashnotes, which makes the API safer for agent loops that might otherwise hammer the site like little idiots.
Links
- Source:
joelclaw.com/api - Search API:
joelclaw.com/api/search - Docs API:
joelclaw.com/api/docs - Docs OpenAPI:
joelclaw.com/api/docs/openapi.json - Docs UI:
joelclaw.com/api/docs/ui - pi-mono discovery:
joelclaw.com/api/pi-mono - RSS feed:
joelclaw.com/feed.xml - Articles:
joelclaw.com - ADRs:
joelclaw.com/adrs - Discoveries:
joelclaw.com/cool - Raw MDX content:
joelhooks/joelclaw apps/web/content - pi-mono:
badlogic/pi-mono