> For the complete documentation index, see [llms.txt](https://docs.ixhello.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ixhello.com/ixhc2/flows/flow-editor/ai-assistants/ai-assistant-flow-generator-and-flow-debug.md).

# AI Assistant: Flow Generator and Flow Debug

### Overview

The Flow Generator is an AI-powered assistant that helps users create new flows or modify existing flows using natural language instructions. Instead of manually building flows node by node, users can simply describe the desired workflow, and the AI generates the flow structure automatically.

The generated flow is created as a draft and displayed on the canvas, allowing users to review, modify, test, and save it before publishing.

***

### Key Benefits

* Create flows using natural language
* Reduce manual configuration effort
* Accelerate flow design and prototyping
* Modify existing flows quickly
* Automatically generate nodes, agents, goals, and routing logic

***

### How It Works

The Flow Generator uses the following inputs:

**Context**

* Current flow (if modifying an existing flow)
* User instructions
* Selected AI provider

**Supported AI Providers**

* OpenAI
* Anthropic

**Output**

The AI generates:

* A new flow draft
* Updated flow structure
* Nodes and connections
* Agent configurations
* Goals and prompts

The generated draft is immediately displayed on the Flow Builder canvas.

***

### User Workflow

#### Step 1: Create or Open a Flow

* Navigate to **Flows**.
* Create a new flow or open an existing flow.
* Open the Flow Builder canvas.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2F8eDPTXeU7bJLVbLRbHpx%2Fimage.png?alt=media&amp;token=5563f262-da12-49cc-ba65-08ac47ff32f4" alt=""><figcaption></figcaption></figure>

***

#### Step 2: Open AI Assist

* Click the **AI-Assist** button.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FoVT7gjyUF8VEg6601D8N%2Fimage.png?alt=media&amp;token=1942d32d-026e-4945-aaa9-d93fb1484c28" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2F3gWL2BJj0FAatWM1oiyA%2Fimage.png?alt=media&amp;token=39fa45a8-e4fa-41b3-967c-d1a0853d902b" alt="" width="429"><figcaption></figcaption></figure>

* Select the desired AI provider:

  * OpenAI
  * Anthropic

  <figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FIxsPehG5quFGsLesWNEI%2Fimage.png?alt=media&amp;token=c2baf04a-6158-44a0-accd-98797c3d157e" alt="" width="410"><figcaption></figcaption></figure>

***

#### Step 3: Enter Instructions

Provide a natural language prompt describing the flow.

**Example**

```
Create an airline support flow that:

- Displays a welcome message
- Provides a menu
- Allows users to:
   - Change a booking
   - Get baggage support
```

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2F6vAEnVR86fyFoQ6qpj9r%2Fimage.png?alt=media&amp;token=85bb8f39-592b-4915-b9b3-f4590fff3ed1" alt="" width="419"><figcaption></figcaption></figure>

***

#### Step 4: Generate the Flow

The AI analyzes the instructions and automatically creates:

* Welcome message
* Menu options
* Agent nodes
* Routing logic
* Connections between nodes

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FWsI1i6jm9yvvpsLVZPF6%2Fimage.png?alt=media&amp;token=75fa4aed-6fe9-44d5-a2d7-b0389b6fcccf" alt=""><figcaption></figcaption></figure>

A summary of changes is displayed, including:

* Newly added nodes
* Updated nodes
* Flow modifications

***

### Modifying an Existing Flow

Users can refine generated flows through additional prompts.

Add a third menu option for transferring customers to a human agent.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FaOMywbddXVw7OnMCfhw9%2Fimage.png?alt=media&amp;token=f64151c6-e344-482b-80e8-e6e92b24aff6" alt="" width="410"><figcaption></figcaption></figure>

The AI updates the flow and inserts the required nodes and transitions.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2F48UulQnm54uLCN9UBICz%2Fimage.png?alt=media&amp;token=2fa1ea6a-9e29-4f9e-aebc-38c90efbf1ea" alt="" width="563"><figcaption></figcaption></figure>

***

### Adding New Flow Components

The Flow Generator can also enhance existing flows by adding new functionality.

Example: Add a Flow Summary node After the Baggage Support Agent.

The AI automatically places the node in the appropriate location and updates the flow connections.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FaYOCfulCrIUstFPp4Yg6%2Fimage.png?alt=media&amp;token=0c3bda18-3892-4e97-ba24-d5d0eec81b2c" alt=""><figcaption></figcaption></figure>

***

### Reviewing Generated Content

After generation, users can inspect all flow elements.

**Menu Nodes**

Generated menu nodes may include:

* System prompts
* Menu options
* Routing conditions

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FSKRTykQM0h9yiBvDzmL3%2Fimage.png?alt=media&amp;token=6b1d3d88-ad20-4180-8cd2-3d88c10403a0" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FjtKGVw0XUrafwHrSyf5z%2Fimage.png?alt=media&amp;token=2ffc0922-9a2b-43d5-9bb6-b0b398be703e" alt="" width="563"><figcaption></figcaption></figure>

**Agent Nodes**

Generated agents may contain:

* System instructions
* Goals
* Data collection requirements

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FSpaDk2miUBIDwavOPof4%2Fimage.png?alt=media&amp;token=1969858d-5811-4337-b2b2-914f174a3629" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FuF4ZFfbaCuST5dfpaEqo%2Fimage.png?alt=media&amp;token=5d4c54cf-b0f5-4c3b-9b6c-4878f3265fe4" alt="" width="563"><figcaption></figcaption></figure>

Goals:

* Collect flight number
* Collect issue description
* Assist with baggage-related requests

**Flow Summary**

Generated summary may contain:

* Summary prompt
* Output

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FKuiQP1m2ICvBiC4TgiFs%2Fimage.png?alt=media&amp;token=7121829e-db34-4e64-87df-7c4248f2c412" alt="" width="563"><figcaption></figcaption></figure>

***

### Testing the Generated Flow

Before testing, save the generated draft.

#### Steps

1. Click **Save**.
2. Launch the test simulator.
3. Start a conversation.

<figure><img src="https://4187494610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe4cpY1jy0FJ4kgC7wSx%2Fuploads%2FQFLBmyXbIVZlG0LGi8yd%2FUntitled.png?alt=media&amp;token=6afc27dd-f610-4f52-8014-98786beee1f9" alt="" width="398"><figcaption></figcaption></figure>

***

### Flow Debug

The Debug Inspector is an AI-powered troubleshooting assistant designed to help users investigate flow execution issues and understand runtime behavior.

It analyzes execution data and provides insights regarding failures, errors, and execution patterns.

***

### Purpose

The Debug Inspector helps users:

* Identify flow failures.
* Diagnose execution issues.
* Understand flow behavior.
* Investigate runtime anomalies.
* Reduce troubleshooting time.

***

### Data Sources Used

The Debug Inspector can access:

* Flow Context: The flow definition being analyzed.
* Execution Details: Information from previous flow runs.
* Session Details: Context associated with the execution session.
* Logs: Runtime logs generated during execution.
* Metrics: Performance and execution metrics.
* Traces: Detailed execution traces that show step-by-step processing.

***

### User Flow

#### Analyze a Flow Execution

* Open a flow.
* Select **Debug Inspector**.
* Choose an execution or session to investigate.
* Enter a question or troubleshooting request.

Example:Why did this flow fail or find the error that caused the customer verification step to fail.

* Submit the request.
* The Debug Inspector gathers:
  * Flow context
  * Session details
  * Execution logs
  * Metrics
  * Traces
* The AI analyzes the information.
* A detailed explanation is generated.
* Review the identified issues and recommended troubleshooting insights.

***

## Benefits

### Flow Generator

* Faster flow creation
* Reduced manual effort
* Natural language-driven design
* Rapid prototyping
* Easier flow maintenance

### Debug Inspector

* Faster issue identification
* Improved troubleshooting
* Better visibility into flow execution
* Intelligent analysis of logs and traces
* Reduced time to resolution

***

### Conclusion

The Flow Generator simplifies flow creation by allowing users to build and modify flows through natural language instructions. It accelerates development, reduces manual effort, and enables rapid prototyping while maintaining full control over the final flow design.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ixhello.com/ixhc2/flows/flow-editor/ai-assistants/ai-assistant-flow-generator-and-flow-debug.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
