# One command to get started - launches the wizardnpx @ensemble-edge/ensemble# Or create a Conductor project directlynpx @ensemble-edge/ensemble conductor init my-ai-workflowcd my-ai-workflow
The Ensemble CLI provides access to all tools: Conductor (orchestration), Edgit (versioning), and Cloud (managed platform). No installation needed - just use npx.
For CI/CD pipelines, use npx @ensemble-edge/conductor init my-project -y to skip interactive prompts.
The init command will:
Check your Wrangler authentication (prompts to login if needed)
Ask which AI provider you’ll use (Anthropic, OpenAI, or Cloudflare)
Securely store your API key
Create the project structure
This creates:
Copy
my-ai-workflow/ ensembles/ hello-world.yaml # Your first ensemble components/ prompts/ hello.md # Your first prompt wrangler.toml # Cloudflare config package.json conductor.config.ts # Conductor config
ensemble: company-inteldescription: Analyze a company from its domainagents: # Fetch company data - name: fetch operation: http config: url: https://api.company-data.com/lookup?domain=${input.domain} method: GET cache_ttl: 3600 # Cache for 1 hour # Analyze with AI - name: analyze operation: think config: model: claude-3-5-sonnet-20241022 prompt: | Analyze this company data and provide: - Industry classification - Key products/services - Market position (1-5 scale) - Growth indicators Company data: ${fetch.output} Respond in JSON format. response_format: type: json_object # Return resultsoutput: company: ${input.domain} analysis: ${analyze.output} cached: ${fetch.cached}
name = "my-ai-workflow"main = "src/index.ts"compatibility_date = "2024-11-01"# KV for caching (optional but recommended)[[kv_namespaces]]binding = "CACHE"id = "your_kv_namespace_id"# AI Gateway for observability (optional)[ai]binding = "AI_GATEWAY"
Create KV namespace:
Copy
wrangler kv:namespace create "CACHE"# Copy the ID to wrangler.toml
# Start local dev serverensemble wrangler dev --local-protocol http# In another terminal, test itcurl http://localhost:8787/ensembles/company-intel \ -H "Content-Type: application/json" \ -d '{"domain": "stripe.com"}'
# Edgit is already included in the Ensemble CLI!edgit init# Version your promptedgit tag create company-analysis-prompt v1.0.0# Tag and push to productionedgit tag set company-analysis-prompt prod v1.0.0edgit push --tags --force
Add your API key to .dev.vars for local development:
Copy
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .dev.vars
For production, add it in Cloudflare dashboard under Workers > Settings > Variables.
Error: KV namespace not found
Create a KV namespace first:
Copy
wrangler kv:namespace create "CACHE"
Copy the ID to your wrangler.toml file.
Cold starts taking longer than 50ms
First request always takes longer (~100-200ms). Subsequent requests should be <50ms cold start + execution time.Enable caching to get <10ms for repeated requests:
Copy
config: cache_ttl: 3600 # Cache for 1 hour
AI Gateway not working
Make sure you’ve configured AI Gateway in Cloudflare dashboard:
That’s it. You’ve got a production AI workflow running on the edge with caching, versioning, and infinite scale.No Docker, no Kubernetes, no server management. Just Git, YAML, and Cloudflare Workers.