Skip to main content

Overview

The AI chat agent has access to a set of tools that let it interact with your workspace, execute code, and manage its own state. Tools run inside an isolated sandbox environment — a secure container that has access to your workspace files.

File Tools

view

Read any file in your workspace. Supports two modes:
ModeDescriptionUse Case
textReturns file content as text/MarkdownPlaintext, parsed documents
visualReturns rendered page imagesPDFs with complex layouts, figures
For PDFs and DOCX files, text mode reads from the parsed Markdown cache. Visual mode renders up to 20 pages per call for layout-sensitive analysis.

create_directory

Create new folders in your workspace hierarchy. The agent uses this to organize generated content or restructure your file tree.

Code Execution

bash

Execute shell commands in the sandbox. Useful for:
  • File manipulation and processing
  • Running command-line tools
  • Data transformation scripts
Default timeout is 30 seconds, extendable up to 10 minutes for long-running operations. If a command times out, partial output is returned.

python

Run Python snippets in the sandbox. The environment comes pre-installed with common data analysis libraries. Useful for:
  • Data analysis and statistics
  • File format conversions
  • Custom processing logic

Session State Tools

read_whiteboard / write_whiteboard

A shared scratchpad for the chat session. The agent uses this to:
  • Track its plans and progress on complex tasks
  • Record intermediate findings
  • Maintain a todo list across multiple turns
When the agent writes to the whiteboard with notify_user: true, you’ll receive a notification highlighting the update.

How the Sandbox Works

The sandbox is an isolated container that gets provisioned on the first tool call in a conversation turn:
  1. Hydration — Your workspace files are copied into the sandbox at /root/workspace
  2. Execution — The agent runs tools against these files
  3. Sync — After the turn completes, any new or modified files are synced back to your staging workspace
  4. Cleanup — The sandbox is torn down
Only source files that actually changed (detected via MD5 hash comparison) are synced back, keeping operations efficient. New files created by the agent are automatically staged as new artifacts in your workspace.
Parsed cache files (used for AI reading) are available in the sandbox but are never synced back or staged — they’re read-only derived content.