Getting started
The @zapier/ai-actions-react
package is still in development!
If you want to check it out, please contact us
The @zapier/ai-actions-react
library provides utilities to make it easy to interact with AI Actions from a React application.
Installation
To install the library, run:
Quick start
Render the AiActionsProvider
at the root of your application, or around any components that need to interact with AI Actions.
You can pass the API key as a prop to the provider component, or you can get an OAuth token. See the Authentication guide for more information.
If you’re using a framework like Next.js, the AiActionsProvider
and the
components rendered as children of it need to be rendered client-side.
This can be done by putting "use client";
at the top of the file that uses AiActionsProvider
.
Then, you can use the ActionList
component to list the actions that are available to the user: