Reference

Documents

Everything in a space is a document. They share one tree, one permission model, and one search index. What differs is the editing surface and what the content means. There are four you can create directly: documents, canvases, databases, and workflows.

Browse documentation

Press the new-document button and you are asked which kind to create. The choice sets the document's type, which decides how its content is stored and which editor opens. Everything else works the same regardless of type: the position in the document tree, properties, categories, sharing, and search.

TypeUse it for
DocumentRich text. The default: written content, edited collaboratively, with comments and revision history.
CanvasAn infinite whiteboard for drawing, sticky notes, shapes, media, and links to other documents.
DatabaseA structured table. Each row is a document, each column a property.
WorkflowA JavaScript script that runs in a sandbox, on demand or on a cron schedule.

Document

A document is the plain rich-text type, and the default when no other type is chosen. Content is HTML edited in place: headings, lists, blockquotes, tables, code blocks with syntax highlighting, and inline mentions of users and other documents. Files, images, audio, and video can be dropped anywhere in the body, and pasted links expand into previews.

It is also the only type with the full collaboration surface around the text:

  • Comments: threads anchored to a selection, with replies and mentions.
  • Revisions: a history sidebar, a visual diff between any two revisions, and the option to publish one specific revision for external readers.

The layout property switches between the default centred column and full width, and a document can be locked with readonly so no further edits are accepted.

Canvas

A canvas is an infinite, pannable, zoomable surface. Instead of HTML it stores its own document model as JSON, so its content is a set of positioned elements rather than a text flow:

  • freehand strokes with pen, marker, and highlighter styles;
  • text boxes, sticky notes with colour options, shapes, and sections to group things;
  • images, audio, and video, plus links and embedded document links that render a live preview of the target;
  • select, move, resize, rotate, duplicate, with alignment snapping guides.

The gridtype property picks the backdrop: grid, dots, or clean. Content pasted from Figma is recognised and converted into canvas elements.

Database

A database presents a table, but there is no separate storage engine behind it: every row is a document nested under the database, and every cell is one of that document's properties. Columns are defined by a schema stored on the database document; when no schema is set, the columns are derived from the properties the rows actually have.

  • Columns are typed: text, number, date, or select.
  • Cells are edited inline; rows can be added, filtered, sorted, paginated, and deleted.
  • A CSV file can be imported to create columns and rows in one go.

Because rows are documents, opening one gives you a normal document page, with body content, properties, and its own children, and anything you write there stays attached to that row. A database only accepts row documents as children, so it cannot be used as a general folder.

Workflow

A workflow document is a JavaScript program: the content of the document is the script, edited in a code editor that autosaves. Running it executes the current draft in a sandboxed runtime.

Inside a script you get a small runtime:

  • input: the runtime inputs the run was started with.
  • runJob(extensionId, jobId, inputs?): invoke a job contributed by an installed extension and await its output.
  • log(message): append a line to the run log.
  • The script's return value is stored as the run's JSON result.

Runs can be started three ways:

  • from the Run button on the document, optionally with inputs;
  • on a cron schedule (with a timezone and fixed inputs) configured in space settings under Workflows;
  • from the CLI with vektor workflow run <docId> --input key=value, which streams the logs back. See the CLI guide.

Every run is recorded: status, logs, result, and the inputs it was given, all visible in the run history on the document and updated live while the run is in flight. A failed run can be retried, and steps that already succeeded replay from cache instead of executing again.

What each type supports

 DocumentCanvasDatabaseWorkflow
Editing surfacerich textcanvastablecode
Real-time multiplayer editingyesyeslive row updateslive run status
Inline commentsyes
Properties & categoriesyesyesyesyes
Header imageyesyesyes
Child documentsany typeany typerows onlyruns only
Full-text & semantic searchyesyesyesyes

What every document shares

  • The tree. Any document can be nested under any other (except where a type restricts its children), and moving a parent moves its subtree.
  • Properties. Arbitrary key–value metadata, plus the built-ins the UI exposes: title, category, header image, layout, and readonly.
  • Categories. Colour-coded tags that also act as a permission scope.
  • Revision history. Every saved document has a revisions sidebar. A revision is written when content is saved through the API (an explicit save, an agent edit, a publish), while a live collaborative session continuously persists the current draft in between.
  • Permissions. Grants can target a single document or a whole subtree. See Permissions.
  • Search. Full-text and semantic search cover every type, and results can be filtered by type, category, and properties.
  • Activity. Contributors, an activity feed, and audit entries for changes.