Skip to main content

File explorer API

The file explorer API is planned for a future release. The endpoints described on this page are not yet available. This page documents the intended specification for reference.
The file explorer lets you view and edit files in an agent’s workspace directory without SSH access. It also provides git status, diff, sync, and log operations. All endpoints require bearer token authentication and are served by the backend API.

Base URL

Get file tree

Returns a recursive file tree of the workspace directory. Folders are listed before files, both sorted alphabetically. Directories such as node_modules, .git, .next, dist, build, .cache, and __pycache__ are excluded automatically.

Query parameters

Response

Response fields

Errors

Read a file

Reads the contents of a single file from the workspace.

Query parameters

Response

Response fields

Errors

Write a file

Writes or overwrites a file in the workspace. Parent directories are created automatically if they do not exist.

Request body

Response

Response fields

Errors

Git status

Returns the current git status of the workspace, including branch name, remote tracking info, and a list of changed files.

Response

If the workspace is not a git repository, the response returns isGitRepo: false with no other git fields.

Response fields

Errors

Git diff

Returns the unstaged and staged diffs for the workspace, or for a specific file.

Query parameters

Response

Response fields

Errors

Git sync

Stages all changes, commits them with the provided message, and pushes to the remote.

Request body

Response

When there are no changes to commit, the response returns committed: false and pushed: false with a message explaining there is nothing to sync.

Response fields

Errors

Git log

Returns recent commit history for the workspace.

Query parameters

Response

Response fields

Errors