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

# Test, iterate, publish

> Getting your workflow ready for production reliability and scale

To get a workflow ready for production, do the following:

* Publish a new version
* Run it
* [Debug it](/operate/debug)
* [Improve your agent](/operate/improve)

## Run the draft from the builder

<Steps>
  <Step title="Click Run">
    The execution configuration modal opens.
  </Step>

  <Step title="Pick the version">
    The version selector sits in the top right of the modal. Choose the draft. This is how you test a change
    before anyone else sees it.
  </Step>

  <Step title="Choose a profile">
    Select an [agent profile](/concepts/profiles), or create one. The profile carries the credentials, the
    proxy, and the browser settings the execution needs.
  </Step>

  <Step title="Fill in the inputs">
    Give a value for every `{{.variable}}` your instructions reference. Attach any files the workflow must read.
  </Step>

  <Step title="Start the execution">
    The execution page opens and shows the workflow working.
  </Step>
</Steps>

## Read what happened

Watch the execution and see if it worked.

* **The timeline** shows every action in order.
* **The browser view** shows the page the workflow saw at each step.
* **The reasoning** shows why the workflow chose each action and each transition.

[Debug your workflows](/operate/debug) covers how to work back from a bad outcome.

## Make an update

See [Improve your workflow](/operate/improve) to learn how to make your workflow better.

See [Write good instructions](/build/instructions) to learn how to write clearer instructions.

| What the execution showed                  | What to change                                            |
| :----------------------------------------- | :-------------------------------------------------------- |
| The workflow took the wrong action         | The instruction — add the edge case that confused it      |
| The workflow got stuck                     | The instruction — add success criteria, or split the node |
| The workflow ended on the wrong outcome    | The transition descriptions                               |
| The workflow had no route out of a failure | The graph — add a failure path to an output node          |

## Run it against real cases

To start with, get the happy path working. Then, run the workflow against a variety of inputs that might occur in production.

* Run it with different input values.
* Run the edge cases: the missing record, the long name, the second page of results.
* Run it more than once on the same input to ensure it works consistently.
* Check the result matches the format you expect. See [Inputs and outputs](/concepts/inputs-and-outputs).

## Publish

Publishing makes a version the one new executions use.

* In the builder, click **Publish**.
* From code, call `agentWorkflowsPublish`, or `POST /agents/{agentId}/workflows/{workflowId}/publish`.
* From your coding agent over MCP, call `workflowPublish`.

<Warning>
  An execution started from the API runs the **published** version. Editing the draft changes nothing for your
  callers. If your API runs ignore a change you made, check that you published it.
</Warning>

## Versioning

To understand how Asteroid workflow versions work, please read our [Versioning documentation](/concepts/versions).
