Integrate the AI Agent with your backend
Like other Tiptap AI Extensions, the AI Agent can be used in two ways:
- With Tiptap Cloud: Works out of the box, no server setup required.
- With your own backend: Gives you more control over the AI model and tools.
This guide explains when to use each option.
Tiptap Cloud
Using the AI Agent with Tiptap Cloud is the fastest way to get started. It eliminates the need to build and maintain your own server.
Tiptap Cloud is highly configurable:
- Customize how the AI Agent behaves, by editing the system prompt. Define multiple AI Agents, each with their own rules and personality.
- Provide context to the user messages.
- Customize the AI model. Only OpenAI models are supported in Tiptap Cloud.
Using the AI Agent with Tiptap Cloud is recommended for beginners. To get started, follow this guide.
Custom backend
Beginner's tip
Using the AI Agent for the first time? Set it up with Tiptap Cloud first, and then migrate to a custom backend when you need more features. The migration process is seamless and requires no changes to the original client code.
A custom backend gives you more control but requires more work to set up and maintain. Use it in these situations:
- To use an AI model that is not supported in Tiptap Cloud.
- To define custom tools, such as:
- Tools to interact with the editor. For example, a tool that formats the document.
- Data retrieval tools. For example, a tool that returns the weather forecast.
- To integrate the AI Agent extension with your existing AI Agent that's hosted in your own backend.
To get started with a custom backend, follow this guide.