docs/ directory is a first-class component directory in Conductor that serves interactive API documentation. It auto-generates OpenAPI 3.1 specifications from your ensembles and agents, supports markdown documentation pages with Handlebars templating, and serves them through multiple documentation UIs.
Features
- First-class component directory - Just like
agents/andensembles/,docs/is a dedicated directory - Auto-generated OpenAPI specs - Scans your ensembles and agents to create accurate API docs
- Markdown documentation - Write
.mdfiles with frontmatter for custom pages - Multiple UI frameworks - Stoplight Elements, Redoc, Swagger UI, Scalar, RapiDoc
- Custom branding - Add your logo, colors, and styling
- Built-in caching - Fast documentation serving with optional KV caching
- Authentication - Public, authenticated, or admin-only documentation
- Handlebars templating - Dynamic content with variables
New to docs? Check out Your First Documentation for a comprehensive step-by-step guide.
Directory Structure
How It Works
Documentation is served via the built-indocs-serve ensemble which handles HTTP routing automatically. Your markdown files in docs/ are auto-discovered at build time.
Basic Setup
- Create markdown files in
docs/:
- Build and run:
- Access your docs:
Customizing Documentation
To customize your documentation, create a custom docs ensemble. This is where you configure themes, navigation, and UI framework. Createensembles/docs-custom.yaml:
Configuration Reference
All configuration is passed via the ensemble’sflow[].config:
Route Configuration
Control where and how docs are served via the trigger:public: false setting enforces authentication. Conductor validates Bearer tokens or API keys from request headers automatically.
UI Framework
Choose your preferred documentation UI:| UI | Description |
|---|---|
stoplight | Modern, interactive Stoplight Elements (default) |
redoc | Clean, mobile-friendly Redoc |
swagger | Classic Swagger UI |
scalar | Beautiful, customizable Scalar |
rapidoc | Fast, lightweight RapiDoc |
Theme & Branding
Customize the appearance:Navigation Configuration
Control how documentation pages are organized:Navigation Groups
Organize pages into collapsible groups:Caching
Enable caching for better performance:AI Enhancement
Use AI to improve documentation descriptions:Server URLs
Specify API server URLs in OpenAPI spec:Content Filtering
Control which endpoints appear in docs:Writing Documentation Pages
Markdown with Frontmatter
Create.md files in the docs/ directory:
Frontmatter Options
| Field | Type | Description |
|---|---|---|
title | string | Page title (used in nav and header) |
description | string | Page description (for SEO/preview) |
order | number | Navigation order (lower = first) |
hidden | boolean | Hide from navigation |
icon | string | Icon for navigation (emoji or icon name) |
category | string | Category for organization |
Handlebars Templating
Use Handlebars syntax for dynamic content:Reserved Routes
These routes are automatically generated:| Route | Description |
|---|---|
/docs/agents | Auto-generated list of all agents |
/docs/ensembles | Auto-generated list of all ensembles |
/docs/api | OpenAPI interactive reference |
/docs/openapi.json | OpenAPI spec in JSON format |
/docs/openapi.yaml | OpenAPI spec in YAML format |
Complete Example
Createensembles/docs-complete.yaml:
Global Configuration
You can also configure docs globally inconductor.config.ts:
Accessing Documentation
Best Practices
Organization
Security
- Use authentication for sensitive documentation
- Filter endpoints with
include/excludein config - Separate docs ensembles for different audiences
Performance
- Enable caching for production
- Use CDN through Cloudflare
- Minimize custom CSS
Troubleshooting
Docs Not Showing
- Verify
docs/directory exists with at least one.mdfile - Rebuild the project:
pnpm run build - Review logs for errors:
Authentication Issues
- Verify auth configuration
- Test with correct headers:
Pages Not Appearing
- Check frontmatter syntax is valid
- Verify file extension is
.md - Check
hideconfig doesn’t exclude the page

