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.

8 min read · EveryInc/proof-sdk

A mechanical arm awkwardly reaching through a window to drop a page on a typewriter, representing the bolted-on nature of current AI writing assistants.
Current AI writing tools treat the language model as an external oracle rather than an integrated 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...

Dan Shipper, Author · Introducing Proof
Key Takeaways

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.

A close-up of an ink line viewed through a magnifying glass, revealing it is woven from an organic fiber and a metallic wire, symbolizing human and AI provenance.
Span-level tracking ensures that even after multiple rounds of editing, the origin of every character remains clear.

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.

The Agent HTTP Bridge translates complex CRDT state into LLM-readable formats and resolves AI edits back into the live document safely.

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.

A massive industrial electrical switch forcefully thrown to the OFF position above jammed, sparking gears, representing defensive circuit breakers against AI hallucinations.
Hard circuit breakers are necessary to protect the underlying database from runaway autonomous agents.

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.

FeatureLegacy EditorsModern WorkspacesProof SDK
Architecture BaseHuman-Centric UIBlock-based UIAgent-Native CRDT
AI IntegrationBolted-on assistantProprietary internal APIOpen Agent HTTP Bridge
Edit ProvenanceDocument version historyBlock historySpan-level colored rails
State Format for AIHTML/DOM scrapingHidden internal stateCanonical 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.

Hedcut portrait of Dan Shipper, creator of Proof SDK.