Ampersand AI SDK
The Ampersand AI SDK enables AI agents to seamlessly perform operations on connected SaaS tools through Ampersand’s platform.
The Ampersand AI SDK is in alpha. It may change in non backwards-compatible ways. (Although we are very serious about semantic versioning.)
If you have any feedback, please file an issue on Github.
Installation
Usage
The SDK provides several modules that can be used depending on your framework preference:
Use with Vercel AI SDK
AI SDK by Vercel unifies LLM access in TypeScript & makes it easy to build AI agents.
This is a simple example of how to use the AI SDK tools by Ampersand in a Vercel AI agent.
Use with Mastra
Mastra is a Typescript toolkit that offers agent workflows and eval tools so teams can turn prototypes into production-ready AI agents.
This is a simple example of how to use the AI SDK tools by Ampersand in an agent built with Mastra.
Available Tools
The SDK provides the following tools for interacting with SaaS platforms:
Tool | Description | Purpose |
---|---|---|
createRecord | Creates a new record in the connected SaaS platform | Create new records like contacts, deals, tickets etc. |
updateRecord | Updates an existing record in the connected SaaS platform | Modify existing records with new data |
sendReadRequest | Makes authenticated GET API calls to the provider through Ampersand | Reading and searching records |
sendRequest | Makes authenticated API calls to the provider through Ampersand | Do any action that is available via the API |
checkConnection | Verifies if there is an active connection to the SaaS provider | Validate connection status before creating an installation |
createInstallation | Creates a new installation for a provider | Create an installation for an existing connection |
checkInstallation | Checks if there is an active installation for a provider | Verify installation status |
startOAuth | Returns URL for initiating OAuth flow for connecting to a provider | Authenticates a new user |
Have a tool in mind that we could add? Let us know on Discord!