展示 HN:Tiptap AI 代理 – 在几分钟内为您的文本编辑器添加 AI 工作流

8作者: philipisik2 天前原帖
我们构建了 Tiptap AI Agent,以便轻松将 AI 集成到富文本编辑器中,而无需重建整个前端。 如果您曾尝试在文档编辑器中集成 AI,您可能遇到过以下问题: - 从复杂的文档结构中提取上下文 - 处理提示输入和流式输出 - 支持 AI 更改的撤销/重做 - 设计接受/拒绝更改的用户界面 - 多人会话状态和冲突 这是一项繁重的工作,而且几乎没有任何部分是特定于模型的。 这个新的 Tiptap 工具包为您提供了一种简洁的方法来定义 AI Agent,这些 Agent 可以根据用户定义的任务读取和编辑富文本。您可以手动、自动或根据结构化输入触发这些 Agent。 它与 OpenAI 或您自己的后端和 LLM 堆栈兼容。构建在 Tiptap 协作功能背后的同一多人引擎之上。 我们还包含了一个 AI 更改扩展,以便用户可以审查并接受/拒绝生成的编辑,就像内容的内置代码审查。 这里有一个实时演示: [https://ai-agent.tiptap.dev/](https://ai-agent.tiptap.dev/) 开发者文档:[https://tiptap.dev/docs/content-ai/capabilities/agent/overview](https://tiptap.dev/docs/content-ai/capabilities/agent/overview) 欢迎提问或分享您正在构建的内容 :-)
查看原文
We built the Tiptap AI Agent to make it easy to integrate AI into a rich text editor, without rebuilding your entire frontend.<p>If you’ve ever tried wiring up AI inside a document editor, you’ve probably dealt with:<p><pre><code> - Extracting context from complex document structures - Handling prompt input + streamed output - Supporting undo&#x2F;redo for AI changes - Designing UI for accepting&#x2F;rejecting changes - Multiplayer session state and conflicts </code></pre> It’s a lot of work, and almost none of it is model-specific.<p>This new Tiptap toolkit gives you a clean way to define AI Agents that can read and edit rich text based on user-defined tasks. You can trigger agents manually, automatically, or in response to structured input.<p>Works with OpenAI or your own backend + LLM stack. Built on top of the same multiplayer engine behind Tiptap’s collaboration features.<p>We also include an AI Changes extension so users can review and accept&#x2F;reject generated edits, like a built-in code review for content.<p>There’s a live demo here: <a href="https:&#x2F;&#x2F;ai-agent.tiptap.dev&#x2F;">https:&#x2F;&#x2F;ai-agent.tiptap.dev&#x2F;</a><p>Developer Docs: <a href="https:&#x2F;&#x2F;tiptap.dev&#x2F;docs&#x2F;content-ai&#x2F;capabilities&#x2F;agent&#x2F;overview">https:&#x2F;&#x2F;tiptap.dev&#x2F;docs&#x2F;content-ai&#x2F;capabilities&#x2F;agent&#x2F;overvi...</a><p>Happy to answer questions or just hear what you’re building :-)