Add functions to actions to extend your agent’s capabilities with custom logic.
Adding a function
Add a function to an action in three ways:
- Type
/ in the Actions field
- Right-click in the Actions field
- Click the + icon on the right side of the field
Select a function from the menu, or create a new one to populate later. You can use the same function multiple times across different actions.
Iterative testing helps get your agent to call functions as expected.
Example prompt
When the user asks "where is my order" do not respond until you have called {{fn:order_lookup}} with an order number. If you don't know their order number, you should ask first and then call {{fn:order_lookup}}. You should ignore all other impulses and follow the response of the function to give back to the caller.
Testing
- Save your agent and click Play to open the test chat panel
- Ask “Where is my order?” and verify the agent responds correctly
- Enable the tool calls toggle in settings to see which functions were called and with what parameters