Actions
The Actions page in the application allows users to define and manage reusable sets of operations that can be triggered by AI agents. Actions encapsulate a specific workflow, such as making a series of API calls, running scripts, or delivering a message, which can then be invoked from an intent without duplicating the logic.
Overview
The page provides functionalities to:
- Add new, reusable actions.
- List existing actions, filtered by the selected agent.
- Edit existing actions, including their operational flow.
- Associate actions with specific agents.
- Delete actions.
Adding a New Action
To add a new action:
- Navigate to the Actions page.
- Ensure an agent is selected, as actions are associated with agents.
- Expand the "New Action" section.
- A form will appear with the following fields:
- Lookup Names: A button to open a dialog for looking up existing names of variables, prompts, APIs, etc., which is useful when configuring the action flow.
- Action Name: (Text Input) A unique and descriptive name for the action (e.g., "ProcessPayment", "SendWelcomeEmail").
- Action Status: A toggle to activate or deactivate the action. Default is
True
(active). - Use for Privacy: A toggle to set the action to be used as a
privacy action
flow for an intent. - Agent(s): (Multiselect) Select one or more agents that will be able to use this action.
- Action Type: (Selectbox) The general category of the action (e.g., "journey", "twilio_call"). This list is populated from the
Codes
table wherecode_type
isaction_type
. - Action Event: (Selectbox) A more specific event that this action represents (e.g., "credit_card_payment", "password_reset"). This list is populated from the
Codes
table wherecode_type
isaction_event
. - Variable (Action Key): (Selectbox) An optional variable whose value can be used by the action (e.g., a pipeline key for a "journey" action type).
- Language: (Selectbox) The language context for the action (e.g., "en-US").
- Delivery Method: (Selectbox) The default method for delivering any message related to this action (e.g., "sms", "email").
- Action Flow (JSON): (Text Area) Defines the sequence of operations (e.g., API calls, scripts, parsers) that constitute the action.
- Action Flow Editor Button: (Button) Opens a dedicated JSON editor dialog for easier editing of the
Action Flow
. - Action Response Message: (Text Area) An optional message to respond with after the action is completed. If provided, this is considered the final response. Variables can be embedded using
{var["variable_name"]}
.
- Click the "Create Action" button to save the configuration.
Listing Actions
Existing actions for the currently selected agent are listed under the "Actions" subheader.
- Filtering: The list is automatically filtered to display actions associated with the globally selected agent.
- Display: Each action is shown in an expandable section, displaying its name, status (✅ for active, ❌ for inactive), and associated agents.
- Details: Expanding an action's section reveals:
- Action Type and Event
- Action Key (Variable)
- Action Flow (JSON, collapsed by default)
- Action Response Message
- Each action entry has "Edit" and "Delete" buttons.
Editing an Action
To edit an existing action's configuration:
- Click the "Edit" button next to the desired action in the list.
- The "Edit [Action Name]" form will appear, pre-filled with the action's current information.
- All fields from the "Add Action" form are available for modification.
- Helper buttons for "Lookup Names", "Add Variable", and editing the "Action Flow" are available.
- Click "Save Changes" to update the action or "Cancel" to discard changes.
Deleting an Action
To delete an action:
- Click the "Delete" button next to the desired action in the list.
- Confirm the deletion when prompted. The action will be permanently removed from the database.
Adding an Agent to an Action
If an agent is selected, a section appears allowing you to associate existing actions (that are not already associated with the selected agent) to that agent.
- A dropdown lists "Available Actions for [Selected Agent Name] Agent:".
- Select an action and click "Include Action" to add the selected agent to that action's
action_agents
list.
Quick Help - Action Configuration Examples
Actions are sequences of operations (like API calls, parsing data, etc.) that an agent can perform. They are a key part of building complex conversational flows.
An Action Flow defines the steps to be executed in order. Each step is a key-value pair where the key is the step number (e.g., "0", "1", "2") and the value is a dictionary specifying the operation to perform (e.g., {"api": "api_name"}
).
Example 1: Authentication Action
This action executes authorization through an MCP server, parses the status from the results, and executes a set as authorized rule..
- Action Name:
authenticate
- Action Type:
general
- Use for Privacye:
toggled to yes
- Action Response Message:
None
- Action Flow:
{
"0": { "mcp": "authenticate_user" },
"1": { "parser": "parse status" },
"2": { "rule": "authorized check" }
}
Example 2: Multi-Step Password Reset
This action looks up a customer, parses their data, builds their full name, calls an API to reset their password, and then sends the new password via SMS.
- Action Name:
reset password - general
- Action Type:
general
- Language:
en-US
- Delivery Method:
None
(Not needed here, as we have sms message delivered by aDelivery
step.) - Action Response Message:
A temporary password has been sent to your phone number of record.
- Action Flow:
{
"0": { "api": "get gustomer" },
"1": { "parser": "customer map" },
"2": { "merger": "build fullname" },
"3": { "api": "reset password function" },
"4": { "delivery": "sms with password" }
}
Example 3: Customer Data Retrieval
This action looks up a customer, parses their data, and merges their first and last name into a full_name variable. This action doesn't produce a direct response message itself; the resulting variables are intended for use in subsequent steps of an intent.
- Action Name: retrieve customer - general
- Action Type:
general
- Action Flow: