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

# Guideline for Desigining the Agentic Workflow

> Learn how to design effective agentic workflows with step-by-step guidance for beginners. This guide helps you create automated processes that work intelligently to accomplish your goals.

<Note>
  **What you'll learn**

  * How to design an effective agentic workflow step-by-step
  * Understanding the different components of an agentic workflow
  * Best practices for testing and optimizing your workflow
</Note>

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_1.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=c581b8fb18379957dee3ffbc1f2bf487" width="1843" height="932" data-path="images/agentic_ai/workflow_design/aw_1.png" />
</Frame>

## Workflow Parts

Workflow design has four parts:

* **Add Assistant**: Add an assistant to the workflow.
* **Connect Assistant**: Connect the assistant to it's parent assistant.
* **Save Workflow**: Save the workflow before testing.
* **Test Workflow**: Test the workflow to make sure it works as expected.

## Type of Assistant

### Primary Assistant

Primary assistant is the entry point of the workflow. It is the assistant that will be used to start the workflow and delegate the tasks to other assistants. Let's say you want to build an AI system that can schedule appointments, register complaints, and answer FAQs. You can create three assistants for each task and connect them with primary assistant.

Primary assistant can be used as following:

* **Task Delegation**: Delegate the task to other assistants.
* **Greeting**: Greet the caller and do some small talk.
* **Simple Agent**: Can be used as a simple agent just like the simple assistant.

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_3.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=9886a478c3312c6650c08123d9d10588" width="1840" height="913" data-path="images/agentic_ai/workflow_design/aw_3.png" />
</Frame>

Primary assistant has following **components**:

* **Agent Capabilities**: Define the capabilities of the primary assistant. What it can do and what it can't do.
* **Agent Tasks**: Define the task steps that the primary assistant can follow.
* **Tools**: Define the tools that the primary assistant can use. It can be built-in tools or custom tools.
* **Knowledge Base**: You can connect your knowledge base to the primary assistant just like simple assistant.

<Warning>Renaming the primary assistant title is not allowed.</Warning>

## Secondary Assistant

Secondary assistant is the assistant that will be do the actual tasks. Like **Book Appointment**, **Register Complaint**, **Answer FAQ**. If caller ask "I want to book an appointment", the primary assistant will delegate the task to secondary assistant (Book Appointment Assistant). Then the secondary assistant will continue the conversation with the caller. It will check the availability of the slot, confirm the details and book the appointment. **When the task is completed, the secondary assistant will return the result to the primary assistant.**

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_4.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=b70cd8022a29bbc393f89e8b40c66d87" width="1838" height="925" data-path="images/agentic_ai/workflow_design/aw_4.png" />
</Frame>

Secondary assistant has following **components**:

* **Agent Capabilities**: Define the capabilities of the secondary assistant. What it can do and what it can't do.
* **Agent Tasks**: Define the task steps that the secondary assistant can follow.
* **Tools**: Define the tools that the secondary assistant can use. It can be built-in tools or custom tools.
* **Knowledge Base**: You can connect your knowledge base to the secondary assistant just like simple assistant.

<Info>
  If you add a child assistant to the secondary assistant, it will act like both primary and secondary assistant and delegate the task to the child assistant when necessary.
</Info>

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_5.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=4a7c066225e8093685e3a5080316a3f7" width="1842" height="929" data-path="images/agentic_ai/workflow_design/aw_5.png" />
</Frame>

<Warning>
  Remember always provide a descriptive title to the secondary assistant. It will help the LLM to understand the task and delegate it to the secondary assistant.
</Warning>

## Save the Workflow

To save the workflow, you can use the **Save** button. It will save the workflow and you can use it later.

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_9.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=e99acac44f14ddd4542307c64fea2164" width="1841" height="921" data-path="images/agentic_ai/workflow_design/aw_9.png" />
</Frame>

## Testing the Workflow

To check the workflow, you can use the **Test** button. It will open a new tab with the workflow. You can see the conversation flow and the result.

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_7.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=578a83458910efb5d3c0b8051d6c3f45" width="1829" height="914" data-path="images/agentic_ai/workflow_design/aw_7.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/hishabsingaporepteltd/Bd-nkhA8cT0nKgAS/images/agentic_ai/workflow_design/aw_8.png?fit=max&auto=format&n=Bd-nkhA8cT0nKgAS&q=85&s=91cb3e630a2c5fe4bfa5b12228a6d70b" width="1835" height="930" data-path="images/agentic_ai/workflow_design/aw_8.png" />
</Frame>

<Tip>
  Remember to save the workflow before testing.
</Tip>

## Best Practices

<CardGroup cols={2}>
  <Card title="Task Delegation" icon="share-nodes">
    Configure your primary assistant to effectively identify and route requests to the appropriate secondary assistants.
  </Card>

  <Card title="Descriptive Titles" icon="tag">
    Give secondary assistants clear, descriptive titles that help the LLM understand their specific functions.
  </Card>

  <Card title="Agent Capabilities" icon="list-check">
    Clearly define what each assistant can and cannot do to ensure proper task handling.
  </Card>

  <Card title="Knowledge Integration" icon="brain">
    Connect relevant knowledge bases to both primary and secondary assistants for comprehensive responses.
  </Card>

  <Card title="Workflow Structure" icon="sitemap">
    Design your assistant hierarchy thoughtfully, with the primary assistant as the entry point and specialized secondary assistants for specific tasks.
  </Card>
</CardGroup>
