Skip to content
Letta Platform Letta Platform Letta Docs
Sign up

Files

Close All Files For Agent
PATCH/v1/agents/{agent_id}/files/close-all
Open File For Agent
PATCH/v1/agents/{agent_id}/files/{file_id}/open
Close File For Agent
PATCH/v1/agents/{agent_id}/files/{file_id}/close
List Files For Agent
GET/v1/agents/{agent_id}/files
ModelsExpand Collapse
FileCloseAllResponse = array of string
FileOpenResponse = array of string
FileCloseResponse = unknown
FileListResponse object { id, file_id, file_name, 7 more }

Response model for agent file attachments showing file status in agent context

id: string

Unique identifier of the file-agent relationship

file_id: string

Unique identifier of the file

file_name: string

Name of the file

folder_id: string

Unique identifier of the folder/source

folder_name: string

Name of the folder/source

is_open: boolean

Whether the file is currently open in the agent’s context

end_line: optional number

Ending line number if file was opened with line range

last_accessed_at: optional string

Timestamp of last access by the agent

formatdate-time
start_line: optional number

Starting line number if file was opened with line range

visible_content: optional string

Portion of the file visible to the agent if open