Documentation Index
Fetch the complete documentation index at: https://docs.ivory.finance/llms.txt
Use this file to discover all available pages before exploring further.
What is the Intelligence Editor?
The Ivory Intelligence Editor is a block-based document system built on top of Tiptap + Yjs. It gives your users a collaborative workspace where documents contain smart blocks — live financial data (SEC filings, market metrics, charts, AI insights) embedded directly alongside regular prose.Document CRUD
Create, read, update, soft-delete documents and workspaces. Control visibility and share with team members.
Real-Time Collaboration
Hocuspocus WebSocket server backed by Yjs CRDT. Multiple cursors, live edits, offline sync.
Smart Blocks
Five resolver endpoints that return fully-formed Tiptap block nodes populated with live financial data.
Orchestrator Tools
The AI orchestrator can read, search, and write into documents via
read_editor_document, search_editor_documents, write_to_editor_document, and three smart block creation tools.Data model
Hierarchy
workspace_id = null) or be placed inside one.
Document fields
| Field | Type | Description |
|---|---|---|
id | uuid | Document UUID — used as the Hocuspocus room name |
tenant_id | string | Owner’s user_id |
workspace_id | uuid | null | Parent workspace (optional) |
title | string | Document title |
icon | string | null | Emoji or icon identifier |
cover_url | string | null | Cover image URL |
visibility | private | workspace | public | Access scope |
doc_ast | object | Tiptap/ProseMirror JSON — read and written by agents and REST |
yjs_state | bytes | Binary Yjs CRDT state — managed by Hocuspocus only |
word_count | integer | Auto-updated on doc_ast writes |
updated_by_type | user | agent | system | Who made the last change |
updated_by_id | string | User ID or agent name |
is_deleted | boolean | Soft-delete flag |
Access model
A user can see a document if any one of these is true:Roles
Documents use a ranked role system:| Role | Rank | Can read | Can edit | Can share | Can delete |
|---|---|---|---|---|---|
owner | 4 | ✓ | ✓ | ✓ | ✓ |
editor | 3 | ✓ | ✓ | ✗ | ✗ |
commenter | 2 | ✓ | ✗ | ✗ | ✗ |
viewer | 1 | ✓ | ✗ | ✗ | ✗ |
viewer for non-owners. Workspace members inherit editor (for admins/editors) or viewer.
Visibility and OpenSearch indexing
Every document is indexed for semantic search. The indexing topology is visibility-aware:| Visibility | Tenant index (ivory_editor_docs_{tenant_id}) | Public index (ivory_editor_docs_public) |
|---|---|---|
private | ✓ | ✗ |
workspace | ✓ | ✗ |
public | ✓ | ✓ |
- Private/workspace documents are only searchable by their owner via
scope='private' - Public documents are discoverable by anyone via
scope='public' - Setting a document to
publicautomatically adds it to the global search index - Changing back to
privateautomatically removes it from the public index
search_editor_documents tool exposes scope: private | public | all.
Tiptap doc_ast format
All document content is stored as a Tiptap/ProseMirror JSON tree:type matching one of the five block types (sec_citation, market_data, ai_insight, sql_query, ivory_chart) with a rich attrs object. See Smart Blocks for the full schema.
Agent write traceability
When the AI orchestrator writes to a document, every change is tagged:GET /v1/editor/documents/{doc_id}. The orchestrator respects ownership — it can only write to documents owned by the requesting tenant.
Authentication
All editor endpoints require a standard JWT Bearer token (same as the rest of the Ivory API):GET /v1/editor/documents/{doc_id}on a public document —vieweraccess is granted without authPOST /v1/editor/hocuspocus/auth— takes the JWT in the request body (called by the WebSocket server, not the browser)PUT /v1/editor/documents/{doc_id}/yjs— authenticated viaX-Hocuspocus-Secretheader (internal)

