What Youβll Learn
By the end of this guide, youβll understand how to:- π Create a
docs/directory with auto-discovered markdown pages - βοΈ Write markdown documentation with frontmatter
- π¨ Customize themes and navigation via ensemble config
- π Control documentation access with triggers
- π Use Handlebars templating for dynamic content
Understanding Documentation in Conductor
Thedocs/ directory is a first-class component directory in Conductor, just like agents/ and ensembles/. It provides:
- Auto-discovered markdown pages - Just add
.mdfiles - Built-in docs-serve ensemble - Handles HTTP routing automatically
- Multiple UI frameworks (Stoplight, Redoc, Swagger, Scalar, RapiDoc)
- Auto-generated navigation from file structure
The
docs-serve ensemble is included in Conductorβs system templates. It automatically handles routing docs to /docs/* paths.Step 1: Create the docs/ Directory
Initialize Your Docs
Create the docs directory with your first markdown file:docs/getting-started.md:
3. Handle the Response
You should see your markdown pages rendered along with auto-generated API documentation!
Step 2: Add More Documentation Pages
Create an Authentication Page
Createdocs/authentication.md:
Token Expiration
Tokens expire after 30 days. Refresh them via the dashboard.Theme Configuration
Configure the appearance via the ensembleβsflow[].config.theme:
Choose a UI Framework
| UI | Best For |
|---|---|
stoplight | Modern, interactive docs (default) |
redoc | Clean, mobile-friendly |
swagger | Classic Swagger UI |
scalar | Beautiful, customizable |
rapidoc | Fast, lightweight |
Step 4: Control Access
Public Documentation
The defaultdocs-serve uses public: true on the trigger:
Authenticated Documentation
For authenticated docs, create a custom ensemble:public: false setting enforces authentication. Conductor validates Bearer tokens or API keys from request headers automatically.
Step 5: Use Handlebars Templating
Dynamic Content
Your markdown pages support Handlebars:Variables
Variables come from your configuration context. These are passed through the docs agentβs config.Step 6: Navigation Configuration
Navigation Groups
Organize into sections via the ensemble config:Reserved Sections
Conductor auto-generates sections for your agents and ensembles:Accessing Your Documentation
Directory Structure
A well-organized docs directory:Troubleshooting
Docs Not Showing
Docs Not Showing
Problem:
/docs returns 404Solutions:- Verify
docs/directory exists with at least one.mdfile - Rebuild to trigger auto-discovery:
- Check logs for errors:
Pages Not Appearing
Pages Not Appearing
Problem: Markdown pages not showing in navigationSolutions:
- Check frontmatter syntax (must start with
---) - Verify file extension is
.md - Check
hidden: trueisnβt set in frontmatter - Rebuild the project
Authentication Issues
Authentication Issues
Problem: Canβt access authenticated docsSolutions:
- Verify trigger has
public: false - Configure auth rules in
conductor.config.ts - Test with correct headers:
Styling Not Applied
Styling Not Applied
Problem: Theme colors not showingSolutions:
- Verify
themesection in ensemble config - Check hex colors include
#prefix - Clear browser cache
Best Practices
Documentation
β Do:- Keep pages focused and scannable
- Include code examples for every endpoint
- Use frontmatter for consistent metadata
- Version your documentation with your API
- Write walls of text without headings
- Skip authentication documentation
- Include internal endpoints in public docs
- Forget to update docs when API changes
Security
β Do:- Use separate ensembles for public and internal documentation
- Configure authentication via triggers
- Sanitize examples (remove real API keys)
- Expose admin endpoints publicly
- Include real tokens in examples
Summary
Youβve learned how to:- β
Create a
docs/directory with markdown files - β Write markdown pages with frontmatter
- β Customize themes and navigation via ensemble config
- β Control access with trigger configuration
- β Use Handlebars for dynamic content

