agents

List Agent Files

Changed on

Get the files attached to an agent with their open/closed status (paginated).

get/v1/agents/{agent_id}/files

Request

  • Base URL
    https://app.letta.com
  • URL
    https://app.letta.com/v1/agents/{agent_id}/files
  • Auth
    HTTP bearer

Path parameters

agent_idstring required

Query parameters

beforestring nullable

File ID cursor for pagination. Returns files that come before this file ID in the specified sort order

afterstring nullable

File ID cursor for pagination. Returns files that come after this file ID in the specified sort order

limitinteger nullable

Maximum number of files to return

order'asc' | 'desc'

Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest first

order_by'created_at'

Field to sort by

cursorstring nullable

Pagination cursor from previous response (deprecated, use before/after)

is_openboolean nullable

Filter by open status (true for open files, false for closed files)

Response

Successful Response

next_cursorstring nullable

Cursor for fetching the next page (file-agent relationship ID)

has_moreboolean required

Whether more results exist after this page

Changes

    • breaking

      for the query request parameter limit, default value was changed from 20 to 100

    • info

      added the new optional query request parameter after

    • info

      added the new optional query request parameter before

    • info

      added the new optional query request parameter order

    • info

      added the new optional query request parameter order_by

    • info

      query request parameter cursor was deprecated

    • info

      query request parameter limit list-of-types was widened by adding types null

    • info

      for the query request parameter limit, the type was generalized from integer to no type