> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithlocus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Save a repeatable process, run it on new inputs, and track its results and cost.

Workflows turn an agent's multi-step task into a process your team can reuse. Save the logic once, then run it on new inputs with a fixed version and spending ceiling.

A Workflow can call approved Tools and Recipes, apply your business rules, and produce results such as a qualified prospect list or a research report. Locus hosts the execution and records progress, tool calls, outputs, and charges.

## What to build

* **Lead qualification:** enrich company domains, remove duplicates, apply your ideal-customer criteria, and export the matching records.
* **Competitive research:** collect current sources for a list of companies and produce a consistent comparison.
* **Data processing:** extract content from supplied URLs, validate required fields, and flag records that need review.

Use a Recipe when one maintained outcome covers the task. Use a Workflow when you need your own sequence, rules, or output format.

## Build one with your agent

Connect a supported [agent client](/locus-pro/connect-agents) and describe the inputs, rules, output, and budget:

```text theme={null}
Create a Workflow that takes a list of company domains, enriches each company,
removes duplicates, and returns those with 50–500 employees. Include sources
and flag missing employee counts. Test it before saving, then pilot five
domains with a maximum budget of 1,000 credits.
```

<Steps>
  <Step title="Define and test">
    The agent writes the process using approved Tools and Recipes, checks the
    code, and tests sample inputs without calling providers.
  </Step>

  <Step title="Save a version">
    Save the tested revision. Later edits do not change the version used by an
    existing run.
  </Step>

  <Step title="Pilot a small input">
    Run a representative sample with a hard credit ceiling. Review the result
    and cost before increasing the workload.
  </Step>

  <Step title="Run and review">
    Run the saved version on new inputs. Open **Workflows** to inspect progress,
    results, tool calls, errors, and charges.
  </Step>
</Steps>

Authoring and validation happen through the agent connection. The dashboard is where you monitor runs. Saving a Workflow does not schedule it or publish it.

## Control each run

| Control          | What it does                                                           |
| ---------------- | ---------------------------------------------------------------------- |
| Saved version    | Keeps production runs tied to fixed logic                              |
| Credit ceiling   | Bounds each run's spending                                             |
| Inherited access | Limits the run to the connection's account, allowed tools, and balance |

The Workflow cannot enable more tools or expand its own access.

You can cancel a run to stop new calls; completed work can remain charged. Some interrupted runs can resume from saved progress. Review their status and receipts in **Workflows** before resuming.

## How execution works

Workflows run versioned TypeScript in an isolated environment. Hosted code receives no account or provider credentials and can only call approved tools, with no arbitrary outbound requests.

Supported connections expose `workflow_definition`, `workflow_validate`, `workflow_run`, and `workflow_runs`. These tools let the agent create, test, save, run, and inspect Workflows. If they are absent, that connection does not currently support hosted Workflows.

<CardGroup cols={2}>
  <Card title="Connect an agent" icon="plug" href="/locus-pro/connect-agents">
    Set up the connection that builds and runs your Workflow.
  </Card>

  <Card title="Recipes" icon="wand-magic-sparkles" href="/locus-pro/enterprise/recipes">
    Use maintained outcomes as steps in your process.
  </Card>
</CardGroup>
