Skip to content
Sign up

Files

Close All Files For Agent
agents.files.close_all(stragent_id) -> FileCloseAllResponse
PATCH/v1/agents/{agent_id}/files/close-all
Open File For Agent
agents.files.open(strfile_id, FileOpenParams**kwargs) -> FileOpenResponse
PATCH/v1/agents/{agent_id}/files/{file_id}/open
Close File For Agent
agents.files.close(strfile_id, FileCloseParams**kwargs) -> object
PATCH/v1/agents/{agent_id}/files/{file_id}/close
List Files For Agent
agents.files.list(stragent_id, FileListParams**kwargs) -> SyncNextFilesPage[FileListResponse]
GET/v1/agents/{agent_id}/files
ModelsExpand Collapse
List[str]
List[str]
class FileListResponse:

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

id: str

Unique identifier of the file-agent relationship

file_id: str

Unique identifier of the file

file_name: str

Name of the file

folder_id: str

Unique identifier of the folder/source

folder_name: str

Name of the folder/source

is_open: bool

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

end_line: Optional[int]

Ending line number if file was opened with line range

last_accessed_at: Optional[datetime]

Timestamp of last access by the agent

formatdate-time
start_line: Optional[int]

Starting line number if file was opened with line range

visible_content: Optional[str]

Portion of the file visible to the agent if open