Skip to main content
The 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/ and ensembles/, docs/ is a dedicated directory
  • Auto-generated OpenAPI specs - Scans your ensembles and agents to create accurate API docs
  • Markdown documentation - Write .md files 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-in docs-serve ensemble which handles HTTP routing automatically. Your markdown files in docs/ are auto-discovered at build time.

Basic Setup

  1. Create markdown files in docs/:
  1. Start the dev server:
  1. Access your docs:

Customizing Documentation

To customize your documentation, create a custom docs ensemble. This is where you configure themes, navigation, and UI framework. Create ensembles/docs-custom.yaml:

Configuration Reference

All configuration is passed via the ensemble’s flow[].config:

Route Configuration

Control where and how docs are served via the trigger:
Change the path:
Require authentication:
The public: false setting enforces authentication. Conductor validates Bearer tokens or API keys from request headers automatically.

UI Framework

Choose your preferred documentation UI:

Theme & Branding

Customize the appearance:
Control how documentation pages are organized:
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

Handlebars Templating

Use Handlebars syntax for dynamic content:
Variables are passed during rendering from your configuration.

Reserved Routes

These routes are automatically generated: Control visibility in your docs ensemble config:

Complete Example

Create ensembles/docs-complete.yaml:

Global Configuration

You can also configure docs globally in conductor.config.ts:
Settings in your custom docs ensemble override global configuration.

Accessing Documentation

Best Practices

Organization

Security

  1. Use authentication for sensitive documentation
  2. Filter endpoints with include/exclude in config
  3. Separate docs ensembles for different audiences

Performance

  1. Enable caching for production
  2. Use CDN through Cloudflare
  3. Minimize custom CSS

Troubleshooting

Docs Not Showing

  1. Verify docs/ directory exists with at least one .md file
  2. Rebuild the project: pnpm run build
  3. Review logs for errors:

Authentication Issues

  1. Verify auth configuration
  2. Test with correct headers:

Pages Not Appearing

  1. Check frontmatter syntax is valid
  2. Verify file extension is .md
  3. Check hide config doesn’t exclude the page

Next Steps

Your First Documentation

Step-by-step guide to setting up docs

Agents Overview

Learn about creating agents

Ensembles

Orchestrate multi-agent workflows

Security & Authentication

Secure your documentation