Skip to main content
Canvases are JSON Canvas documents stored as .canvas.json files in the knowledge base. Every write goes through the normal write pipeline, so each change is a git commit and broadcasts an SSE event. See Canvas for the data model. Every endpoint that takes a path rejects paths that don’t end in .canvas.json with 400.

List canvases

Return every .canvas.json file in the knowledge base.
array
One entry per canvas file. Empty array when there are none.

Read a canvas

Return the raw canvas document.
string
required
Canvas file path.
Returns the stored JSON as-is with Content-Type: application/json. Returns 404 if the file does not exist and 500 if it is not a valid canvas.

Write a canvas

Create or replace a canvas. The body is the full JSON Canvas document.
string
required
Canvas file path.
string
default:"system"
Git commit author attribution.
object[]
required
JSON Canvas nodes. An empty array is allowed.
object[]
required
JSON Canvas edges. An empty array is allowed.
Returns 400 if the body is not JSON with nodes and edges arrays.
string
Canvas path that was written.
string
Git blob hash of the new content.

Patch a canvas

Apply a batch of node and edge operations without sending the whole document. The batch is atomic: if any operation fails, nothing is written. If the canvas does not exist yet, the operations apply to an empty canvas.
string
required
Canvas file path.
string
default:"system"
Git commit author attribution.
object[]
required
Operations, applied in order. Must not be empty.
Returns 400 for an unparseable body or an empty operations array, and 422 when an operation is invalid (unknown op, duplicate ID on add, or unknown ID on update or remove). Removing a node also removes every edge connected to it.
string
Canvas path.
string
Git blob hash of the new content.
object
Counts of what changed.

Delete a canvas

Delete a canvas file and record the deletion as a git commit.
string
required
Canvas file path.
string
default:"system"
Git commit author attribution.
Returns 404 if the canvas does not exist.
string
Path that was deleted.

Query canvas nodes

Filter the nodes and edges of one canvas.
string
required
Canvas file path.
string
Case-insensitive substring match against a node’s id, text, file, and url, and an edge’s id and label. Edges touching a matched node are also returned.
string
Node type: text, file, link, or group.
string
Node ID. Returns that node and every edge whose fromNode or toNode is that ID.
boolean
default:"false"
Omit edges from the result.
boolean
default:"false"
Omit nodes from the result.
Returns 404 if the canvas does not exist.
object[]
Matching JSON Canvas nodes.
object[]
Matching JSON Canvas edges.

Auto-layout a canvas

Reposition the existing nodes of a canvas with a Graphviz layout engine and save the result. This does not add nodes; use generate to build a canvas from wiki links.
string
required
Canvas file to lay out in place.
string
default:"system"
Git commit author attribution.
string
default:"dot"
Graphviz engine: dot, neato, fdp, or circo. The body is optional.
Returns 404 if the canvas does not exist.
string
Canvas path.
string
Git blob hash of the new content.
integer
Nodes in the canvas.
integer
Edges in the canvas.
Build a canvas with one file node per page and one edge per wiki link, lay it out, and write it to disk. Existing content at the output path is replaced.
string
default:"system"
Git commit author attribution.
string
default:"canvas.canvas.json"
Output file. .canvas.json is appended if missing.
string
default:"hierarchical"
hierarchical, radial, force, or circular. Unknown values fall back to hierarchical.
string
Path prefix. Only links whose source and target both start with this prefix become edges.
boolean
default:"true"
Color nodes by detected link community.
Returns 503 if the link index is unavailable.
string
Canvas path that was written.
string
Git blob hash of the new content.
integer
Nodes generated.
integer
Edges generated.

MCP equivalents

MCP exposes kiwi_canvas_list, kiwi_canvas_read, and kiwi_canvas_write. Patch, query, auto-layout, and generate are REST-only.

Canvas concepts

Node types, edges, and how canvases render in the web UI.

MCP tools

The full list of MCP tools, including the canvas tools.
Last modified on October 19, 2026