List Workspace Files
/v1/agents/sessions/{session_id}/workspace-filesList current file paths and sizes in one Session workspace directory. This is a metadata-only listing, not attachment history or artifact content. Unknown or repeated query parameters return 400.
Path parameters
Session ID (ses_ prefix).
Query parameters
Absolute directory /workspace or a normalized directory below it. Maximum 4096 bytes; no traversal, backslashes, or trailing slash.
Default: /workspace
Page size from 1 to 100.
Default: 20
Path sort order: asc or desc.
Default: asc
Opaque next value from the previous response. Omit on the first page; do not send an empty string. Keep path, order, and limit unchanged.
Response fields
Always page.
Current directory files, each with path and size_bytes. This is not a recursive listing.
Pass this value as page to continue; null at the end.
Whether another page is available.