This directory contains example workflows organized by complexity and use case. Each example includes a complete YAML workflow file and explanation.
Simple workflows to get started:
- Hello World
- Sequential processing
- Conditional routing
- Error handling
Complex patterns and techniques:
- Parallel processing
- Data aggregation
- External API integration
- State management
- Nested workflows
Production-ready workflow patterns:
- LLM agent workflows
- Data processing pipelines
- API orchestration
- File processing
- Monitoring and alerting
name: hello-world
start: greet
nodes:
- name: greet
type: echo
config:
message: "Hello, Pocket!"name: conditional-example
start: check-value
nodes:
- name: check-value
type: conditional
config:
conditions:
- if: "{{gt .value 100}}"
then: high-value
- if: "{{gt .value 50}}"
then: medium-value
else: low-valuename: api-workflow
start: fetch-data
nodes:
- name: fetch-data
type: http
config:
url: "https://api.example.com/data"
method: GET
- name: process-data
type: transform
config:
jq: ".items | map({id, name, value})"
connections:
- from: fetch-data
to: process-data# Run any example
pocket run workflows/basic/hello.yaml
# Run with verbose output
pocket run workflows/advanced/parallel.yaml --verbose
# Validate without running
pocket run workflows/real-world/agent.yaml --dry-run- Start with a basic example
- Modify the configuration
- Test with
--dry-run - Run and iterate