Navin

Artifacts / Canvas

Navin can present concrete results beside the chat: HTML previews, Markdown, Mermaid diagrams, and files. Artifacts persist locally under ~/.navin/artifacts/<chat_id>/.

How artifacts appear

  1. The agent calls the present_artifact tool, or
  2. The gateway auto-detects fenced blocks (html` / mermaid`) in an assistant reply on the WebSocket channel.

The WebUI opens a resizable Artifact canvas next to the thread (ArtifactCanvas). HTML renders in a sandboxed iframe.

WebSocket events

EventDirectionRole
artifact_upsertserver → clientCreate or update an artifact record
artifact_selectserver → clientFocus an artifact in the panel

Types: html, markdown, mermaid, file (and related preview kinds).

Code map

AreaPath
Storenavin/artifacts/store.py
Fence detectnavin/artifacts/detect.py
Agent toolnavin/agent/tools/present_artifact.py
UI panelwebui/src/components/thread/ArtifactCanvas.tsx
Teststests/test_artifacts.py

Related

Source: content/docs/artifacts.md