Documentation
Core Concept

Actions

Powering your agents to call APIs and automate operations.

Custom actions#

An action is a custom tool that connects your agent to internal systems or external APIs. By setting up custom actions, your agent graduates from an answering bot into an active assistant that can perform tasks.

When defining an action, you specify:

  • Action Name & Description: What the tool does, so the agent knows when to trigger it.
  • API Endpoint: The URL, HTTP method, and any authorization headers (e.g. Bearer tokens) required to call the tool.
  • Information Required: The variables required to call the API, such as:
    • Order ID
    • Customer email
    • Subscription ID

Understanding requests#

When a user asks your agent to do something (e.g. "Check the status of order #5124"), the agent uses natural language processing to extract the required variables from the dialogue automatically.

The agent maps these extracted details to your API schema parameters (e.g. mapping #5124 to orderId: 5124). If a required parameter is missing from the user's message, the agent will dynamically ask the user for clarification before triggering the API.

Safety & confirmations#

To prevent accidental data loss or unauthorized modifications, trained.chat features robust safety controls:

  • Confirmation Gateways: You can configure any action (e.g. editing subscription fields, deleting records, or sending payouts) to require explicit user confirmation in the chat window before executing.
  • Isolated Runtimes: Every action is executed within isolated execution environments, preventing data leakage across customer profiles.