Leadtype
Documentation

Leadtype

Leadtype is a docs pipeline for teams that want one MDX source to serve humans and agents. Write docs once, render them in your app, then generate the files agents need: markdown mirrors, llms.txt, root llms-full.txt, search JSON, Agent Readability metadata, and package-bundled AGENTS.md output.

It is not a docs website framework. Bring your own host and UI — a custom Next.js app, TanStack Start, Nuxt, Astro, SvelteKit, Fumadocs, anything — and let leadtype handle conversion, validation, search, and the agent-facing outputs it specializes in.

Rendering diagram...

Pick your path

You're building a docs websiteQuickstart — render MDX in your app and generate llms.txt, markdown mirrors, search, and discovery files for HTTP agents.

You're shipping docs inside an npm packageBundle docs into a package — generate an AGENTS.md plus per-topic markdown that ships in the tarball so coding agents read version-matched docs from node_modules. Agents that install your package then run cheaper and stop confidently guessing wrong about your API — see the evals.

You have a site without a docs tree — a CMS-backed blog, a marketing site, a data-driven app — Generate artifacts without a docs tree — hand generateAgentArtifacts() an in-memory page list and get the same agent artifact set, no .mdx files required.

Just want the mental model first? — How it works — the pipeline, the two output modes, and every artifact named once.

Key terms

These show up throughout the docs. The full glossary lives in How it works → Vocabulary.

  • Site mode — the default leadtype generate. Writes website artifacts to public/: llms.txt, markdown mirrors, search index, sitemap, robots, Agent Readability files.
  • Bundle modeleadtype generate --bundle. Writes AGENTS.md + relative docs/*.md into a package directory so coding agents can read them from node_modules after install. If agents.mcp.enabled is set, it also includes package-local MCP retrieval files.
  • Agent Readability — the structured discovery and attribution data (agent-readability.json + JSON-LD + sitemap + markdown alternate links) that lets agents fetch, identify, and cite docs without scraping HTML.

What leadtype can do

Leadtype is a pipeline, not a website framework — it pairs with a custom docs app or layers under Fumadocs, Starlight, and friends. See Methodology for where it fits.