# Workflow

These steps take you through building a small workflow, running it, and taking it through a review step to completion.

## Introduction

When you create a workflow project, it comes with three steps already in place. This Quickstart adds one more step after them and runs all four.

| Step                       | Kind                     | What happens here                                 |
| -------------------------- | ------------------------ | ------------------------------------------------- |
| **Step 1**                 | A step that holds agents | Drafter drafts a notice                           |
| **Step 2**                 | Review step              | You look at the draft and decide whether to go on |
| **Step 3**                 | A step that holds agents | Finisher tidies the draft and finishes it         |
| **Translate** (you add it) | A step that holds agents | Translator puts the finished text into Japanese   |

Nothing connects to an external service, so you do not need to add any connectors.

**Work on a computer, with the browser window wide.** These steps are written for the width at which the editor is laid out in three parts: left, middle and right. In a narrower window the layout changes, and at about the width of a smartphone some of the buttons used here do not appear.

## Step 1: Create a project

1. Open “Projects” on the left, choose “Projects” at the top, and press “**New project**”
2. Under “How do you want to create it?”, choose “**Build it myself**”, then choose “**Workflow**” under Type. **“Cycle” is selected at first, so switch it**
3. Enter a name and press “**Create**”

Once it is created, the **editor** opens straight away. “Editing tools” and a list are on the left, the diagram of the steps is in the middle (“Editing canvas”), and the settings for whatever you select are on the right (“Properties”).

**Creating the project does not start anything.** It runs only when you run it yourself, later on.

## Step 2: Create three agents

1. Under “**Editing tools**” on the left, choose “**Add Agent**” ＞ “**New Agent**”
2. In “**Create Agent**”, enter a name and a goal (instructions), then press “**Save**”
3. Create the other two the same way

The only two things you have to enter are the **name and the goal (instructions)**. For example:

| Name           | Goal (instructions)                                                                                                                                      |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Drafter**    | Draft a short internal notice, about 80 words, saying that next week's regular meeting moves from Wednesday 3 pm to Thursday 10 am. Only return the text |
| **Finisher**   | Take the draft you receive, make the tone polite and consistent, add a subject line, and finish it. Only return the text                                 |
| **Translator** | Translate the text you receive, subject line included, into Japanese. Only return the text                                                               |

> **Using what you already have in a Schedule or Claw**
>
> If you already use instructions in a Schedule or Claw, you can also turn them into an agent with “Add Agent” ＞ “**Create from a Schedule / Claw**”. Only the content is copied; triggers such as times are not carried over.

## Step 3: Add one step

1. Under “**Editing tools**” on the left, choose “**Add step**” ＞ “**Regular step**”. A “**New step**” is added at the end, and its settings appear on the right
2. Under “**Step settings**” on the right ＞ “**Basic settings**” ＞ “**Name**”, enter “Translate”

Step names are how you tell the steps apart in Execution history and Workflow history.

## Step 4: Place the agents on steps

1. Select “**Step 1**” in the diagram in the middle
2. Under “**Step settings**” on the right ＞ “**Basic settings**” ＞ “**Add Agent**”, choose “Drafter”
3. In the same way, place “Finisher” on “**Step 3**” and “Translator” on “**Translate**”

**Agents on the next step receive the output of the agents on the previous step.** Review steps are skipped, so Step 3 gets the output of Step 1, and “Translate” gets the output of Step 3.

## Step 5: Make yourself the reviewer

1. Select “**Step 2**” in the diagram in the middle
2. Under “**Check settings**” on the right ＞ “**Basic settings**” ＞ “**Reviewers**”, choose your own name

**Without a reviewer, a run cannot start.** And **even the owner cannot decide unless named as a reviewer (or as a reviewer's delegate).**

You can leave the other items at their initial values. With the review method “Stop and wait for a decision” and “Notify and keep waiting” for when the deadline passes, **the run does not move on until you decide.**

## Step 6: Check and apply

1. Press “**Check settings**” at the top of the editor, make sure all four steps show “**OK**”, and close it
2. Press “**Apply changes**”, then “**Apply**” in “Review changes to apply”

**Until you apply, the changes to the steps are not part of the project.** Until then they are a draft, saved temporarily in this browser. **You cannot apply while there is something left to fix.** (Where definition changes need approval in the tenant, an applied change is not used until it is approved. See [Checking a draft and applying it](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/design-guide.md#checking-a-draft-and-applying-it).)

## Step 7: Run it

1. Go back to the project screen with “**Back to the project**”
2. Press “**Run now**” at the top (where definition changes need approval in the tenant, a project that has just been created cannot run until its first definition is approved)

It may take a few minutes before the agent starts working.

## Step 8: Review and proceed

1. Open the “**Workflow history**” tab. The run is listed as “**Running**” and changes to “**Awaiting review**” once Step 1 finishes
2. Open “**Inbox**” on the left ＞ “**Review requests**” and pick the review request from this project
3. Check the draft under “**Agent report**” and press “**Proceed to the next step**”

Once you proceed, “Finisher” on Step 3 starts working, followed by “Translator” on “Translate”.

## Step 9: Look at the result

1. Go back to the project with “**Open project**” at the top of the review request, and check on the “**Workflow history**” tab that the run shows “**Done**”
2. Open the “**Execution history**” tab. The “Agent” column has a row for each of the three agents
3. Select the run time on any of those rows to open the **run record** for that execution. Check the agent's output under “**What was produced**”

**A “Completed” result in the run record means only that the agent neither reported that it could not finish nor said so in its final result.** Look at the output to check that the text is what you meant.

## What to read next

- [Trigger Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/trigger-guide.md) — running at a set time (time triggers)
- [Review Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/review-guide.md) — sending back, rejecting, and how deadlines are handled
- [Design Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/design-guide.md) — how to divide the work into steps
- [Record Guide](https://developers.fd.agenticstar.tm.softbank.jp/en/docs/saas/project/guide/record-guide.md) — how to read run records and metrics
