404agent-404

Self-healing 404s for AI agents & crawlers

Your pages moved.AI agents still get the right answer.

agent-404 answers dead URLs at the HTTP layer — docs, product, pricing, any page in your sitemap. Cursor, Claude, and search bots get the closest live page in a Link header and JSON-LD, while your 404 stays an honest 404. Three lines of middleware, under 25ms at the edge.

Free to start · no credit card · sitemap sync included

  • 3 lines of middleware
  • <25ms edge resolution
  • 60s to install
  • MIT open source
request traceedge · 18ms
GET/api/v1/authentication404
01
Matcher96.4% · moved
02
Recovery evidenceLink + JSON-LD
03
Followed destination/api/v2/auth
HTTP/1.1 404 Not Found
Link: </api/v2/auth>; rel="alternate"
X-Agent-404-Match: moved
X-Agent-404-Score: 0.964
Recovers the agents that still remember your old URLs

The recovery contract

A 404 can be both honest and useful.

Keep the correct HTTP status. Attach the evidence an automated client needs to recover in one hop. Measure whether it followed.

  1. 404 requestIntercept the dead route

    The adapter runs only after your application resolves the request as missing.

  2. MatcherRank the current sitemap

    Path, language, metadata, and semantic signals pick the closest live document.

  3. Link / JSON-LDReturn portable evidence

    Standards-based hints work across crawlers instead of requiring a product-specific client.

  4. DestinationObserve the recovery

    The dashboard connects the suggestion to the follow so you can see what was actually saved.

Install at the boundary

Small adapter. Managed recovery index.

Keep the integration beside routing. agent-404 handles sitemap synchronization, matching, telemetry, and operator diagnostics.

Inspect a live response
proxy.ts
import { agent404 } from "@agent404/next";

export const proxy = agent404({
  publicKey: process.env.AGENT404_PUBLIC_KEY!,
  siteId: process.env.AGENT404_SITE_ID!,
});

Operate it like infrastructure

One place to answer “is recovery working?”

Portfolio

Every site, one status each

Switch between domains without stacking dashboards or mixing one site’s evidence into another.

Diagnosis

One recommended next action

Verification, indexing, install health, and recovery have distinct remediation paths.

Evidence

Inspect the protocol, not a vanity score

See the request, alternate destination, agent category, latency, and follow outcome.

Your next broken link can recover itself

Give old URLs a route forward.