Skip to main content

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 .txt files)
  • Pass the Canvas to Agent during initialization via the canvas parameter
  • The Agent automatically registers canvas tools (get_current_state_of_canvas and change_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 .txt files in your working directory
  • Agent handles formatting - Code blocks and formatting are automatically cleaned