Skip to main content
GET
/
v1
/
agent
/
{agentId}
/
filesystem
/
files
/
{path}
Read File
curl --request GET \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/files/{path} \
  --header 'Authorization: Bearer <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
path
string
required
File path within the agent workspace (wildcard segment)
encoding
string
Response encoding (utf-8 or base64)
download
boolean
Return the file as a binary download

Example Request

curl -X GET "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/files/workspace/config.json" \
  -H "Authorization: Bearer <jwt_token>"

Response

For text files, you receive a JSON object with the file content:
{
  "path": "/workspace/config.json",
  "content": "{\"debug\": true, \"log_level\": \"info\"}",
  "encoding": "utf-8",
  "size": 38,
  "mime_type": "application/json"
}
When you set download=true, the response is a raw binary stream with the appropriate Content-Type header.

Response Fields

FieldTypeDescription
pathstringAbsolute path of the file in the workspace
contentstringFile content in the requested encoding
encodingstringEncoding used for the content (utf-8 or base64)
sizenumberFile size in bytes
mime_typestringDetected MIME type of the file

Status Codes

CodeDescription
200File content returned successfully
401Invalid authentication
403Access denied
404Agent or file not found