AI Toolkit
Restricted ReleaseAlpha
The AI Toolkit is a flexible set of methods that help you build AI agents and extensions.
Closed alpha
The AI Toolkit is currently in closed alpha. Contact us to get access.
Features
- AI agent tools: Add text-editing tools to your AI agent
- Primitives: Methods to build custom AI extensions
- Read documents: Get the document's content in a format that's compatible with AI models
- Edit documents: Apply precise edits to the document from AI-generated content
- Get metadata: Inform the AI model about the document's schema and structure
- Display suggestions: Let users review AI-generated content and provide feedback
- Compare documents in real-time and show a diff view
Get started
New to the AI Toolkit? Get started quickly with the quickstart guides:
Example usage
Install the package:
npm install @tiptap-pro/ai-toolkit
Add the extension to your editor and access its methods:
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'
import { AiToolkit, getAiToolkit } from '@tiptap-pro/ai-toolkit'
const editor = new Editor({
extensions: [StarterKit, AiToolkit],
})
// Get the AI Toolkit instance
const toolkit = getAiToolkit(editor)
// Call the AI Toolkit methods
toolkit.insertText('AI-generated content')
API reference
The AI Toolkit is split into packages and modules:
@tiptap-pro/ai-toolkit
: Includes theAIToolkit
extension and primitives- Tool definitions for AI providers
- AI SDK by Vercel (
@tiptap-pro/ai-toolkit-ai-sdk
) - Other providers
- AI SDK by Vercel (