Skip to main content
Cowork lets you describe complex tasks and let the agent handle them end-to-end. It combines browser automation with local file operations: research on the web, then save reports directly to your folder. Read code, edit files, run shell commands, and search through your project, all in the same session as your browser tasks. Here’s what it looks like to give the agent access to your local files:

Why Cowork?

Without Cowork, the agent can only interact with browser tabs. With Cowork enabled, it gains full access to a folder on your machine through 7 filesystem tools:

Read & write files

Read documents and data files, write reports, markdown, HTML, and other outputs

Edit files

Make targeted edits to existing files with surgical string replacement

Run commands

Execute shell commands within the sandboxed folder

Search content

Search file contents with regex or literal patterns across your project

Find files

Find files by glob pattern, with smart filtering of build directories

Browse directories

List directory contents with file sizes, sorted and organized
The real power: do both browser automation AND file operations in a single task. Describe what you want, step away, and come back to finished work.

Setting Up Cowork

1

Open the Cowork selector

Click the Cowork dropdown next to the prompt input
2

Choose a folder

Select a recent folder or click Choose a different folder
3

Grant access

Allow BrowserOS to access that folder when prompted
Select a folder for the agent to operate in
The agent is sandboxed to your selected folder. It cannot access files outside of it.
Cowork is available in Agent Mode only. In Chat Mode, the agent works with browser tabs only.
To disable file access, select No folder and the agent will work with browser tabs only.

Filesystem Tools

Cowork provides 7 filesystem tools that the agent can use alongside browser automation:
Read a file from the filesystem. Returns text content with line numbers, or image data for image files (PNG, JPG, GIF, WEBP, BMP, SVG, ICO). Supports pagination through large files with offset and limit parameters.
ParameterTypeDescription
pathstring (required)File path relative to working directory
offsetnumber (optional)Starting line number (1-indexed)
limitnumber (optional)Max lines to read
Responses are capped at 2000 lines or 50KB per request.
Create or overwrite a file. Automatically creates parent directories if they don’t exist.
ParameterTypeDescription
pathstring (required)File path relative to working directory
contentstring (required)Complete file content to write
Make a targeted edit by replacing an exact string match. If the exact match fails, a whitespace-tolerant fuzzy match is attempted. Preserves original line endings (CRLF, CR, LF) and BOM.
ParameterTypeDescription
pathstring (required)File path relative to working directory
old_stringstring (required)Exact text to find
new_stringstring (required)Replacement text
Returns a side-by-side diff of the change.
Execute a shell command and return its output. Commands run in sh/bash on Unix or cmd on Windows.
ParameterTypeDescription
commandstring (required)Shell command to execute
timeoutnumber (optional)Timeout in seconds (default: 120)
Output is truncated to the last 2000 lines if too large. Returns the exit code on failure.
Find files matching a glob pattern. Searches recursively while skipping common build directories (node_modules, .git, dist, build, .next, coverage, __pycache__, and more).
ParameterTypeDescription
patternstring (required)Glob pattern (e.g., *.ts, **/*.json)
pathstring (optional)Directory to search (default: working directory)
limitnumber (optional)Max results (default: 1000)
Returns relative file paths sorted alphabetically.
Search file contents using regex or literal string matching. Skips binary files and files over 2MB.
ParameterTypeDescription
patternstring (required)Search pattern (regex by default)
pathstring (optional)Directory or file to search
globstring (optional)Filter files by glob (e.g., *.ts)
ignore_caseboolean (optional)Case-insensitive search
literalboolean (optional)Treat pattern as literal string
contextnumber (optional)Lines of context around matches
limitnumber (optional)Max matches (default: 100)
List directory contents. Shows directories first (with trailing /), then files with human-readable sizes.
ParameterTypeDescription
pathstring (optional)Directory path (default: working directory)
limitnumber (optional)Max entries (default: 500)
Entries are sorted alphabetically, case-insensitive.

Try It: Research and Create a Report

With Cowork enabled, try this prompt:
Read the top 3 stories on Hacker News, read the comments too, and write an HTML report.
The agent will:
1

Navigate to Hacker News

Opens the site and identifies top stories
2

Read stories and comments

Clicks into each story and reads discussion threads
3

Generate report

Creates an HTML report summarizing the findings
4

Save to folder

Writes the report to your selected folder
Agent researching Hacker News and generating an HTML report

Example Use Cases

Go through my Downloads folder and organize files by type: documents, images, videos, archives.
Research key trends about [topic] on Reddit, Twitter, and LinkedIn. Create an HTML report with your findings.
Visit these 10 product pages, extract the name, price, and description, and save the results as a markdown file.
Find the top posts from these 5 subreddits today and compile them into a daily digest document.
Search my project for all TODO comments, list them with file paths and line numbers, then create a summary markdown file.
Grep through the log files in this folder for errors from the last 24 hours and write a summary of what went wrong.

Security

Sandboxed access

The agent can only access the folder you select. No parent directories, no path traversal.

Revoke anytime

Select No folder to instantly disable file access

Local only

All file operations happen locally on your machine