This is a Next.js project demonstrating the Tiptap AI Toolkit capabilities.
AI agents allow the AI model to choose from a set of tools to perform tasks. They are more flexible and can be used to perform more complex tasks.
- AI Agent Chatbot (
/ai-agent-chatbot) - A simple AI agent that can read and edit Tiptap documents - Chatbot with Tool Streaming (
/tool-streaming) - Chat with an AI that can read and edit Tiptap documents using tool streaming
- Review Changes (
/review-changes) - Preview and approve AI-inserted changes using suggestions - Review Changes as Summary (
/review-changes-as-summary) - Preview and approve AI-inserted changes using suggestions as a summary
- Multi-document AI Agent (
/multi-document) - An AI agent that can read and edit multiple Tiptap documents at once - Comments (
/comments) - An AI agent that can add and manage comments and threads in a Tiptap document - Schema Awareness (
/schema-awareness) - An AI agent with schema awareness enabled. It understands custom nodes and marks. - Selection Awareness (
/selection-awareness) - An AI agent that is aware of the current selection in the editor
Workflows are scenarios where the AI model has a single, well-defined task. Built-in workflows include ready-to-use prompts and methods to execute and apply edits to the Tiptap Editor. Workflows are simpler and faster to implement than AI agent tools.
- Insert Content (
/insert-content-workflow) - A workflow where the AI model has a single, well-defined task to insert content - Proofreader (
/proofreader) - A workflow for proofreading documents using built-in prompts and methods - Tiptap Edit (
/tiptap-edit-workflow) - A general-purpose workflow for making small and large edits to Tiptap documents - Comments (
/comments-workflow) - A workflow for managing comments and threads in Tiptap documents
Server-side AI toolkit demos that run AI operations on the server for enhanced security and performance.
- Server AI Agent Chatbot (
/server-ai-agent-chatbot) - A server-side AI agent that can edit collaborative documents - Server Comments (
/server-comments) - A server-side AI agent that can add and manage comments via Tiptap Collaboration
- React + Next.js
- AI SDK by Vercel
- OpenAI models
- Tiptap AI Toolkit
-
Configure .npmrc file Follow the official guide for installing Tiptap Pro extensions.
-
Install dependencies:
pnpm install
-
Set up environment variables: Create a
.env.localfile in the root directory and add your API keys:OPENAI_API_KEY=your-api-key-here ANTHROPIC_API_KEY=your-api-key-here # Upstash Redis for rate limiting (optional but recommended) UPSTASH_REDIS_REST_URL=your_upstash_redis_rest_url_here UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_rest_token_here -
Run the development server:
pnpm run dev
-
Open your browser: Navigate to http://localhost:3000
- Chat with an AI that can read and edit Tiptap documents
- Uses the Vercel AI SDK for streaming responses
- Integrates with Tiptap AI Toolkit for document manipulation
- Preview AI-generated changes before applying them
- Accept or reject changes individually or in bulk
- Custom styling for suggestions (red for deletions, green for insertions)
- Halt conversation until user reviews changes
- An AI agent that can add and manage comments and threads in a Tiptap document
- Multi-document AI Agent - Work with multiple documents simultaneously
- Schema Awareness - Understands custom nodes and marks in your schema
- Selection Awareness - Works with selected text specifically, understanding context around the user's selection
- A workflow where the AI model has a single, well-defined task to insert content
- Uses built-in workflows with ready-to-use prompts and methods
- Executes and applies edits directly to the Tiptap Editor
- A workflow for proofreading documents
- Uses built-in prompts and methods for document correction
- Applies edits directly to the Tiptap Editor
- A general-purpose workflow for making small and large edits to Tiptap documents
- Uses built-in workflows with ready-to-use prompts and methods
- A workflow for managing comments and threads in Tiptap documents
- Uses built-in workflows with ready-to-use prompts and methods
- Visit the home page to choose between the demos
- In any demo, you can ask the AI to improve the document
- In the Review Changes demo, you'll see suggestions highlighted and can accept/reject them
- The AI will respond and make changes based on your requests