ActionKit
API for AI Agents Documentation
Getting Started with ActionKit
ActionKit allows you to call one-off Integration Actions for your users (like Salesforce: Create Record or Google Drive: Get Files), without building and deploying specific workflows.
The ActionKit is designed to give AI agents the ability to call out to integration logic as a part of a prompt or ongoing conversation with a user. The API exposes JSON Schema and OpenAPI specs to easily provide your agent with capabilities including:
-
Creating tasks in Jira based on action items an agent recognizes from a meeting transcript
-
Querying real-time sales reports in Shopify when an agent is asked questions about online sales
-
Creating a Google Docs draft to start a project based on a user prompt
ActionKit can also be used to allow your users to configure their own automations in your app using available Actions or to build UI components in your app powered by Actions, like displaying a table of Salesforce opportunities or a dropdown to select Jira projects.
Usage
There are two ways to consume the ActionKit: using the REST API or using one of our client libraries.
REST API
Base URL
Authentication
To authenticate to the ActionKit, present a Bearer token with the Paragon User Token (a JWT):
TypeScript Client
Install the Actions library with:
You can authenticate as a specific user using paragon.authenticate
:
Functions
List Actions
Every Connected User will have access to different Actions, depending on what Integrations you have enabled in your project and what accounts they have connected. You can list available Actions using the GET /actions
endpoint.
The schema returned by Actions may be user-specific. For example, if the user has custom fields defined for Salesforce Opportunities, they will appear in their version of the SALESFORCE_CREATE_RECORD_OPPORTUNITY
Action schema.
Parameters
Key | Description | Default |
---|---|---|
Run Action
To run an Action, call the Run Actions endpoint with the required parameters.
Integrating with Agents
The @useparagon/actions
library provides convenience methods for adding Actions as available functions or tools to your agent, createAISDKTools
and createLangChainTools
.
If you are using TypeScript and either Vercel’s AI SDK or LangChain, you can use these methods to add Actions as capabilities with a few lines of code.
Other Implementations
If you’re not using TypeScript, you can pass the JSON Schema specs from the ActionKit to the request to your LLM. Here is an example in Python with OpenAI’s library:
When passing the specs directly, you will also need to respond to the agent’s request to use a tool and route it to the ActionKit:
Was this page helpful?