Overview
Canvas provides a persistent text document system that integrates seamlessly with Agent. When you pass a Canvas to an Agent, the agent automatically receives tools to read and edit the canvas, enabling intelligent document management through natural language tasks. How it works:- Create a Canvas with a name (documents persist as
.txtfiles) - Pass the Canvas to Agent during initialization via the
canvasparameter - The Agent automatically registers canvas tools (
get_current_state_of_canvasandchange_in_canvas) - During task execution, the agent can intelligently read, update, and organize canvas content
- Canvas content is automatically cleaned (code blocks removed) and persisted to disk
Quick Start
Basic Canvas Integration
Meeting Notes Example
Configuration Guide
Canvas with Custom Model
Real-World Examples
Document Updates
Technical Documentation
Tips and Best Practices
- Use descriptive canvas names - “Project Documentation” vs “Doc1”
- Let the agent organize content - The agent intelligently places and updates sections
- Canvas persists automatically - Documents are saved as
.txtfiles in your working directory - Agent handles formatting - Code blocks and formatting are automatically cleaned

