Skip to content

lf workflow

Manage file-based and cloud Workflows. Use lf workflow run for local simulation and validation, and lf workflow create to publish to the LenserFight cloud.

Subcommands

SubcommandDescription
runSimulate a WORKFLOW.md locally and emit a run report
validateValidate a workflow file without running it
createCreate a cloud workflow on LenserFight
listList your cloud workflows
statusShow lifecycle state and delete blockers
archiveArchive a workflow without breaking historical runs
restoreRestore an archived or tombstoned workflow
deleteRequest dependency-aware workflow deletion
pinPin a workflow to your saved artifacts
unpinRemove your saved pin from a workflow
triggerManage workflow triggers (cron, event, webhook, manual)
node-typesList workflow node types from the canonical catalog
node-typeDescribe one workflow node type from the canonical catalog

lf workflow run

Parse a local WORKFLOW.md or SKILL.md, classify each step by executability, and emit a JSON + Markdown run report.

bash
lf workflow run <file> [--inputs <json>] [--json]

Arguments

ArgumentTypeRequiredDescription
filepositionalyesPath to WORKFLOW.md or SKILL.md

Flags

FlagTypeDefaultDescription
--inputsstring''JSON object of workflow inputs (e.g. '{"topic":"AI Safety"}')
--jsonbooleanfalseEmit the full run summary as JSON

Node executability

Each workflow step is classified as executable or design-only:

  • Executable now: lens, lens_execute, prompt_template, output_parser, set_variables, json_transform, switch, if_condition, loop_map, wait_delay, code, error_catch, trigger nodes
  • Design-only: All other node types require the hosted DAG runner. Publish the workflow to LenserFight and run from the web UI.

Examples

bash
# Parse and classify steps
lf workflow run ./WORKFLOW.md

# Pass inputs
lf workflow run ./WORKFLOW.md --inputs '{"topic":"AI Safety","max_tokens":512}'

# JSON output for CI pipelines
lf workflow run ./WORKFLOW.md --json | jq '.step_details'

Exit codes

CodeMeaning
0Parsed successfully
1Parse or validation failure

lf workflow validate

Validate a workflow file's frontmatter and structure without producing artifacts.

bash
lf workflow validate <file> [--json]

Arguments

ArgumentTypeRequiredDescription
filepositionalyesPath to WORKFLOW.md or SKILL.md

Flags

FlagTypeDefaultDescription
--jsonbooleanfalseOutput validation result as JSON

Example

bash
lf workflow validate ./WORKFLOW.md
lf workflow validate ./WORKFLOW.md --json | jq '.issues'

lf workflow create

Create a cloud workflow on LenserFight. Requires authentication.

bash
lf workflow create --name <name> [--template <template>] [--description <text>] [--json]

Flags

FlagTypeRequiredDefaultDescription
--namestringyesWorkflow name
--templatestringno''Starter template
--descriptionstringno''Workflow description
--jsonbooleannofalseOutput result as JSON

Available templates

TemplateDescription
single-agentSingle AI agent execution
multi-step-researchSequential research pipeline
code-review-pipelineCode analysis and review flow
judge-evaluationAI judge evaluation workflow
team-debateMulti-agent debate format

Examples

bash
# Blank workflow
lf workflow create --name "Market Research Pipeline"

# From template
lf workflow create --name "Weekly Review" --template single-agent

# With description
lf workflow create --name "Code Audit" --template code-review-pipeline \
  --description "Automated PR review and security scan"

lf workflow list

List your cloud workflows. Requires authentication.

bash
lf workflow list [--limit <n>] [--offset <n>] [--json]

Flags

FlagTypeDefaultDescription
--limitstring'20'Maximum number of results
--offsetstring'0'Pagination offset
--jsonbooleanfalseOutput as JSON

Example

bash
lf workflow list
lf workflow list --limit 50 --offset 20 --json | jq '.[].id'

Lifecycle subcommands

These commands manage workflow state. All require authentication and a workflow UUID.

bash
lf workflow status <id>   # Show state, version, delete blockers
lf workflow archive <id>  # Archive (keeps historical runs intact)
lf workflow restore <id>  # Restore archived or tombstoned workflow
lf workflow delete <id>   # Request deletion (used workflows become tombstones)
lf workflow pin <id>      # Pin to saved artifacts
lf workflow unpin <id>    # Remove saved pin

lf workflow trigger

Manage triggers attached to a cloud workflow.

lf workflow trigger add

bash
lf workflow trigger add <id> [--type <type>] [--condition <json>]
FlagTypeDefaultDescription
--typestringbattle_eventcron | battle_event | webhook | manual
--conditionstring'{}'JSON condition object for the trigger

lf workflow trigger webhook-url

bash
lf workflow trigger webhook-url <id>

Prints the webhook URL for triggering the workflow via HTTP POST. The request body must include a secret field — treat it like a password.

lf workflow trigger list

bash
lf workflow trigger list <id> [--json]

Lists all triggers attached to the workflow, including trigger type, enabled state, and last fired time.


lf workflow node-types

List workflow node types from the canonical catalog — the single source of truth also used by the workflow builder and MCP list_workflow_node_types.

bash
lf workflow node-types [--category <category>] [--json]

Flags

FlagTypeDefaultDescription
--categorystring''Filter to one category: lens, trigger, logic, data, ai_primitive, battle, storage, communication, integration, media, utility
--jsonbooleanfalseOutput as JSON

Examples

bash
# All node types as a table
lf workflow node-types

# Only trigger node types
lf workflow node-types --category trigger

# JSON output for scripting
lf workflow node-types --json | jq '.[].type'

lf workflow node-type

Describe one workflow node type from the canonical catalog: required and optional configuration fields with defaults, input/output contracts, an example configuration, and its documentation link.

bash
lf workflow node-type <type> [--json]

Arguments

ArgumentTypeRequiredDescription
typepositionalyesNode type identifier (e.g. lens_execute, schedule_trigger)

Flags

FlagTypeDefaultDescription
--jsonbooleanfalseOutput the full catalog entry as JSON

Examples

bash
lf workflow node-type lens_execute
lf workflow node-type schedule_trigger --json | jq '.requiredConfig'

Exit codes

CodeMeaning
0Node type found and described
1Unknown node type