Skip to content

File Access Toolset

The File Access toolset provides tools for reading, writing, and editing files on any fsspec-compatible filesystem. This includes local files, S3, GitHub repositories, and more.

Basic Usage

agents:
  my_agent:
    toolsets:
      - type: file_access
        fs: "file:///workspace"

Filesystem Options

The fs field accepts either a URI string or a full filesystem configuration:

URI String

toolsets:
  - type: file_access
    fs: "file:///home/user/project"

Filesystem Config

toolsets:
  - type: file_access
    fs:
      type: github
      org: sveltejs
      repo: svelte
      sha: main

Composed Filesystems

Mount multiple filesystems together using the mounts type:

toolsets:
  - type: file_access
    fs:
      type: mounts
      mounts:
        docs: "github://sveltejs:svelte@main"
        src: "file:///workspace/src"
        data:
          type: s3
          bucket: my-bucket

Available Tools

The toolset provides these tools to agents:

Tool Description
list_directory List files with glob patterns and filtering
read_file Read file contents (text or binary/images)
write_file Write content to files
edit_file Smart find-and-replace editing
delete_path Delete files or directories
grep Search file contents with regex
agentic_edit AI-powered file editing
download_file Download files from URLs

Configuration Reference

File Access Toolset

Configuration for file access toolset (supports local and remote filesystems).

File Access Toolset (YAML)
toolsets:
- type: file_access
  fs: null  # Filesystem URI string or configuration object. If None, use agent default FS.
  model: null
  storage_options: {}  # Additional options for URI-based filesystems (ignored when using config object).
  conversion: null  # Optional conversion configuration for markdown conversion.
  max_file_size_kb: 64  # Maximum file size in kilobytes for read/write operations (default: 64KB).
  max_grep_output_kb: 64  # Maximum grep output size in kilobytes (default: 64KB).
  use_subprocess_grep: true  # Use ripgrep/grep subprocess if available (faster than Python regex).
  namespace: null  # Optional namespace prefix for tool names

Examples

Local Development

toolsets:
  - type: file_access
    fs: "file:///home/user/project"
    max_file_size_kb: 128

GitHub Repository Access

toolsets:
  - type: file_access
    fs:
      type: github
      org: fastapi
      repo: fastapi
      cached: true

Multi-Source Documentation

toolsets:
  - type: file_access
    fs:
      type: mounts
      mounts:
        svelte: "github://sveltejs:svelte@main"
        react: "github://facebook:react@main"
        local: "file:///docs"