aflare Workflow Skill
Overview
aflare is a workflow engine that chains together nodes (steps) to automate tasks. Each workflow is a YAML file defining a sequence of nodes. Supported node types include fetch_url, execute, transform, ollama (local LLM), file_read, file_write, notify, call, and custom nodes (run aflare list for the full catalog). Workflows support error handling with retries, parallel execution, conditional branching, variable substitution, and workflow chaining.
Prerequisites
- aflare binary installed and in your PATH
- Ollama running locally if your workflows use
ollamanodes - Required models installed (e.g.,
ollama pull llama3) - API access to any external services your workflow nodes call
- Secrets configured if workflows reference
{{secret.*}}expressions
Instructions
1. Create a Workflow YAML
Every workflow needs a name, description, and steps array. Each step declares a node type and params:
name: my-workflow
description: What this workflow does
steps:
- node: fetch_url
params:
url: "https://example.com"
2. Validate the Workflow
aflare validate my-workflow.yaml
3. Run the Workflow
aflare run my-workflow.yaml
aflare run my-workflow.yaml -var key=value
aflare run my-workflow.yaml -input "text to process"
4. Debug Issues
- Review
~/.aflare/logs/audit.logfor execution history - Use
aflare run --verbosefor detailed step output - Inspect individual node output for error messages
5. Advanced Patterns
- Parallel steps: Use
parallelto run nodes concurrently - Retries: Add
retryanddelayfor resilience - Conditional branching: Use
conditionto branch on prior output - Workflow chaining: Use
callnodes to invoke sub-workflows - Map over arrays: Use
map.overwithconcurrencyfor batch processing
Output
Running a workflow produces:
- Files written by
file_writenodes - Console output from
notifyorexecutenodes - Audit log entries in
~/.aflare/logs/audit.log - Return code 0 on success, non-zero on failure
Examples
Fetch and Summarize
name: article-summarizer
description: Fetch an article and summarize it with Ollama
steps:
- node: fetch_url
name: fetch
params:
url: "https://example.com/article"
mode: "text"
- node: ollama
params:
model: "llama3"
prompt: "Summarize the key points: {{step.fetch}}"
temperature: 0.3
- node: file_write
params:
path: "summary.md"
Run with Variables
aflare run workflow.yaml -var url="https://news.example.com"
Resources
- Workflow Examples
- Node Reference
- Custom Nodes Guide
- Batch URL Processor Example
- GitHub Repository
- OpenClaw Plugin