How to build advanced applications using Flow
After selecting Flow as your orchestration method on the App Details page, click the ‘Next’ button at the bottom right corner to proceed. This will direct you to the Configure Bot page, where you can seamlessly integrate your selected Flow and fine-tune your bot’s settings.

Configure Bot
In this section, you can fine-tune and personalize your bot’s settings by integrating the chosen orchestration method and configuring essential parameters to meet your unique business needs. These adjustments ensure smooth bot operation within your workflow, offering a streamlined, personalized, and outcome-focused experience.
Steps to configure the bot:
Select the Flow
The flow defines the behavior and interaction patterns of your bot. From the available list of flows, choose the one that best matches the desired interaction model for your bot.

How to add Flow:
Click ‘Add’ to open the flow selection dialog.
Choose an existing flow from the list to start building a ZBrain AI app.

Upon selection, the flow governs task execution and subsequent user interactions within the application.

Add guardrails
Upon selecting a relevant Flow, you can add guardrails.
Add guardrails to ensure your app behaves safely, accurately, and within defined boundaries. Guardrails are configurable safety mechanisms that monitor and control inputs, outputs, and behavior to prevent harmful, inappropriate, or off-policy responses.
How to add guardrails:
Click on ‘+ Add a guardrail parameter’. This will open the Add Guardrail Parameter panel in the top-right corner.

Choose from three guardrail types:
Input checking: Validates user inputs to block harmful, inappropriate, or unsafe content.
Output checking: Ensures that responses generated by the app align with the knowledge base.
Jailbreak detection: Detects and prevents attempts to bypass system safety measures.
Toggle on any guardrail to add it. Once added, it will appear in the list below with:
A settings icon for detailed filter configuration
A delete icon to remove the parameter if needed

Configuring guardrails
Click the settings icon for each guardrail to customize filters:
Input checking: Enable content moderation filters for harassment, hate, sexually explicit, and dangerous content

Input checking: Enable content moderation filters for harassment, hate, sexually explicit, and dangerous content

Jailbreak detection: Enable detection of system override attempts, code injection and access to PII

Note: All filters are selected by default. You can deselect or re-enable them based on your app’s safety requirements.
After selecting the flow, click ‘Next’ to proceed to the Appearance page, where you will customize the visual and user interface elements of your app.
From response to recall: Building context-aware apps with Flow integration
Creating an effective app using ZBrain Flow involves more than just designing the logic; it requires thoughtful handling of how responses are delivered and conversations are managed across sessions. Two critical components in this process are app output and app previous conversations. While app output ensures that the right responses are returned to the app after a flow executes, app previous conversations help maintain continuity by referencing past interactions. These should be configured as part of the Flow to ensure the app delivers high-quality responses and retains contextual awareness across user sessions.
App output
The app output component returns the final flow's output to the app after executing the interaction. This step ensures the bot's responses are appropriately delivered and aligned with the defined flow behavior.
Key fields to configure:
Result: The chatbot’s response to the user will appear in this field.
Context: Specify the context or summary of the interaction. This provides valuable insights for reviewing past conversations and understanding user intent.
Instructions for the LLM: Provide specific instructions or prompts for the Large Language Model (LLM). These guide how the response should be crafted, whether you want it to be concise, detailed, empathetic, or task-oriented.
Model used: Choose the appropriate LLM that will generate the bot's response. This selection determines how advanced or creative the responses will be.
Temperature: Adjust the model’s creativity level.
A lower value (e.g., 0.2) delivers more deterministic and factual responses.
A higher value (e.g., 0.8) produces more diverse, creative, and open-ended replies.
Note: The following fields, context, instructions for the LLM, model used, and temperature , will be logged in the query history logs of the application. These entries help ensure transparency, reproducibility, and improved review of past interactions.

Managing conversational flow
To make conversations feel continuous and intelligent, your app needs to remember what was previously discussed. The app previous conversations component in ZBrain allows your app to retrieve and use historical data to provide more personalized, context-aware interactions.
Key fields to manage conversations:
API key: Input your API key to authenticate access to the conversation logs and ensure secure data retrieval.
Select app: Choose the app whose historical data you want to access, especially important when working across multiple applications.
Select app sessions: Pick a session ID to retrieve specific past conversations. This helps your bot tailor its responses based on prior interactions from the same user.
Limit: Set how many past messages should be fetched (e.g., the last 10 queries). This keeps the context relevant without overwhelming the flow with too much history.


Why managing conversational flow matters: By integrating past interactions, your app can maintain continuity, avoid repetitive responses, and build a more human-like relationship with users. This significantly improves the user experience by:
Keeping responses relevant to the conversation’s history
Personalizing outputs based on previous inputs
Allowing the app to handle complex, multi-step interactions over time.
2. Set appearance
Here you can personalize the visual identity and the user interface of your app. The appearance settings help ensure that your app aligns with your brand's design guidelines, making it easier for users to engage with the bot.
Steps to set the appearance:
Welcome message
This message is shown to users when they first launch the app. It's their first interaction with the bot, so it should be welcoming and informative.
Enter a short, engaging welcome message that introduces the bot and guides users on what to expect.
Example: “Hello! I’m your virtual assistant. How can I help you today?”
App name and description
This helps users understand what the app is about right from the beginning. The app name and description provide context for the bot’s purpose.
Enter a name for your app.
Provide a brief description that clearly explains the app’s functionality and what users can achieve with it.
Example:
App name: "Smart Support"
App description: "A personal assistant to help you with customer service queries, 24/7."
Sample questions
Sample questions guide users on how to interact with the app, making the interaction smoother and more intuitive.
Add up to nine sample questions that users can refer to when they need guidance on what to ask the bot.
You can either enter these questions manually or click ‘Generate questions’ to have sample questions generated based on the bot’s capabilities.

Upload app logo and theme
Branding is essential for a consistent user experience, and this setting allows you to upload your app’s logo and select a theme that reflects your brand’s identity.
Upload app logo: Click ‘Upload’ to choose an image file for your app's logo. This will be displayed at the top of the app and in other relevant sections.
Select theme: Choose a color theme that matches your brand’s design scheme. You can either select from predefined themes or customize the color palette to your liking.
Bot name and icons
This step allows you to personalize the bot itself by giving it a unique name and choosing icons that reflect its identity within your app.
Bot name: Enter the name you want your bot to be called. This name will be displayed when the bot interacts with users.
Bot icon: Choose an icon that represents your bot visually. This icon will appear in the app interface where the bot is visible.

Finalizing setup
Once you have finished the customizations mentioned above, you will have the following options:
Click ‘Done’
This will save all your settings and complete the configuration of your app. You will then be directed to the Overview Page, where you can manage other aspects of your application, such as monitoring bot performance or reviewing user interactions.
Click ‘I will do later’
If you are not ready to finalize the appearance settings, you can choose to skip this step and configure the appearance at a later time. You can always return to the Appearance Page to make updates.
Last updated