Skip to main content

Canvas & Artifacts

Canvas artifacts are persistent, versioned content objects that AI agents create and iteratively refine. Unlike ephemeral chat messages, artifacts are saved as standalone documents you can revisit, edit, and share.

Overview

When an agent produces substantial content — a report, analysis, code file, or structured document — it can save the output as a canvas artifact. Artifacts live alongside your conversation and open in a dedicated side panel for focused viewing and editing.

Key capabilities:

  • Persistent content: Artifacts survive beyond a single conversation turn
  • Version history: Every edit creates a new version you can browse
  • Diff view: Compare any two versions side by side
  • User editing: Edit artifacts directly, not just through the agent
  • Multiple content types: Reports, code, tables, checklists, and more

How Artifacts Are Created

Agents create artifacts automatically when their output warrants a persistent document. You can also request one explicitly:

"Write a competitive analysis report for our Q1 launch"
"Create a project timeline for the migration"
"Draft an API specification for the new endpoints"

The agent determines the appropriate content type and generates the artifact. It appears in the side panel immediately.

When Agents Create Artifacts

Agents typically create artifacts for:

  • Reports and analyses that synthesize multiple sources
  • Code files, scripts, or configuration templates
  • Structured documents like checklists, runbooks, or proposals
  • Tables and comparisons that benefit from a persistent view

Short answers, clarifications, and simple lookups remain as regular chat messages.

The Side Panel

When an artifact is created or selected, it opens in a panel to the right of the conversation. The panel provides:

Content Viewer

The main area displays the artifact content with full formatting:

  • Markdown rendering for text documents
  • Syntax highlighting for code
  • Table formatting for structured data

Version History

Every modification to an artifact creates a new version. The version history bar at the top of the panel shows:

  • Version number and timestamp
  • Who made the change (agent or user)
  • Navigation arrows to browse versions

Click any version to view it. The artifact content updates to show the selected version.

Diff View

Compare any two versions to see exactly what changed:

  1. Open the version history
  2. Select two versions to compare
  3. Additions are highlighted in green, removals in red

This is particularly useful when an agent iterates on a document across multiple conversation turns and you want to see the cumulative changes.

Iterative Editing

Agent Edits

Ask the agent to refine an existing artifact:

"Add a section on risks to the report"
"Fix the SQL query in the migration script"
"Update the timeline to start two weeks later"

The agent edits the existing artifact rather than creating a new one. A new version is saved automatically.

User Edits

You can edit artifacts directly in the side panel:

  1. Click the Edit button in the panel toolbar
  2. Modify the content
  3. Save to create a new version

User edits and agent edits are tracked in the same version history, so you always have a complete record of changes.

Content Types

Artifacts support various content types:

Content TypeDescriptionExample
text/markdownRich text with headings, lists, formattingReports, proposals, summaries
text/plainPlain text contentNotes, logs
text/htmlHTML contentFormatted documents
text/x-python, text/x-go, text/x-typescript, text/x-javascriptSyntax-highlighted source codeScripts, modules, components
text/x-sqlSQL queriesDatabase queries, migrations
text/x-yamlYAML configurationConfig files, CI/CD pipelines
application/jsonStructured JSON dataAPI responses, configs

Working with Artifacts

Viewing Past Artifacts

Artifacts are associated with their conversation. To revisit an artifact:

  1. Open the conversation where it was created
  2. Click the artifact reference in the chat
  3. The side panel opens with the latest version

Copying Content

Use the Copy button in the panel toolbar to copy the artifact content to your clipboard for use in other tools.

Multiple Artifacts

A single conversation can produce multiple artifacts. Each one is referenced inline in the chat and can be opened independently in the side panel.

Best Practices

When to Use Artifacts

Use Artifacts ForUse Regular Chat For
Multi-section reportsQuick answers
Code that needs iterationOne-line code snippets
Documents you'll reference laterEphemeral explanations
Content that evolves over turnsSingle-turn responses

Effective Prompting

  1. Be specific about structure: "Create a report with sections for methodology, findings, and recommendations"
  2. Request iterations: "Now add a summary table at the top" rather than regenerating from scratch
  3. Name the output: "Create a runbook called 'Database Migration Steps'" to make artifacts easy to find

Next Steps