Genesys Cloud provides comprehensive agentic virtual agent capabilities that enable agents to access real-time data and complete end-to-end actions through integrated tools and data actions. Tool creation requires entering meaningful names with clear naming conventions, detailed descriptions explaining objectives and parameters, and selection of data action sources. The Input tab allows configuration of pre-instructions that establish conditions, guidelines, and authentication requirements for tool usage, while input variables can be created new or linked from existing sources to optimize agent performance and reduce token consumption.
The platform supports two validation modes for output instruction configuration: Builder mode for standard conditions using a guided interface with up to five groups and five checks each, and Code mode for custom Python logic handling complex validations. Builder mode includes 14 condition types with logical operators, while Code mode requires bare Python expressions returning True or False. Output instructions define agent behavior tool responses and can be edited, deleted, or reordered through the interface.
Variable masking capabilities prevent agents from viewing or using sensitive data such as authentication tokens, UUIDs, and internal IDs while maintaining full functionality, thereby reducing sensitive data exposure and improving performance through decreased context size and latency. However, certain data action output schema features are not supported, including schema combinators, conditional keywords, references, negation, constants, empty objects, tuple validation, and nested arrays.
Error handling configuration requires creating error cases with meaningful names, descriptions explaining trigger conditions, mapped system status codes, and direct default instructions for agent responses. Error handling instructions are enabled by default but can be overridden or disabled as needed. The agentic virtual agent profile interface includes configurable sections for Agent Tools, Knowledge, A2A, Configuration, and Guardrails, with incomplete sections marked by indicator icons. Agents can be saved with incomplete sections but cannot be published until all sections are fully configured. Prerequisites include Virtual Agent enablement in the organization and appropriate AI Studio permissions, with role-based access available for various user types
Virtual Agent enabled in your organization. For more information, contact your designated Customer Success Manager.
AI Studio permissions for agentic virtual agents. For more information about all the required permissions, see AI Studio permissions.
Tools are data actions that provide your agentic virtual agents access to real-time data, enabling them to complete end-to-end actions.
Enter basic details and choose a data action
Click Menu > Orchestration > AI Studio > Agentic Virtual Agents.
(Optional) To search for a specific agent, start typing the name of the agent in the search box. As you type, the matching agents are shown.
To open an AI agent, click the agent’s tile. The Agent profile view opens.
Click the Tools tab.
Click Create. The Create Tool view opens.
Under Overview, add a meaningful name. For example, “validate user login code.” Genesys recommends that you add a get prefix when the agent gets something from the tool, for example, “get available hotels given distance.”
Add a description that clearly states the tool’s objective. For example, “Sends the user’s login credentials to an API endpoint. If the login credentials are valid, return a session token (aka auth token). Otherwise, return an error message.”
In the Source section, select a data action from the Choose a data action list. For more information about creating a custom data action, see Create a custom action for integrations.
Click Next to proceed to the Input tab.
Do / Don’t
Example
Explanation
get user checking details
authorize a single user session
validate user login code
pay bill to electricity provider
get all authorized customer orders
Be clear in its purpose.
get available hotels within a specified distance
Include the word “get” when the tool gets you some data.
this_is_my_tool
tool_get_stuff
get_user_details
tool123
check_user
Too vague about its purpose.
Do / Don’t
Example
Explanation
Sends the user’s login credentials to an API endpoint. If the login credentials are valid, the system returns a session token (aka auth token). Otherwise, it returns an error.
A good description explains what the tool does, when to use it, what kind of parameters are used, and what it returns.
This tool returns all general knowledge about the user. This information must be remembered and can be used for any questions the user can ask.
The description does not provide any value. Also, a single tool cannot do everything. It must be specific.
Set up inputs
Add pre-instructions
Under Pre-instructions in the Input tab, click Add and add any conditions that must be met before this tool is used by the agent. For example, “Obtain only the user’s login code to log in. Once they are authenticated, do not ask for authentication again.”
Add as many pre-instructions as needed for the intended tool usage.
Good pre-instructions answer these questions:
How should the agent use the tool that you are specifying?
What information should the agent ask the user for?
What must the agent do before it calls the tool?
Do you want the agent to confirm information from the user before calling this function?
What should the agent think about before it gets to this tool?
Do / Don’t
Example
Explanation
You must obtain only the user’s login code to log in. Once the user is authenticated, do not ask for authentication again.
Indicate what the agent must do before it calls the tool.
This function retrieves all accounts for a user. If the user has questions about accounts in general, or about opening new accounts, call search_knowledge_base.
Provide more information about what the tool does. If the model decides to call it, specify what it should consider beforehand. With this information, it can choose to call another tool instead.
If the user requests to exit the conversation or log out, you must call this function to end the session. This action ends the current session.
Provide more context about what happens when the tool is called so that the agent can give the user more context.
When you call this tool, you act as a School Assistant agent.
Incorrect use of pre-instructions. Do not switch to another domain.
You can call all other tools whenever you want.
Incorrect use of pre-instructions.
Turn pre-instructions into contextual comfort (wait) statements
Link the existing variables that must be collected before the tool is actioned.
To mark a variable as required, follow these steps:
Under Required variables in the Input tab, click Add. The Required variables dialog box opens.
In the Name field, enter a meaningful name for the variable linkage.
Under Link variable, click Select. The Link existing dialog box opens.
Select a variable from one of the following tabs:
Tool Input
Tool Output
Start context
Click Select to confirm the variable selection.
Click Add.
These linked variables are now available for further use in the validation rules which you can configure in the Validation checks section.
Add validation checks
Define strict validation rules that the agent must pass before the tool is actioned. The system offers two flexible ways to create your preconditions:
Builder: Use the guided interface to build the validation logic to meet your requirements. This mode is recommended for common rules and regular format checks.
Code: Use the code editor to write custom logic for advanced or unsupported validation checks.
Considerations
In Builder mode, you can add up to five groups. Each group can contain up to five checks. Also, Builder mode does not support nested grouping.
Builder mode supports standard conditions. To work with arrays or create more complex groupings, use Code mode.
To create an out, follow these steps:
Under Validation checks in the Input tab, click Add and add any validations that must pass before this tool is used by the agent.
Select either the Building or Code mode for building your validation logic:
If you chose the Builder mode, follow these steps:
Use the toggle switch to select between the AND and OR operator.
From the Select input list, select one of the required input variables.
From the Select condition list, select the required condition.
Condition
Description
is null
Returns true if the value is empty or not set.
is not null
Returns true if the value is present.
equals
Returns true if the value exactly matches the specified value.
does not equal
Returns true if the value does not exactly match the specified value.
in
Returns true if the value matches any value in the specified list.
not in
Returns true if the value does not match any value in the specified list.
contains
Returns true if the value includes the specified text.
doesn't contain
Returns true if the value does not include the specified text.
begins with
Returns true if the value starts with the specified text.
ends with
Returns true if the value ends with the specified text.
less than
Returns true if the value is less than the specified value.
less than or equal to
Returns true if the value is less than or equal to the specified value.
greater than
Returns true if the value is greater than the specified value.
greater than or equal to
Returns true if the value is greater than or equal to the specified value.
In the Enter value field, enter the value that must match against the selected condition.
Click Add check to more validation checks.
Click Add group to add a separate group of checks along with its own conditional operator.
If you chose the Code mode, enter your custom validation logic.
In the Failure instruction field, enter the instruction that the agent must follow when the check is not met. Include the next action, such as asking the participant to correct or provide the required information, or end the conversation if necessary.
Click Create to add the validation check.
Edit or delete validation checks
Under Validation checks in the Input tab, hover over the validation check that you want to edit or delete, and then click Edit or Delete.
Reorder validation checks
Under Validation checks in the Input tab, hover over the validation check that you want to reorder, and then click More.
Select the appropriate option to move the validation check up or down in the list. You can also add a new validation check above or below the current one.
Set up input variables
The input variables are pulled from the data action. To ensure that they are set up for the tool, follow these steps:
Note: The system automatically retrieves the field names and descriptions from the chosen data action.
To set up the input variables for the tool, follow these steps:
Under Inputs in the Input tab, select one of the following options:
Create new: This option allows you to create a new input variable to use with the tool.
Link existing: This option allows you to link to an existing variable from another tool or start context from outside the agent.
If you selected Create new in the previous step, enter these details:
In the Name field, enter a variable name.
In the Description field, provide a clear description about the variable. For example, “8-digit login code that is used to authorize a user into the system.”
From the Advanced type list, select one of the following options:
Exact user input: Use this option if you want the agent to capture the value exactly as provided by the participant. This option works best for direct identifiers such as names, email addresses, and physical addresses. Genesys recommends that you avoid using this feature when the agent needs to infer, transform, correct, or summarize the user input.
List: Use this option to add a comma-separated list of values if you want the agent to accept only those values.
If you selected Link existing, do these steps:
Click Select to view all available variables on the right pane.
Select the required variable or create the relevant start context and click Select.
Notes:
When a value is already defined elsewhere, such as in a start context variable or another tool, link to it instead of defining it again. Duplicate definitions increase the agent’s size and are sent to the model on every turn.
If the system masks an output variable value from the agent, the masking state is indicated by the icon, which appears next to the variable name.
Click Next to proceed to the Output tab.
Set up the output object
Under Output fields, enter the following details:
In the Name field, enter an output object name. For example, “PaymentRecord.”
In the Description field, provide a clear description about the output object. For example, “Record of a processed payment transaction.”
Select the output fields to include in the output object. Then, modify the output field descriptions, if needed.
Notes:
The system automatically retrieves the field names and descriptions from the chosen data action.
Select only the output fields that the agent needs. Every selected field contributes to the agent’s size, so including unused fields increases token consumption unnecessarily.
(Optional) Enable the Mask value from agent toggle, which prevents the agentic virtual agent from reading the raw value. This option is unavailable for mandatory (required) output fields.
(Optional) Add output instructions.
Click Next to proceed to the Summary tab.
Note: If the system masks an output variable value from the agent, the masking state is indicated by the icon, which appears next to the variable name.
Add output instructions
Define how the agent behaves after receiving the tool’s output. The system offers two flexible ways to create your output conditions:
Builder: Use the guided interface to build the validation logic to meet your requirements. This mode is recommended for common rules and regular format checks.
Code: Use the code editor to write custom logic for advanced or unsupported validation checks.
Considerations
In Builder mode, you can add up to five groups. Each group can contain up to five checks. Also, Builder mode does not support nested grouping.
Builder mode supports standard conditions. To work with arrays or create more complex groupings, use Code mode.
In Code mode, the tool response is available through the result object. Write a bare Python expression that returns True or False, such as result.temp > 30, instead of a lambda function such as lambda result: result.temp > 30.
To build an output validation logic, follow these steps:
Under output Instructions in the Output tab, click Add and add any validations that must pass before the agent follows the output instruction.
Under Conditions, select either Builder mode or Code mode to define your validation logic.
If you chose the Builder mode, follow these steps:
Use the toggle to select either the AND or OR operator.
From the Select output list, select one of the available output variables.
From the Select condition list, select the required condition.
Condition
Description
is null
Returns true if the value is empty or not set.
is not null
Returns true if the value is present.
equals
Returns true if the value exactly matches the specified value.
does not equal
Returns true if the value does not exactly match the specified value.
in
Returns true if the value matches any value in the specified list.
not in
Returns true if the value does not match any value in the specified list.
contains
Returns true if the value includes the specified text.
doesn’t contain
Returns true if the value does not include the specified text.
begins with
Returns true if the value starts with the specified text.
ends with
Returns true if the value ends with the specified text.
less than
Returns true if the value is less than the specified value.
less than or equal to
Returns true if the value is less than or equal to the specified value.
greater than
Returns true if the value is greater than the specified value.
greater than or equal to
Returns true if the value is greater than or equal to the specified value.
In the Enter value field, enter the value that must be matched against the selected condition.
Click Add check to more conditions.
Click Add group to add a separate group of conditions along with its own logical operator.
If you chose the Code mode, enter your custom validation logic.
Tip: In Code mode, you can enter the value “True” to ensure that the agent always follows the output instruction.
In the Instruction field, enter the instruction that the agent must follow when the condition is met. Include the next action, such as acknowledging the participant that the authentication worked.
Click Create to add the output validation logic.
Edit or delete output instructions
Under output Instructions in the Output tab, hover over the output instruction tile that you want to edit or delete, and then click Edit or Delete.
Reorder output instructions
Under output Instructions in the Output tab, hover over the output instruction tile that you want to reorder, and then click More.
Select the appropriate option to move the output instruction up or down in the list. You can also add a new output instruction above or below the current one.
Mask variable values from the agent
If the Mask value from agent toggle is enabled for an output variable, the agent knows that the variable exists but cannot view or use its actual value. This option is recommended for sensitive or non-meaningful values such as authentication tokens, UUIDs, and internal IDs.
Benefits include:
Reduced exposure: Limits the agent’s access to sensitive or unnecessary values
Improved performance: Reduces context size, which can help lower latency
The agent continues to function as expected, but it does not reference or reproduce the masked value.
Considerations for data action output schema
When you define the data action for your agentic virtual agents, consider these schema restrictions.
Agentic virtual agents do not support the following schema features:
Schema combinators: oneOf, anyOf, allOf
Conditional keywords: if, then, else
Schema dependencies: dependencies
References: $ref
Negation: not
Constants: const
Structural restriction:
Empty objects (objects without properties)
Tuple validation (multiple schemas defined in items)
Nested arrays (items cannot be of type array)
Configure error handling
Create error cases
In the Errors tab, click Create. The Create error case panel appears.
In the Error name field, enter a meaningful name for the error case. Use a name that indicates the cause of the error or resolution such as ServerError, Re-authenticate, and Wait-Then-Retry. Also, the name must not contain spaces.
In the Description field, explain when this error must be triggered.
In the Error codes list, choose one or more system status codes that you want to map to the specific error. Once you map an error code to an error, the code becomes unavailable for use in subsequent error case additions.
Note: If the system returns a matching status code (any of the mapped codes in case of multiple mapped codes), the agent runs the configured instruction.
In the Default instruction field, instruct the agent to how to respond if the specific error occurs. The instruction works best when it is direct, with the suggested content provided in quotation marks. For example, Tell the customer, "An error has occurred; please contact the branch." is better than "Ask the customer to contact the branch."
Click Create. By default, the newly created error handling instruction is enabled.
Do / Don’t
Example
Explanation
The requested information does not exist in the system.
Describes the error in plain language.
Some required information was missing or entered incorrectly.
Explains what went wrong and why.
The system could not complete the request currently.
Keeps the explanation concise and specific to this scenario.
The user does not have access to the requested information.
Makes this error clearly different from other defined error cases.
Do / Don’t
Example
Explanation
Tell the customer, “I’m sorry, an unexpected error occurred, and it is not possible to retry. Would you like to speak to an agent?”
Instructs how the agent must respond if this error occurs. The agentic virtual agent offers an option to escalate to a human agent.
Tell the customer, “Authorization has failed; please retry or request to speak to an agent.”
Instructs the agent to inform the participant about the specific cause of the error. Recommends retrying with the correct credentials. Also, the agent offers an option to escalate to a human agent.
(Optional) Override the default error handling instruction
Under Error cases, hover your mouse on the (Default) field of an error case and click Edit. Then, add your new instruction and click Confirm.
Disable error handling instructions
Whenever you create an error case, the system enables it by default. You can disable (or enable) it using the toggle button on the error case tile.
Review and save the tool
In the Summary tab, review all the parameters of the tool.
To edit the parameters, click Edit.
Click Create.
Navigate the agentic virtual agent profile
The profile contains the following sections and a preview widget:
You can switch to any of the sections of the agentic virtual agent while creating a new agent, editing an existing agent, or viewing an agent. Any incomplete section is indicated by the icon preceding the section name. You can save an agent with an incomplete section but you cannot publish the agent until all sections are complete.
After you have completed all necessary sections of the agent setup, you can click Publish to publish the flow.