---
title: Leadtype
description: >-
  One MDX source. Hosted docs artifacts, package-bundled AGENTS.md, and search
  output from the same pipeline.
group: get-started
lastModified: '2026-05-11T20:02:32-07:00'
lastAuthor: 'github-actions[bot]'
---
# Leadtype

Leadtype is a **docs pipeline**. You write MDX in one place. It produces the generated artifacts your docs 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 UI — Next.js, TanStack Start, Astro, anything — and let leadtype handle conversion, validation, search, and the agent-facing outputs that website frameworks don't ship.

```mermaid
`flowchart LR
src["docs/*.mdx / (your source)"]
site_run["leadtype generate"]
bundle_run["leadtype generate --bundle"]
site_out["public/ / llms.txt · llms-full.txt / docs/*.md · sitemap / agent-readability.json"]
bundle_out["packages/&lt;name&gt;/ / AGENTS.md · docs/*.md"]
humans["Humans / (browser)"]
http_agents["HTTP agents / (via /llms.txt or / Accept: text/markdown)"]
search["Search UI / AI answers"]
offline_agents["Coding agents / can read version-matched / node_modules/&lt;pkg&gt;/AGENTS.md"]
src --> site_run
src --> bundle_run
site_run --> site_out
bundle_run --> bundle_out
site_out --> humans
site_out --> http_agents
site_out --> search
bundle_out --> offline_agents`
```

## Choose your path

Pick the job that matches what you are building. Each path starts with the minimum setup, then links to the lower-level API reference only when you need it.

* [Connect a docs site](/docs/build/connect-docs-site)
* [Add search](/docs/build/add-search)
* [Ship docs in your package](/docs/package-docs/bundle)

## What you get

1. **Write once** Author MDX with familiar components — `Callout`, `Tabs`, `Steps`, `Mermaid`, `TypeTable`, and others. Add `group:` in frontmatter to place pages in the navigation tree.

2. **Run \`leadtype generate\`** For a website: converts MDX to markdown, builds `llms.txt` plus root `llms-full.txt`, generates a search index, writes Agent Readability discovery files, and resolves navigation. With `--bundle`: emits `AGENTS.md` plus per-topic `.md` files with relative links that still work after npm install.

3. **Serve all of it** Humans get HTML from your app. HTTP agents get markdown via content negotiation or `/llms.txt`. Package consumers can point their root `AGENTS.md` or README at `node_modules/<your-pkg>/AGENTS.md` for version-matched offline docs.

## Next

* New here? Read the **[Quickstart](/docs/quickstart)** — five minutes to generated output.
* Want the mental model first? Read **[How it works](/docs/how-it-works)** for the pipeline diagram and the names of every artifact it produces.
* Comparing tools? See **[Methodology](/docs/methodology)** for how leadtype differs from Fumadocs, Starlight, and Mintlify.
