Overview
Every agent has a private workspace directory on the local filesystem. The Agent Workspaces API lets you bulk-initialize that workspace, list its files, and read or write individual files. All paths are relative to the agent’s workspace and are guarded against directory traversal. The gateway rejects any path that is absolute, contains.., or includes backslashes or NUL bytes.
Base URL
Authentication
All requests must include a valid bearer token in theAuthorization header.
File object
Endpoints
Initialize workspace
Request body
Example request
Example response
List workspace files
Example request
Example response
Read a workspace file
Query parameters
Example request
Example response
Write a workspace file
Request body
Example request
Example response
Path safety
The API rejects paths that:- Are absolute (start with
/or a Windows drive letter). - Contain
..components. - Contain backslashes (
\) or NUL bytes.
400 Bad Request with "error": "invalid_path".