AI Agents
AI agents can interact with their environment to accomplish complex tasks. The AI Toolkit contains built-in tools that allow your AI to read, edit, and comment on documents.
With the AI Toolkit, you can build agents with a wide range of capabilities:
AI agent chatbot
More βBuild a conversational AI agent that can read and edit documents through chat.
Review changes
More βPreview and approve AI-generated changes using decorations or tracked changes.
Tool streaming
More βStream tool calls in real-time to see changes as they happen.
Add comments
More βGive your AI agents the ability to read, write and edit comments.
Multi-document
More βBuild an AI agent that can edit multiple Tiptap documents at once.
Selection awareness
More βMake the AI aware of the selected content in the editor.
Schema awareness
More βAllow your AI model to understand custom nodes, marks, and attributes.
Available tools
The AI Toolkit provides tool definitions for popular AI provider libraries like the Vercel AI SDK, LangChain.js, OpenAI, and Anthropic.
When you add these tool definitions to your AI agent, the AI model can generate tool calls that are then executed using the executeTool method. This allows the AI to read, edit, and manipulate documents based on user requests.
AI Agents vs. Workflows
In AI agents, the AI model can choose from a set of tools to perform a task. Workflows, on the other hand, only allow the AI model to perform a single action, such as generating edits or rewriting the document.
In general, workflows are simpler and faster to implement than AI agent tools. However, AI agents are more flexible and can be used to perform more complex tasks.