What you will build
Aticket-plan workflow that loads a ticket, asks your agent for an implementation plan, pauses for your approval, and records the outcome. By the end you will have started a run from the CLI, approved it, and read its output.
Workflows are a per-agent feature. If
lua workflows list reports that workflows are not found on your agent, ask your organisation admin to enable them.1
Create the workflow file
Inside a lua-cli project (Names must match
lua init if you do not have one), create src/workflows/ticket-plan.ts:^[a-z][a-z0-9-_]*$; step ids must match ^[a-z][a-zA-Z0-9_-]{0,63}$. The compiler finds every createWorkflow(...).commit() chain in your project - you can also list them on your LuaAgent under workflows: [ticketPlan].2
Run it locally
lua test workflow compiles the project and drives the graph offline. Agent steps are faked by default and approvals can be pre-answered:--step-output:lua workflows run ticket-plan ... is the same command under the workflows verb. Pass --agents live to call the real agent instead of the fake.3
Push it
lua.skill.yaml under workflows:. Nothing is live yet.lua push all does not stage workflows - push them explicitly with lua push workflow (aliases: workflows, wf). Add --auto-deploy to publish the pushed version straight away.4
Deploy it
agentVersion the command prints). lua workflows view ticket-plan shows the versions and which one is active.5
Start a run and watch it
start answers immediately with a run id (wfr_...) and --follow attaches the live event stream. The stream prints one line per event and stops at the approval:8 (parked on a person). Pass --input @file.json to read the input from a file.6
Approve the card
- Desktop
- CLI
Open Runs in the desktop, pick the run, and answer the card in the Needs you section of the run page. The same card also appears in your Inbox.
7
Read the result
Re-attach and wait for the terminal event:Then read the run and its steps:
lua workflows status <runId> --json returns the full run document, including each step’s input and output preview.Start a run from a skill
A tool can start the same workflow on the user’s behalf. The idempotency key makes a retried tool call return the original run instead of a second one:Workflows API.
Where to go next
Authoring
Every builder call, binding helper, retry and approval option
Job tier
Give a step a repository checkout and a coding session
Runs and events
Statuses, the ledger, SSE and the desktop Runs pages
CLI reference
All
lua workflows subcommands and flags
