> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/agent-builder-and-skills/upgrade-an-agent-to-a-workflow.md).

# Upgrade an agent to a workflow

Convert an agent to a workflow when you need to add processing steps or control how data moves between them. Workflow Builder shows the agent’s components as connected nodes.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FJBDteNuRatmxD7dQs5Uz%2FG016.mp4?alt=media&token=a3d2fae5-3229-49ba-9902-f8b5b8a11355>" %}

## Before you start

Conversion cannot be undone, and the converted project no longer has an Agent Builder view. Keep a separate copy if you need to retain that view. Use [Project import and export](/guides-and-quickstarts/workspace-and-discovery/project-import-and-export.md) to export a backup and import it as a separate project before converting. Open the copy and confirm it has the builder view and settings you need to preserve before continuing.

## Before you convert

Review the agent’s instructions, knowledge sources, and tools.

![Agent instructions, knowledge sources, and tools before conversion](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/ATyQx8PdcySALIB6VN78/assets/g016-g016-01-agent-baseline.png)

## Convert the project

Open **Upgrade to Workflow** and select **Upgrade**. Read the notice, then select **Convert to Workflow**.

![Irreversible workflow conversion notice](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/0WYmMAjEmLnCzlicMn0E/assets/g016-g016-02-conversion-warning.png)

## Review the generated workflow

The canvas shows the input, processing, knowledge, and output nodes. Configure any source with a warning.

![Generated workflow and source warnings](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/Kpj4A9rfogQDE5LBIITs/assets/g016-g016-03-workflow.png)

Open the model node. Check that its instructions and prompt references supply the information it needs.

![Model instructions and prompt references after conversion](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/gnEPTgL5SToTk73OOC58/assets/g016-g016-04-model-instructions.png)

## Run the workflow

Provide an input and select **Run**. Review the output before adding further processing steps.

![Converted workflow run result](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/wkJo7z93IpKq04kWR6Gv/assets/g016-g016-05-workflow-result.png)

## Important behavior

Connections define the processing path. References specify which values a node receives from earlier steps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/guides-and-quickstarts/agent-builder-and-skills/upgrade-an-agent-to-a-workflow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
