Skip to main content
You can set an action that uses router.push or window.location to navigate the user to a different web page. If you need to pass in parameters - one way of doing that is to include them in the query of the url
example

Scroll to an element

You can set an action that uses the scrollIntoView function on a ref that will scroll the view to the desired element
example

Enforcing structure or format

When getting information from the user, it is often required that the information be ingested in a specific format.
For example for providing a date, there are multiple ways users can say the date - “7th May 2025” or “May the 7th this year” etc. In such cases, you can provide the format in which you want the date to be in the description of the action.
example

Controlling agent behaviour based on function output

Often times you might want the agent to say or act in a specific manner based on the output of the function. In such cases, the return of the function can include instructions for the agent on how to handle the outcome. For example, in our submitDate example, we can tell the agent to tell the user to provide a date after 2025.
example
The return object can have any structure you choose—you may add your own keys as needed. The underlying language model is flexible enough to interpret custom return formats.

Interacting with the backend

You can pass an action that calls your backend via a fetch call or any other http library of your choice.
example