Skip to content

feat(modules): agentic 404 to answer agents - #1429

Merged
larbish merged 1 commit into
mainfrom
feat/agent-404
Aug 26, 2026
Merged

feat(modules): agentic 404 to answer agents#1429
larbish merged 1 commit into
mainfrom
feat/agent-404

Conversation

@larbish

@larbish larbish commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Answer agent 404s with a markdown document listing the site's machine-readable entry points, instead of JSON error body. Comes from an Is Agentic scan of docus.dev, which flagged the JSON 404 as a dead end for crawlers.

# 404 — Page not found

`/wrongpath` was not found on this site.

## Where to look next

- [/llms.txt](/llms.txt): index of Docus
- [/llms-full.txt](/llms-full.txt): the full content of this site as a single markdown document
- [/sitemap.xml](/sitemap.xml): every page, with its last modification date
- [/.well-known/skills/index.json](/.well-known/skills/index.json): agent skills published by this site
- [/](/): home page

Changes

New module (layer/modules/not-found/)

Prepends a Nitro error handler that only answers page-ish 404s.

Browsers (text/html), API clients (application/json, /api/**, *.json), $fetch (sec-fetch-mode: cors) and assets keep the default error body. Response keeps its 404 status, plus Vary: Accept so CDNs don't mix the variants.

Links are resolved at build time so the document never points at a route the site doesn't serve: /llms-full.txt only when enabled, /.well-known/skills/index.json only when skills exist.

Opt out with docus.notFound: false.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docus Ready Ready Preview Aug 25, 2026 5:21pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-docus@1429
npm i https://pkg.pr.new/docus@1429

commit: 7de71f4

@larbish
larbish merged commit dab0da0 into main Aug 26, 2026
5 checks passed
@larbish
larbish deleted the feat/agent-404 branch August 26, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant