---
title: Create a workflow agent from scratch
slug: agent-platform/docs/create-a-workflow-agent
createdAt: 2026-08-12T15:37:10.000Z
---

[Workflow agents](docId:2HD0fUsIsfdek516VtN9l) in Mark (Optimizely Agent Platform) connect multiple specialized agents into a single automated process.

## Access your agents

1. Go to [home.optimizely.com](https://home.optimizely.com).
2. Select your organization.
3. Click **Mark**.

   ![Screenshot of the Optimizely World Organization page where Mark is one of the quick link tiles](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/IJp9Lul9HZT1dGYaFbve4_mark-card-on-welcome-back-page0.png)
4. Click **Agents**.

   ![Screenshot of the Mark left menu where the Agents option displays](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/rq62wY7Qz3MLcZ5wzhi5d_mark-chat-reusables-agents-menu-item0.png)
5. Select the **Your Agents** tab.

   ![Screenshot of Agents where the Your Agents tab displays](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/6aS1CBibkuJv4Ya7nB1Y3_mark-chat-reusables-agents-your-agents-tab0.png)

## Create a workflow agent from scratch

1. Follow the steps in the [Access your agents](docId\:KWaI2TBwD38sN7p74exoy) section.
2. Click **Add Agent > Workflow Agent**.

   ![Screenshot of the Add Agent options where Workflow Agent is highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Ywd10BSKiJ6Fn_tCiDBzo_create-new-worlfow-agent.png)
3. Enter a **Name**.
4. Enter a unique **Id**. The field displays **Available** to confirm the Id is not already in use.
5. Add a **Description**. The description explains what the workflow agent does and when collaborators should use it.
6. (Optional) Select **Private executions** to restrict the contents of each execution log to the user who triggered it. See [Private executions](docId\:rHBhJmLiQvmx9789rso0n).
7. (Optional) Select **Enable personal context**. Selecting this option injects the user's `AGENTS.md` and `MEMORY.md` personal context files into downstream agent-step system prompts. It also unlocks `/context` CWDs so downstream memory tools resolve into the personal-context tree.
8. (Optional) Select the working directory from the **CWD** drop-down list. `/workspace` is the thread-scoped scratch tree (bare root only, no sub-path). `/context` is the personal-context tree (requires **Enable personal context** to be selected, with optional sub-path).
9. (Optional) Expand **Impact**. The impact records the business value each workflow run delivers, such as time saved or revenue generated. See [Agent impact reporting](docId\:MSs8YeBaJMT5UImaw5lcm) for the field rules and how impact displays in reports.
   1. Enter an **Amount**.
   2. Select a **Unit of Measurement**.
   3. (Optional) Select an **Impact Category**.
10. Click **Save** to create your agent.

![Screenshot of the Workflow Details panel where the fields for a workflow agent are complete](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/0Cn6gKYKNsAcOCCTOD8pZ_add-workflow-agent-details.png)

### Configure your workflow agent

The following example shows how to connect a simple trigger and a specialized agent. A trigger is an event or condition that starts the workflow agent. See [Workflow triggers](docId\:pYeMYR_1QCBBfc6rGEwlR) for information.

1. Drag and drop a **Trigger** into the **Add Trigger** area on the workspace.
2. Configure the **Trigger** as needed. See [Workflow agent triggers](docId\:pYeMYR_1QCBBfc6rGEwlR) for information.
3. Click **Update**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/AOPTCtaWW1OJHBdNhxMmO_demo-workflow-agent-update-button-highlighted-on-workflow-canvas.png" size="100" isUploading="false" width="2242" height="856" darkWidth="2242" darkHeight="856" showCaption="false" indent="1"}

4. Drag and drop a specialized agent from the **Agents** section into the **Drag and drop step** section of the workspace or click **Create new specialized agent**. See [Create a specialized agent](docId\:tZPJWDyE1GSB-epLsUh5S).

:::hint{type="info"}
**Note**

Specialized agents run in single-turn mode when used in a workflow agent, regardless of how they are configured. Workflow agents do not support multi-turn conversation. See [Specialized agents overview](docId\:WyA1gsk6tWr84Hum7a1Nx) for information on interaction modes.
:::

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/kPahRdzd9Gr2gLIpRk_Td_demo-workflow-agent-agents-section-add-icon-highlighted.png" size="100" isUploading="false" width="1448" height="1128" darkWidth="1448" darkHeight="1128" showCaption="false" indent="1"}

5. (Conditional) Decide how every input variable gets its value for every specialized-agent step in a workflow (if the agent has input variables):
   File variables are automatic. The workflow agent determines them at runtime, so you cannot set a fixed value.

   1. **Fixed** – You provide the value, and the step uses it on every run.
   2. **Automatic** – The workflow agent determines the value at runtime from the conversation and prior step outputs.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OHG4K84AMZjrExtILvQRl_demo-workflow-agent-specialized-agent-setup-input-variables-configuration-panel.png" size="90" isUploading="false" width="2218" height="874" darkWidth="2218" darkHeight="874" showCaption="false"}
6. Click **Update**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/AOPTCtaWW1OJHBdNhxMmO_demo-workflow-agent-update-button-highlighted-on-workflow-canvas.png" size="100" isUploading="false" width="2242" height="856" darkWidth="2242" darkHeight="856" showCaption="false" indent="1"}

7. Repeat steps 4–6 to build out your workflow agent, linking each agent and logic together instead of the trigger. See [Add logic to your workflow agent](docId\:KWaI2TBwD38sN7p74exoy) and [Add a nested workflow](docId\:KWaI2TBwD38sN7p74exoy) for how to add additional features to your workflow agent.

## Add logic to your workflow agent

**Logic** elements, such as **Conditions**, **Loops**, and **Code** let you build dynamic and automated workflows. These optional elements let workflows adapt to conditions and repeat actions.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/kUZ5XUnW_NmfL9dvbZnXQ_demo-workflow-agent-components-panel-logic-section-condition-and-loop-highlighted.png)

Mark has the following **Logic** elements:

- **Condition** – Make decisions based on specific criteria, directing the workflow down different paths.
- **Loop** – Repeat a series of actions for each item in a specified collection, automating repetitive tasks.
- **Code** – Run custom Python, JavaScript, or Bash code for an exact, repeatable result.

To incorporate logic into your workflow, drag and drop the desired logic element from the workflow builder **Components**. For instructions, see [conditions](docId\:g_9SH-D2uYAaohmW4kF6f), [loops](docId\:Eh6uXq7qNIJ8AIbTU-e27), or [workflow agent code steps](docId:_s_XSUJ9dfsunf2I-xB_8).

## Add a workflow agent as a step

Add a workflow agent as a step inside another workflow agent. Nesting lets you build small, focused workflows and combine them into larger ones. Reuse a common sub-flow, such as content review or approval routing, instead of rebuilding it in every workflow.

### Add a nested workflow

Complete the following steps in Mark:

1. Follow the steps in the [Access your agents](docId\:KWaI2TBwD38sN7p74exoy) section and open the workflow agent you want to edit in the workflow builder.
2. Drag and drop a workflow agent as a step, the same way you add a specialized-agent step. See step 4 in the [Configure your workflow agent](docId\:KWaI2TBwD38sN7p74exoy) section.

The step's **Details** tab shows read-only information about the selected workflow. The **View Agent** link opens the full workflow in a new tab.

Any workflow agent in your instance is eligible. The nested workflow needs no special trigger or configuration. When the parent workflow reaches the step, Mark runs the selected workflow directly. Mark passes the step's message and the parent's context to that workflow, and the nested workflow's output returns to the parent.

### How nested runs display in the execution logs

Keep the following in mind when nesting workflow agents:

- The nested workflow displays as a step in the parent's execution log, with its name and status.
- The step links to the nested workflow's own execution log, so you can open it for full details.
- If the nested workflow fails, the parent step shows as failed with the nested workflow's error message.
- The nested run also displays in the nested workflow's own run history, tagged **Started by \[PARENT\_WORKFLOW\_NAME]**.

See [Workflow agent logs](docId\:cLVkgspflAkgfjWgc9w9V).

### Limits and safeguards

- A workflow cannot reference itself, and a chain of workflows cannot loop back to its first workflow. Mark blocks these configurations when you save.
- Workflows can be nested up to three levels deep (a parent, its child, and a grandchild).
- A workflow used as a step in other workflows cannot be deleted until you remove it from them.

## View an agent's details from the workflow agent builder

Click an individual agent to view its details directly from the workflow agent builder.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/q_wOiSe4jt9Eu5dYePmXK_demo-workflow-agent-specialized-agent-setup-get-all-customer-segments-setup-name-field.png)

Select the **Agent Details** tab to view the agent's information. Click **View Agent** to open a new window with the agent details where you can [edit your agent](docId\:cFB_b7jzgV6k0Ry_cVXSS).

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/B0ACmq5cjEroTe46AagsD_demo-workflow-agent-specialized-agent-agent-details-agent-details-tab-and-view-agent-link-highlighted.png)

:::hint{type="info"}
**Note**

If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See [Turn generative AI off across Optimizely applications](docId\:X5U0kKD2azV5cIdNqwGNj).
:::
