AI Flow Builder
Overview
To access the AI Flow Builder, click AI Flows in the AI Agent 2.0 sidebar, then select an existing flow or click Create AI Flow. Here you can design AI Flows, which consist of one or more AI Agents linked to the subagents and tools they can access to complete the task defined in the prompt. In this way, an entire process can be defined in one AI Flow, but depending on each customer's needs, only a portion of the flow may be executed.
For an in-depth example, see How to Create an AI Knowledge Assistant for Chat Scenarios.

AI Agents
Configuring an agent node gives you fine-grained control over AI prompting, including expected input and output data. For more information, see Agent Settings below.
Agents can invoke any tools linked to their node to accomplish the task given in the prompt. In addition, agents can invoke other agent nodes as tools, or subagents, in a collaborative process known as multi-agent orchestration.
Tools
Rather than relying on general training data, the AI model determines when external information or functionality is needed, selects the appropriate tool, provides required inputs, and incorporates the tool’s output into its reasoning process before generating a response or continuing the workflow.
Tools are external capabilities that an AI Agent can invoke to interact with external systems, perform actions, or retrieve information beyond the model's own knowledge scope or abilities. To add a tool within an AI Flow, hover your mouse over an AI Agent node, then click Tool.

The following tool types are available for configuration within your AI Flow:
- Custom API Tool performs an outbound HTTP call using the specified method, URL, parameters, and headers (if any). For more information, see Custom API Tools.
- Custom Code Tool directly executes user-defined code.
- RAG Tool uses information retrieved from a configured knowledge source to generate an answer. Users can refine the definition of the search_query parameter to refine how the LLM should construct the query. For more information, see RAG Tools.
- MCP Server lets the AI Agent invoke tools configured via MCP server integration. For more information, see MCP Servers.
- Zendesk, ServiceNow, and Calendly tools perform a predefined search or action on the specified integration account.
- Tool Pipeline lets you arrange tool calls in an ordered sequence. Tool input is passed to the first tool in the sequence, with each subsequent tool receiving the output of the preceding tool as input. The output of the final tool is returned to the LLM.
Tool instances are not shared or reusable, and exist only within their AI Flows of origin. Once a tool instance is created and attached to an AI Agent, you can connect it to one or more additional AI Agents within the same workspace, or create new tools as desired.
For more information, see Tool Settings below.
AI Flow Builder Interface
AI Flow Settings
Click the gear icon to open the AI Settings dialog, where you can configure the following settings:
Allow Escalation
When enabled, the AI Agent will react to basic cues (e.g. the customer asking to speak with a human agent). You can define additional rules for escalation inside the prompt.
Enable Intermediate Prompts
Enable this setting to prompt the AI to provide short, non-response messages during general AI processing between conversational turns. Intermediate prompts are informational only and do not require a response from the customer; as such, they do not count against customer reply and voice interruption timeouts.
Each entry is treated as a separate prompt, and the system randomly selects one at runtime. Common phrases such as “Okay,” “Got it,” and “I understand” are also available for quick selection.
The Prompt Delay (ms) setting determines how long the system waits before playing the intermediate prompt. This allows short processing times to complete without introducing an unnecessary message.
Intermediate prompts can also be configured for specific tools.
Prompt Caching
Enable to reduce latency and token counts. At this time, this feature is available for OpenAI models only.
Evaluators
Select an out-of-the-box AI Evaluator enabled for your account to approve AI responses and actions, and/or process historical interactions. Evaluators monitor the AI Flow in real-time to provide factual answers rooted in existing knowledge by tracking, reporting, and mitigating hallucinations and otherwise inadequate or non-factual answers.
Tool Evaluators
Select an out-of-the-box AI Evaluator enabled for your account to approve tool calls. Tool evaluators are assigned to the tools specified via the Approver Checkpoint field, and provide no output to the AI Flow. This level of granularity allows you to customize when evaluators are invoked during processing.
Note that Reporters cannot be assigned to evaluate tools.
Allow Access to Triggers
Configure which external systems, including Bright Pattern contact centers, can invoke this AI Flow. Select Allow All Triggers, Allow Selected Triggers, or Allow No One.
Webhook URL
An autogenerated URL that can be used to call this AI Flow from external systems other than BPCC. Allow All Triggers or Allow Selected Triggers must be selected from the Allow Access to Triggers drop-down menu.
Execution History
Click the
icon at the top left of the AI Flow Builder to view the execution history of this AI Flow.
Save as Draft
Click to save your changes to this AI Flow without overwriting the Published version, if one exists.
Publish Draft
Click to move a saved AI Flow draft into the read-only Published state.
Live
Enable the Live toggle switch in the top right corner when you are ready for external systems to invoke this AI Flow.
Agent Settings
Name
Enter a descriptive name for this agent. For example, you can name a top-level agent Concierge if it delegates to multiple subagents. Or, you can name a subagent for its specific function, e.g. Orders Agent.
AI Model
Select the AI model of your choice. Several models are available by default.
Note: Your service provider can enable custom AI models upon request. These can be configured via Integrations.
Prompt
Explicitly define a task or objective for the AI agent to complete during the customer interaction. This task or objective should not be overly restrictive. Be sure to account for any edge cases and define exception handling rules.
In addition, you can use this field to supply the AI agent's identity (name, role, etc.) and the expected conversation flow.
Note: If the AI Agent determines that it cannot achieve the objective set here by the end of the conversation, it will decide to terminate, and the scenario will exit following the Incomplete branch.
Agent as Tool
Enable the Agent as Tool toggle switch to designate this AI Agent a subagent. This toggle switch only appears for AI Agents created after the initial top-level AI Agent.
Definition
This field only appears if Agent as Tool is enabled.
Enter a definition for this subagent that describes its specific purpose, capabilities, and usage instructions. This definition provides context for the top-level AI Agent to determine when this subagent should be invoked, and must be specific enough to disambiguate it from other tools available to the same agent.
Timeout
How long, in milliseconds, the system should wait for an answer to a given request.
Input Values
Click Add Input Value to define the input values the AI Agent should expect to receive from the entity that invoked it.
- Top-level agents receive information from variables defined in the scenario builder. For example, if a scenario discovers the customer's name and phone number before calling the AI Flow, it can pass the information to the AI agent for use in the prompt.
- Subagents receive information from the top-level AI Agent.
Name
Name the input value.
Description
Enter a description of the input value in natural language. This text is used to instruct the AI on what specific piece of information to collect from the customer.
Type
Select the expected value type from the Type selector: String (text), Number, or Boolean (true or false).
Add Return Value
Click Add Return Value to define target information for the AI Agent to collect and return to the entity that invoked it.
- Top-level agents return these values to the scenario that invoked the AI Flow upon AI Flow completion.
- Subagents return these values to the top-level agent upon this node's completion.
Name
Name the return value.
Description
Enter a description of the data in natural language. This text is used to instruct the AI on what specific piece of information to return.
Type
Select the expected value type from the Type selector: String (text), Number, or Boolean (true or false).
Tool Settings
General Settings
Name
Enter a unique label to identify the tool within the AI Flow builder, tool catalog, and execution history. Required for all tool types.
Definition
Describe this tool's specific purpose, capabilities, and usage instructions. This definition provides context for the AI Agent to determine when this tool should be invoked, and must be specific enough to disambiguate it from other tools available to the same agent. Required for all tool types.
Enable Intermediate Prompts
Optionally configurable for each tool, these are static or LLM-generated messages played to reduce perceived latency during processing. For more information see Enable Intermediate Prompts above.
You can configure specific tools to play short, informational prompts when they are invoked, instead of leaving the interaction silent while processing takes place. These messages do not require a response from the customer. Available for all tool types.
If tool processing completes while an intermediate prompt is still playing, the subsequent AI Agent response is queued and played after the intermediate prompt finishes.
- While adding or editing a tool in an AI Flow, toggle Enable Intermediate Prompts on.
- Enter a static prompt in the Prompt field.
- Optional: Enable Override prompt with AI-generated message to play an LLM-generated prompt instead. Clear instructions to generate intermediate prompts must be included in the AI Agent prompt.
Timeout
A runtime guardrail that controls the maximum allowed processing time (in ms) before the tool execution is aborted and considered failed. Available for all tool types.
Note: For Tool Pipeline, this value applies to the entire tool sequence.
Tool Input
Available for Custom API, Custom Code, RAG, and Tool Pipeline.
The Tool Input panel lets you designate information for the AI Agent to pass to the tool when it is invoked. Use the Tool Input icon
in the sidebar of the Edit Tool dialog to expand or collapse the Tool Input panel.
- Click Add Variable in the top right corner of the Tool Input panel to tell the AI Agent that this tool expects certain customer input data when it is invoked.
- In the Name field, enter a unique variable name for this input value.
- Select the expected data type from the Type drop-down menu (e.g. string).
- In the Definition field, define this input in natural language. This field is used to instruct the AI on what specific piece of information to provide to the tool.
- Repeat this process for each desired input.
Mocks
The Mocks panel lets you define simulated execution results to be used during testing. Such results can be used to observe and fine-tune the AI Agent's reaction to errors and other unintended outcomes.
- Click the Mocks icon
in the sidebar of the Edit Tool dialog to expand the Mocks panel. - Select the desired execution result from the Execution Status drop-down menu: Success, Error, or Custom.
- If you selected Error: Select an Error Code from the list of options, or enter a value manually.
- If you selected Custom: Manually enter the desired values in the Custom Status Codes and Custom Status Description fields.
- Manually input a JSON object in the Response Body field to define the output to return to the AI Agent that called this tool.
Custom API Tool Settings
Method
Select the desired HTTP method.
URL
Enter an absolute URL to the requested resource. The URL must return a JSON object.
Query Parameters
Click Add Parameter to add key-value pairs for use in the URL.
Headers
Click Add Headers to add custom HTTP request headers (e.g. X-Api-Key, User-Agent).
Authentication
Enable Authentication if the resource requires authentication. Your credentials are not shared with the LLM.
Note: If the Authentication switch is enabled, any authorization headers will be overwritten by the selected credentials.
Authentication Type
Select the desired credentials; or, to create new credentials, select Create New API Credential, then follow Add API Credentials.
RAG Tool Settings
Knowledge Source
Select the desired knowledge source from the Knowledge Source drop-down menu.
If the selected knowledge source is indexed, the following fields will appear:
Result Limit
The maximum number of results (between 1 and 100) to be returned.
Minimum Score
The minimum relevance threshold (between 0 and 1) for a result to be included. Results with higher scores are more semantically relevant to the AI query.
CRAG
Enable Corrective RAG to rerank return results based on keyword matching.
Tool Input
RAG tools take one input variable named search_query. If desired, click the Tool Input sidebar icon, then use the Definition field to adjust the prompt (e.g. "An English-language keyword-focused query that encapsulates the customer's question).
MCP Server Settings
MCP Server
Select the desired MCP server connection; or, to add a new connection, select Create New MCP Server Connection; then follow the instructions at Add MCP Servers.
Tools
Use these checkboxes to select which functions the AI Flow can call (e.g. retrieving documents). Deselect any functions the AI Flow should not call (e.g. deleting users).
Test Interface
Test AI Flow
Press the Test AI Flow button at the bottom of the AI Flow Builder to invoke a mock execution. For more information, see How to Test an AI Flow.
Test Settings
Click the settings icon next to the Test AI Flow button at the bottom of the AI Flow Builder to access Test Settings.
Define Input Values
This panel lists all inputs expected by the top-level AI Agent node. Enter mock input values here to test how the AI Flow handles inputs. Or, click the pencil icon to view or edit input value definitions in the AI Agent node.
Stream Mode
Enable to receive test responses word by word in real time, as with Claude or ChatGPT.
Mock tool outputs
Enable to test how the LLM will handle different failure modes for Custom API and RAG tools. Click the pencil icon next to a tool to open the tool dialog to the Mocks panel, where you can simulate the desired execution results.
Run Test
Press to open the Execution Trace pane.
Execution Trace
The Execution Trace pane lets you interact with the AI Agent in real time to understand how it reasons and what information it retrieves to support its decisions.
Use the Chat panel to simulate a customer interaction. After changing AI Flow elements, use the Refresh button above this panel to restart the interaction.
Observe the Steps panel to see each step in the execution trace, including which tools the AI Agent invokes. Click on a step to view the JSON input and output data given to and returned by that AI Agent or tool in the Input and Output panes.
Note: Enable the Verbose toggle above the Input pane to view all technical details, or disable it to view what the AI Agent can see.