AI Toolkit
Restricted ReleaseAlpha
The AI Toolkit is a set of tools to integrate AI into the Tiptap editor.
Use it to build AI agents with text-editing superpowers. Or add any custom AI functionality to the Tiptap editor with its flexible primitives.
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 AI-compatible format
- Edit documents: Let AI make precise edits to the document
- Schema awareness: Inform the AI model about the document's structure
- Display suggestions: Let users review AI-generated content
- Compare documents in real-time and show a diff view
Installation guide
The AI Toolkit is a Pro extension. First, get access by following the private registry guide.
Then, 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')
Next steps
New to the AI Toolkit? Begin with the quickstart guides:
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
) - LangChain.js (
@tiptap-pro/ai-toolkit-langchain
) - Other providers
- AI SDK by Vercel (