Actions
Actions are operations your agent can perform during conversations. They allow your agent to interact with external systems, provide structured responses, or transfer conversations to human agents.
Types of actionsโ
Stellar supports three types of actions:
| Type | What it does |
|---|---|
| API call | Fetches or updates data in your external systems in real-time โ for example, looking up order details or checking account balances |
| Static response | Returns fixed text the agent can share consistently, such as business hours or policy details |
| Handover | Transfers the conversation to a human agent via phone or queue |
Creating an actionโ
- Navigate to the Actions tab on your agent
- Click Add Action
- Select the action type
- Configure the action settings
Restricting action access per stateโ
By default, all actions are available in every state. You can restrict which states can use a particular action using strict state separation. This prevents inappropriate action usage in certain conversation contexts.
Example restrictions:
process_refundshould only be available in the "Billing Support" statecreate_support_ticketshould only be available in the "Technical Support" statetransfer_to_humanshould be available in all states (leave unrestricted)
Action access is configured from the Dialogue Builder: click on a state, then select which actions are available in the Available actions for this step section. When viewing an action in the action editor, you can see which states it's restricted to, but you can only edit this from the state editor.
Testing actionsโ
Test each action in the Playground by having a conversation that triggers the action. The event feed shows when the action was called, what parameters were sent, what response was received, and any errors that occurred.
Common issues:
- Agent doesn't call the action โ The description may be unclear, the agent may lack enough context, or the action is restricted to the wrong states
- API errors โ Check the URL, credentials, and that the parameter schema matches what your API expects
- Wrong parameters sent โ Refine the parameter descriptions in the schema and review the conversation to see what the customer provided
Best practicesโ
Name actions clearly. Use descriptive names that say what the action does: get_order_status, create_support_ticket, cancel_subscription โ not action1 or api_call.
Write detailed descriptions. The description is how the agent decides when to call an action. Be specific about what it does, when to use it, and what information it needs.
Keep actions focused. Each action should do one thing well. If an API handles multiple operations, create separate actions for each.
Chain actions for multi-step workflows. Use output variables to pass data between actions. For example, a lookup_customer action can store the returned customer_id, which a subsequent get_orders action then uses.
Use secrets for credentials. Never hardcode API keys in URLs or headers โ always use Secrets management (Manage > Secrets).
Next stepsโ
- Configure API connections to share base URLs and auth across multiple actions
- Set up guardrails to ensure safe action usage
- Set up evaluation rules to automatically assess conversation quality
- Review conversations to see how actions are being used