Comprehensive guide for writing and updating Prefect documentation. Use when creating new doc pages, updating existing docs, or working with Mintlify components and code example testing.
This guide covers everything needed to write, update, and test Prefect documentation pages. For structural context (directory layout, navigation, links, local dev commands), see docs/AGENTS.md.
Each section of the docs serves a distinct purpose. Place new content in the right section and match its tone and structure.
v3/get-started/)Onboarding pages for new users. Content should be linear, opinionated, and get the reader to a working result as fast as possible. Use <Steps> for sequential instructions and <Tabs> to offer Cloud vs. self-hosted paths. Minimize explanation — link to Concepts for deeper understanding.
v3/concepts/)Explain what something is and why it matters. Concepts pages define Prefect's mental model — flows, tasks, states, deployments, events, work pools, etc. Start with a short code example showing the concept in action, then explain the underlying model, lifecycle, and relationships to other concepts. Link to How-to Guides for step-by-step instructions. Do not provide exhaustive procedural walkthroughs here.
v3/how-to-guides/)Task-oriented pages that show how to accomplish a specific goal. Each page should solve one problem (e.g., "How to write and run a workflow", "How to set up retries"). Structure as a series of actionable steps with code examples. Meet the reader where they are — do not assume familiarity with Prefect internals. Use the smallest amount of Prefect-specific jargon possible, and explain or link terms when they are unavoidable.
Guides are organized into the following categories:
workflows/ — Writing, running, and customizing flows and tasks: retries, caching, concurrency, logging, testing, runtime info, state hooks, and artifacts.deployments/ — Creating, scheduling, running, and versioning deployments, including prefect.yaml configuration and flow code storage.deployment_infra/ — Running workflows on specific infrastructure: Docker, Kubernetes, serverless platforms (AWS ECS, Azure ACI, GCP Cloud Run), Modal, Coiled, Prefect Managed, and local processes. Also covers work pool management.automations/ — Setting up event-driven automations: creating automations and triggers, chaining deployments via events, custom notifications, and accessing event payloads in flows.cloud/ — Prefect Cloud-specific operations: connecting to Cloud, managing workspaces and users, creating webhooks, and troubleshooting.configuration/ — Configuring the Prefect environment: managing settings, storing secrets, and using variables.ai/ — Using Prefect with AI tooling, such as the Prefect MCP server.migrate/ — Upgrading from older Prefect versions or migrating from other tools like Airflow.self-hosted/ — Running the Prefect server yourself via Docker Compose, the CLI, or on Windows.v3/advanced/)In-depth pages for experienced users covering topics like transactions, interactive workflows, infrastructure-as-code, scaling self-hosted deployments, and custom API integrations. These assume familiarity with core concepts and how-to patterns. They can be longer and more detailed than how-to guides.
v3/examples/)Auto-generated — do not edit directly. Each page is generated from a standalone Python file in the repo's top-level examples/ directory by generate_example_pages.py. To add an example, create a new .py file in examples/ with YAML frontmatter in comments and run just generate-examples. See contribute/docs-contribute.mdx for the full process.
integrations/)Each integration (e.g., prefect-aws, prefect-gcp) has its own subdirectory. The index.mdx covers installation, credential setup (blocks), and key capabilities. Additional pages cover specific workers, tasks, or SDK reference. Follow the existing pattern: "Why use it" section, prerequisites, install instructions, blocks setup, then per-service usage sections.
v3/api-ref/)Auto-generated — do not edit directly. Covers the Python SDK (python/), CLI commands (cli/), and REST API (rest-api/). CLI pages use <ResponseField> and <Accordion> components for arguments and options.
v3/release-notes/)Changelogs organized by product surface: oss/ for open-source releases, cloud/ for Prefect Cloud, integrations/ for integration packages.
contribute/)Guides for contributors: how to set up the dev environment, write docs, develop integrations, and follow code style conventions.
deployment_infra/, not a new category named after that platform.navigation.tabs section of docs/docs.json, with an index.mdx page for the group overview.Starter templates live in this skill directory. Copy one as the basis for a new page and fill in the bracketed placeholders:
template-howto.mdxtemplate-concept.mdxAdjust headings and sections to fit the content — the templates show the expected shape, not a rigid format.
Every page should include a keywords array in its frontmatter. Keywords feed Mintlify's search index and help readers find pages using terms that don't appear in the title or description.