Example requests
Ask your coding agent for an automation with known steps. It can turn that request into a workflow whose steps are tracked, retried, and inspected.“When a new signup comes in, research the account, score the lead, add it to Salesforce, and post a brief to Slack.”
“Every Friday, collect closed deals from HubSpot, generate a sales summary, and email it to the leadership team.”
“When a support escalation is approved, create a Linear issue, notify the account owner, and wait for a human resolution before closing the loop.”
How workflows are defined
In Luno OS, workflows live in your project code undersrc/workflows/. Each file default-exports a defineWorkflow() definition with typed input and output, and the runtime discovers it when you run or deploy the project.
src/workflows/signup-pipeline.ts
defineWorkflow() returns a builder. Chain steps with .then() (and .parallel(), .branch(), .foreach(), .sleep(), …), reshape data between them with .map(), then finish with .commit(). Each step receives the previous step’s output as its input, and TypeScript checks that every step accepts what the one before it produces and that the last step returns the declared output. Each step’s result is recorded, so a retried run resumes instead of repeating finished work.
What workflows can do
Workflows are one of the main primitives in a project, alongside agents, actions, and triggers. Reach for a workflow when the work is a known sequence that should run reliably; reach for an agent when the work needs open-ended reasoning. The two compose: a workflow can prompt an agent as a step, and an agent can run a workflow as a tool.
How to run workflows
Most workflows run from a trigger, such as a webhook, schedule, poll, or app event attached to the workflow. While building, run them directly from the CLI:Running deployed workflows
Deploy your project, then run the workflow against the deployed project:Next steps
Build workflows
Define workflows with typed input, steps, durability, and waits.
Best practices
Keep workflow steps small, typed, and safe to retry.
Run workflows
Start runs from the CLI, triggers, forms, the API, and agent tools.
Workflow forms
Publish a public form that starts a run from a shareable link.
Test workflows
Run workflows in tests and assert their output.
Workflow runs
Inspect input, output, steps, errors, and traces.