Create new workflow files from built-in templates.
# List available templates
workflow init --list
# Create from a template (interactive)
workflow init
# Create from a specific template
workflow init --template rag-qa
# Specify output filename
workflow init --template simple-form -o my-workflow.workflow.yaml
# Overwrite existing file
workflow init --template blank -o existing.workflow.yaml --force| Option | Short | Description |
|---|---|---|
--template NAME |
-t |
Template name to scaffold from |
--output PATH |
-o |
Output file path (default: {template-name}.workflow.yaml) |
--force |
Overwrite existing file if it exists | |
--list |
List all available templates and exit |
Pattern: structured_input → agent
A structured form collects user input, then an agent processes it. Good starting point for data collection workflows.
Nodes: structured_input, agent
Pattern: plain_txt_input → agent
The simplest agent workflow: free-text input processed directly by an agent. Minimal starting point.
Nodes: plain_txt_input, agent
Pattern: file_upload → retrieve → llm_call
Upload a document, retrieve related context from a knowledge base, and analyze with an LLM. Classic RAG pipeline for document processing.
Nodes: file_upload, retrieve, llm_call
Pattern: structured_input → llm_call → human_review
Structured input processed by an LLM, then routed to a human reviewer for approval. Good for workflows requiring manual oversight.
Nodes: structured_input, llm_call, human_review
Pattern: plain_txt_input → llm_call → llm_call
Text input processed through a multi-stage LLM pipeline. First LLM processes items, second summarizes results.
Nodes: plain_txt_input, llm_call, llm_call
Pattern: plain_txt_input → retrieve → llm_call
Classic RAG question-answering: user asks a question, relevant docs are retrieved, and an LLM generates a grounded answer.
Nodes: plain_txt_input, retrieve, llm_call
Pattern: plain_txt_input (minimal)
Empty workflow with just an entry/exit node. A minimal starting point to build from scratch.
Nodes: plain_txt_input
# See what's available
workflow init --list
# Create a RAG Q&A workflow
workflow init --template rag-qa
# Output: rag-qa.workflow.yaml createdworkflow init --template document-analysis -o invoice-processor.workflow.yaml# First time - succeeds
workflow init --template blank -o test.workflow.yaml
# Second time - fails with error
workflow init --template blank -o test.workflow.yaml
# Error: File already exists: test.workflow.yaml
# Use --force to overwrite.
# Third time with --force - succeeds
workflow init --template blank -o test.workflow.yaml --forceAll built-in templates are guaranteed to pass workflow validate:
# Create and validate in one go
workflow init --template rag-qa
workflow validate rag-qa.workflow.yaml
# All checks passed ✓After scaffolding, customize the generated .workflow.yaml file:
- Update placeholder values: Replace
YOUR_KNOWLEDGE_BASE_ID, agent IDs, etc. - Adjust parameters: Tune
temperature,maxTokens,topK, etc. - Modify structure: Add/remove nodes, change edge connections
- Validate changes: Run
workflow validateafter edits
# Scaffold → Validate → Push
workflow init --template rag-qa -o my-qa.workflow.yaml
workflow validate my-qa.workflow.yaml
workflow push my-qa.workflow.yaml- Jira Ticket: RAG-948
- Related Commands:
workflow validate - Template Location:
src/cli/templates/ - WDF Schema: See
docs/validate-command.mdfor node types and validation rules