Search Files
Agent Filesystem
Search Files
Search for files by name or content within an agent’s workspace.
POST
Search Files
Authentication
Requires JWT token or Platform API key.Agent UUID
Search pattern (glob for filenames, regex for content)
Search type:
filename, content, or bothBase path to search from (defaults to workspace root)
Glob pattern for file matching
Enable case-sensitive matching
Maximum results to return
Example Request
Search for files by name:Response
Response Fields
| Field | Type | Description |
|---|---|---|
results | array | List of matching files |
results[].path | string | File path |
results[].type | string | Entry type (file or directory) |
results[].size | number | File size in bytes |
results[].matches | array | Matching content lines (content search only) |
total | number | Total number of results |
Status Codes
| Code | Description |
|---|---|
200 | Search completed successfully |
400 | Invalid request body or pattern |
401 | Invalid authentication |
403 | Access denied |
404 | Agent not found |

