The End of the AI Chat Sidebar: Inside EveryInc/proof-sdk
How an open-source framework bridges the gap between complex CRDTs and LLMs to make AI a first-class document collaborator.

Most word processors still assume a human is doing the writing and AI is helping at the margins for brainstorming, making rewrite suggestions, or producing a first draft. Proof flips that around. It’s a document editor built for the kinds of documents agents are increasingly writing...
- Proof SDK abandons the chat sidebar model by giving AI agents direct, concurrent cursor access to a document's underlying CRDT.
- A span-level provenance system tracks every character to render a permanent visual distinction between human and machine edits.
- The framework uses Canonical Document Projection to translate binary Yjs state into LLM-readable formats in real-time.
- Hard circuit breakers protect the database from autonomous agents to prevent runaway loops and pathological document growth.
The Chatbot in the Sidebar is a Hack
Most modern writing tools treat AI as a bolt-on feature. You open a sidebar, prompt a chatbot, and wait for it to generate a block of plain text. If you want to use that text, you copy and paste it, destroying the document's formatting and collaborative history in the process.
Large language models are inherently text-hungry. They consume plain strings and emit plain strings. Collaborative text editors, however, are complex state machines built on Conflict-free Replicated Data Types (CRDTs). Bridging this gap usually requires brittle workarounds like headless browsers or aggressive DOM scraping.
Proof SDK takes a fundamentally different approach. It treats the AI as a first-class collaborator with its own cursor. By exposing a formal interface to the underlying synchronization engine, the framework allows agents to read state, post comments, and submit precise edits without breaking the document.
The Provenance Problem and Colored Rails
When an AI edits a document in a traditional tool, its contribution is indistinguishable from human input once pasted. This lack of transparency creates a black box. Proof SDK solves this with an embedded provenance model.
The framework tracks metadata marks across the Yjs state at the span level. Every character knows who wrote it. In the UI, this manifests as a colored rail alongside the text. Green indicates human authorship, while purple signifies an AI contribution. This dual-rail system ensures total transparency in the co-editing process.
Giving the Machine a Cursor
The core of this capability lives in the agent-bridge package. Instead of forcing an AI to understand the complex JSON structure of a ProseMirror document, Proof exposes a set of bridge routes.
These routes allow external agents to interact with the document using standard HTTP protocols. An agent can send a JSON payload to propose a change, and the server translates that request into a native CRDT operation. This eliminates the need for simulated keystrokes or complex browser automation.
Translating CRDTs for Language Models
Language models cannot read Yjs binary blobs. To provide context to an agent, the Proof server continuously projects the Yjs state into a CanonicalReadableDocument. This projection is a clean, structured representation of the text that an LLM can parse easily.
When the agent decides to make an edit, it uses an anchor. Because the document is live, a human might be typing in the exact paragraph the AI is trying to modify. The SDK employs fuzzy matching in its anchor resolution logic to find the intended target text, ensuring edits are applied correctly even if the content has moved concurrently.
Defensive Engineering Against Hallucinations
Giving an autonomous agent a POST route to your database is dangerous. Language models hallucinate, get stuck in loops, and generate excessive output. Proof SDK anticipates these failure modes with strict circuit breakers.
The RunawayCanonicalWriteGuard acts as a hard limit on document growth. If an agent attempts to generate thousands of blocks in an infinite loop, the guard severs the connection and quarantines the document. Additional logic detects pathological projection repeats, stopping agents that fall into repetitive generation patterns.
The Agent-Native Architecture
Building an editor where AI is a true collaborator requires a fundamental rewrite of the persistence and synchronization layers. Legacy tools like Google Docs were built exclusively for humans. Modern workspaces like Notion added AI later. Proof SDK is designed from the ground up to be agent-native.
| Feature | Legacy Editors | Modern Workspaces | Proof SDK |
|---|---|---|---|
| Architecture Base | Human-Centric UI | Block-based UI | Agent-Native CRDT |
| AI Integration | Bolted-on assistant | Proprietary internal API | Open Agent HTTP Bridge |
| Edit Provenance | Document version history | Block history | Span-level colored rails |
| State Format for AI | HTML/DOM scraping | Hidden internal state | Canonical Document Projection |
This architectural shift reflects a changing reality in knowledge work. The goal is no longer just to generate text quickly, but to iterate on complex ideas alongside intelligent systems.