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:
- Open the version history
- Select two versions to compare
- 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:
- Click the Edit button in the panel toolbar
- Modify the content
- 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 Type | Description | Example |
|---|---|---|
text/markdown | Rich text with headings, lists, formatting | Reports, proposals, summaries |
text/plain | Plain text content | Notes, logs |
text/html | HTML content | Formatted documents |
text/x-python, text/x-go, text/x-typescript, text/x-javascript | Syntax-highlighted source code | Scripts, modules, components |
text/x-sql | SQL queries | Database queries, migrations |
text/x-yaml | YAML configuration | Config files, CI/CD pipelines |
application/json | Structured JSON data | API responses, configs |
Working with Artifacts
Viewing Past Artifacts
Artifacts are associated with their conversation. To revisit an artifact:
- Open the conversation where it was created
- Click the artifact reference in the chat
- 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 For | Use Regular Chat For |
|---|---|
| Multi-section reports | Quick answers |
| Code that needs iteration | One-line code snippets |
| Documents you'll reference later | Ephemeral explanations |
| Content that evolves over turns | Single-turn responses |
Effective Prompting
- Be specific about structure: "Create a report with sections for methodology, findings, and recommendations"
- Request iterations: "Now add a summary table at the top" rather than regenerating from scratch
- Name the output: "Create a runbook called 'Database Migration Steps'" to make artifacts easy to find
Next Steps
- Ask & Chat - Using artifacts in conversations
- Agents - How agents create artifacts
- Integrations - Agent tool integrations