Most AI tools today can generate text. That’s the easy part. The hard part is editing text inside real documents.
We ran into this problem ourselves: how do you give an AI agent the ability to make changes in a rich text editor without wrecking the structure? Tables, lists, headings…they’re not just strings. They’re nodes in a schema. If the model doesn’t respect that schema, the document breaks.
That’s why we built the Tiptap AI Toolkit.
If you have used Cursor for programming, you have seen how powerful it is when AI can work directly inside code. The AI Toolkit brings that same pattern to text editors.
Why editing is harder than it looks
We’ve seen developers duct-tape AI into rich-text editors using getText()
and insertText()
. Those are the only APIs most editors expose. So the results are unpredictable. One edit breaks the structure. The next one erases formatting. If you treat a document as plain text, the only way to apply edits with AI is to replace the entire thing every time. That’s slow, it costs a lot of tokens, and it feels slow and clunky for users who are waiting for the whole doc to regenerate just to see a small change.
Tiptap has a JSON-based content model with schema validation. That gave us a foundation to expose the document structure to AI, instead of pretending it’s just text. The Toolkit is a set of primitives to make that work.
You get an actual interface between your document and the model. Not a one-way prompt.
What you can build
- Edit with precision. Stream edits token by token, or wait until the agent is done. Apply them inline or show a diff. The editor stays intact.
- Respect your schema. AI understands what’s allowed in the document. No surprise elements.
- Keep users in the loop. Every edit becomes a suggestion. Users can accept, reject, or pick from multiple options.
- Compare documents. Show what changed and where. Useful for audits, history, and trust-building.
It’s the difference between a working demo and something you can trust in production.
Under the hood
The AI Toolkit gives you a set of primitives:
- Read a document in text, HTML, or JSON (markdown is coming soon)
- Apply targeted edits without breaking structure
- Enforce and understand the Tiptap schema
- Let your users review changes generated by AI
- Compare before/after states with diffs
You can build custom tools on top of these. Or plug them into existing agents using OpenAI, Claude, or anything that works with your own, existing AI Backend infra.
An example we built
We published a guide that shows how to build an in-editor chatbot. It reads the document, suggests improvements, and shows a visual diff of what changed. The agent pauses while the user reviews suggestions, then continues the conversation.
It’s a thin layer of React + Next.js on the frontend, OpenAI on the backend, and Tiptap + the AI Toolkit in the editor. The important part isn’t the chatbot itself. It’s that the agent edits the document without breaking it, and the user stays in control.
Who it’s for
- Developers building AI-first products with structured content
- Teams that want users to trust AI suggestions
- Anyone frustrated by slow and brittle AI integrations
The AI Toolkit is battle-tested in production, driving writing platforms, collaboration tools, and large-scale apps with millions of users.
The main theme: if your product depends on structured documents, the AI Toolkit gives you a reliable way to let AI work on them.
Early access
The AI Toolkit is in limited beta for Tiptap Enterprise customers. We’re opening it up gradually.
On a self-service plan? Request access and tell us what you’re building.