Skip to main content

Quick Start (60 Seconds)

Get a working Conductor project instantly:
Your project includes working examples of pages, workflows, and agents!

Prerequisites

You need:
  • Node.js 18+ (nodejs.org)
  • A Cloudflare account (free tier works - only needed for deployment)
Check Node.js:

Understanding Your Project

The init command creates a complete, ready-to-run project:

Explore the Examples

Your project includes working examples for all major features.

Try the Example Pages

Start the dev server:
Dev Container Users: Add --ip 0.0.0.0 to bind to all interfaces:
Local Development: Use the standard command:
Visit these URLs:

Run the Tests

All tests should pass! The template includes examples of:
  • Ensemble execution
  • Agent testing
  • Error handling

Your First Page

Let’s create a simple page using an ensemble with an HTTP trigger. Step 1: Create the ensemble file Create ensembles/hello.yaml:
Step 2: Rebuild
The dev server will automatically reload. Step 3: Visit Open http://localhost:8787/hello

Add Dynamic Data

Make your page dynamic by adding an agent that fetches data. Create ensembles/hello-dynamic.yaml:
Rebuild and refresh - your dynamic data now appears in the page!

Your First Workflow

The template includes ensembles/hello-world.yaml. Let’s explore it:
This workflow calls the hello agent (from agents/examples/hello/) and returns its output.

Create a New Ensemble

Create ensembles/my-workflow.yaml:

Execute from a Page

Create an ensemble that renders the workflow result as HTML: Create ensembles/workflow-demo.yaml:
Visit http://localhost:8787/workflow - your ensemble runs on every page load!

Project Configuration

wrangler.toml

The init command creates a properly configured wrangler.toml:
Important: Conductor uses Vite/Rolldown to build your project. The output is dist/index.mjs, not src/index.ts.

conductor.config.ts

This file controls project settings, observability, and API execution controls. Use defineConfig() for full TypeScript autocomplete:
The defineConfig() helper provides TypeScript autocomplete and validation for all configuration options.
Note: Authentication is configured per-route in each ensemble’s trigger: config using public: true/false. See the examples above.

Deploy to Cloudflare

Step 1: Login to Cloudflare

This opens your browser to authorize Wrangler.

Step 2: Build

Step 3: Deploy

Output:
Your app is now live at the edge in 300+ cities worldwide! Test it:

Development Workflow

Troubleshooting

Problem: Template tests fail with TypeError: this.ctx.waitUntil is not a functionFix: The ExecutionContext mock in tests/basic.test.ts is already fixed in v1.8.0. If you see this error, update the mock:
Problem: wrangler dev starts but all requests hang indefinitelyFix: Use the --local-protocol http flag:
This properly binds network access for the Workers runtime.
Problem: Created a new ensemble or agent but it returns 404Fix: Trigger a rebuild. Ensembles and agents are discovered at build time:
Or with wrangler running, the file watcher should auto-rebuild.
Problem: Routes with parameters like /blog/:slug are not workingStatus: Fixed in v1.8.0! Dynamic route parameters now work correctly.Make sure your ensemble has the trigger configured properly:
Not nested in config:
Problem: Build fails after updating wrangler.toml or package.jsonFix: Clean rebuild:
Problem: Build error about virtual moduleFix: This is a Vite virtual module created at build time. Make sure:
  1. ensembles/ directory exists
  2. Vite config is correct (should be in template)
  3. Clean rebuild: rm -rf dist && pnpm run build

What’s Included in the Template

The init command creates:

✅ Working Examples

  • 10+ example ensembles showing static, dynamic, forms, and SSR patterns
  • Multiple workflow ensembles demonstrating different trigger types
  • 1 hello agent showing custom code operations
  • Multiple doc agents for various operation types

✅ Development Tools

  • Vitest for testing with working examples
  • TypeScript configured correctly
  • Vite for fast builds with HMR
  • ESLint & Prettier for code quality

✅ Production Ready

  • Authentication configured in conductor.config.ts
  • Caching rules for optimal performance
  • Error handling with custom 404 page
  • Wrangler config ready for deployment

✅ Documentation

  • README.md with project overview
  • Inline comments explaining key concepts
  • Example code for common patterns

Next Steps

Your First Website

Learn how to build web applications

Your First Agent

Create custom reusable agents

Your First Ensemble

Build complex workflows

Operations Reference

Explore all available operations

Alternative: Manual Setup (Advanced)

If you need to integrate Conductor into an existing Cloudflare Workers project:

Step 1: Create Worker

Select: “Hello World” Worker, TypeScript: Yes

Step 2: Install Conductor

Step 3: Update wrangler.toml

Step 4: Add Vite Config

Create vite.config.ts:

Step 5: Create Directories

Step 6: Update package.json

Note: Manual setup is error-prone and requires more configuration. The init command is strongly recommended.

Tips & Best Practices

  1. Always use —local-protocol http with wrangler dev to avoid network binding issues
  2. Rebuild after adding files - Ensembles and agents are discovered at build time
  3. Start with examples - Modify the included hello examples before creating new ones
  4. Test locally first - pnpm test runs your test suite instantly
  5. Check logs - npx wrangler tail shows real-time production logs
  6. Use git - The template includes .gitignore configured correctly
  7. Read the generated README.md - It includes project-specific guidance