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

# Run an agent from a workflow

> Add a Run Agent step so a workflow can reason over its data — summarize a call, draft a recap, classify a deal — and hand the result to the steps that follow.

Most workflow steps move data or take an action. A **Run Agent** step is where the workflow *thinks* — it runs one of your published agents over the workflow's data and produces text: a call summary, a drafted email, a risk assessment, a classification. Later steps then use that result, so the workflow can decide and write in the same run.

Add this step only when the workflow genuinely needs reasoning. A Slack message or CRM update built straight from `{{variables}}` doesn't need an agent.

## How to use it

1. Add a **Run Agent** step to your workflow.
2. Choose the **agent** to run. It must be a **published** agent (see below).
3. Write the **instruction** for the agent — what you want it to do this run. It accepts variables from earlier steps, so you can point it at the meeting, the record, or a set of records you found.
4. Reference the agent's result in a later step as `{{<step-id>.output}}` — for example, put `{{agent-1.output}}` into a Slack message or email body.

## Publish the agent first

A Run Agent step points at an agent by id, and a workflow **can't publish** while it references an agent that isn't published yet. So build and publish the agent first, then reference it from the workflow and publish the workflow. If you try to publish a workflow whose Run Agent step points at an unpublished agent, publishing fails and tells you to publish the agent first.

## In practice

On a **meeting ended** workflow, a Run Agent step summarizes the call and lists action items, and the next step posts `{{agent-1.output}}` to the account's Slack channel — the analysis and the delivery both happen automatically.

## Related

* [Send a Slack message](/docs/workflows/actions/send-slack-message) — post what the agent produced
* [Send email from a workflow](/docs/workflows/actions/send-email) — email the agent's recap
* [Find & filter records](/docs/workflows/find-and-filter-records) — gather the data the agent reasons over

Questions? We're here to help at [support@clearskies.cc](mailto:support@clearskies.cc)
