Skip to main content

Overview

Agents can be equipped with file system capabilities to read, write, search, and edit files within a specified working directory. This enables code analysis, documentation generation, refactoring assistance, and other file-based operations. The agent determines which file operations to perform based on the task. Key concepts:
  • UseFileTools: Capability that adds core file tools (read_file, write_file, edit_file)
  • UseTools: Adds extra tools explicitly when needed (list_dir, search_files)
  • Working directory: Root path for all file operations (security boundary)
  • Available tools: read_file, write_file, edit_file, list_dir, search_files
  • AgentEventConsoleObserver: Provides visibility into agent execution stages

Example