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 a diff UI.
Review as summary
More →Display AI-generated changes as a summary instead of inline diffs.
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 like, for example, generating edits or re-writing 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.