Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add descriptive titles to folders routes for docs search [LET-5758] (#5606)
cthomas3cf17359a9d0
diff --git a/fern/openapi.json b/fern/openapi.jsonindex a2e8a4273..53a1f26a2 100644--- a/fern/openapi.json+++ b/fern/openapi.json@@ -4762,9 +4762,9 @@"/v1/agents/{agent_id}/files/close-all": {"patch": {"tags": ["agents"],- "summary": "Close All Open Files",+ "summary": "Close All Files For Agent","description": "Closes all currently open files for a given agent.\n\nThis endpoint updates the file state for the agent so that no files are marked as open.\nTypically used to reset the working memory view for the agent.",- "operationId": "close_all_open_files",+ "operationId": "close_all_files_for_agent","parameters": [{"name": "agent_id",@@ -4792,7 +4792,7 @@"items": {"type": "string"},- "title": "Response Close All Open Files"+ "title": "Response Close All Files For Agent"}}}@@ -4813,9 +4813,9 @@"/v1/agents/{agent_id}/files/{file_id}/open": {"patch": {"tags": ["agents"],- "summary": "Open File",+ "summary": "Open File For Agent","description": "Opens a specific file for a given agent.\n\nThis endpoint marks a specific file as open in the agent's file state.\nThe file will be included in the agent's working memory view.\nReturns a list of file names that were closed due to LRU eviction.",- "operationId": "open_file",+ "operationId": "open_file_for_agent","parameters": [{"name": "file_id",@@ -4858,7 +4858,7 @@"items": {"type": "string"},- "title": "Response Open File"+ "title": "Response Open File For Agent"}}}@@ -4879,9 +4879,9 @@"/v1/agents/{agent_id}/files/{file_id}/close": {"patch": {"tags": ["agents"],- "summary": "Close File",+ "summary": "Close File For Agent","description": "Closes a specific file for a given agent.\n\nThis endpoint marks a specific file as closed in the agent's file state.\nThe file will be removed from the agent's working memory view.",- "operationId": "close_file",+ "operationId": "close_file_for_agent","parameters": [{"name": "file_id",@@ -5071,9 +5071,9 @@"/v1/agents/{agent_id}/folders": {"get": {"tags": ["agents"],- "summary": "List Agent Folders",+ "summary": "List Folders For Agent","description": "Get the folders associated with an agent.",- "operationId": "list_agent_folders",+ "operationId": "list_folders_for_agent","parameters": [{"name": "agent_id",@@ -5182,7 +5182,7 @@"items": {"$ref": "#/components/schemas/Source"},- "title": "Response List Agent Folders"+ "title": "Response List Folders For Agent"}}}@@ -5203,9 +5203,9 @@"/v1/agents/{agent_id}/files": {"get": {"tags": ["agents"],- "summary": "List Agent Files",- "description": "Get the files attached to an agent with their open/closed status (paginated).",- "operationId": "list_agent_files",+ "summary": "List Files For Agent",+ "description": "Get the files attached to an agent with their open/closed status.",+ "operationId": "list_files_for_agent","parameters": [{"name": "agent_id",diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex 711b7fb72..f490410ea 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -597,8 +597,8 @@ async def detach_folder_from_agent(return agent_state[email protected]("/{agent_id}/files/close-all", response_model=List[str], operation_id="close_all_open_files")-async def close_all_open_files([email protected]("/{agent_id}/files/close-all", response_model=List[str], operation_id="close_all_files_for_agent")+async def close_all_files_for_agent(agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),headers: HeaderParams = Depends(get_headers),@@ -614,8 +614,8 @@ async def close_all_open_files(return await server.file_agent_manager.close_all_other_files(agent_id=agent_id, keep_file_names=[], actor=actor)[email protected]("/{agent_id}/files/{file_id}/open", response_model=List[str], operation_id="open_file")-async def open_file([email protected]("/{agent_id}/files/{file_id}/open", response_model=List[str], operation_id="open_file_for_agent")+async def open_file_for_agent(file_id: str = PATH_VALIDATORS[FileMetadataBase.__id_prefix__],agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),@@ -663,8 +663,8 @@ async def open_file(return closed_files[email protected]("/{agent_id}/files/{file_id}/close", response_model=None, operation_id="close_file")-async def close_file([email protected]("/{agent_id}/files/{file_id}/close", response_model=None, operation_id="close_file_for_agent")+async def close_file_for_agent(file_id: str = PATH_VALIDATORS[FileMetadataBase.__id_prefix__],agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),@@ -756,8 +756,8 @@ async def list_agent_sources()[email protected]("/{agent_id}/folders", response_model=list[Source], operation_id="list_agent_folders")-async def list_agent_folders([email protected]("/{agent_id}/folders", response_model=list[Source], operation_id="list_folders_for_agent")+async def list_folders_for_agent(agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),headers: HeaderParams = Depends(get_headers),@@ -787,8 +787,8 @@ async def list_agent_folders()[email protected]("/{agent_id}/files", response_model=PaginatedAgentFiles, operation_id="list_agent_files")-async def list_agent_files([email protected]("/{agent_id}/files", response_model=PaginatedAgentFiles, operation_id="list_files_for_agent")+async def list_files_for_agent(agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],before: Optional[str] = Query(None, description="File ID cursor for pagination. Returns files that come before this file ID in the specified sort order"@@ -809,7 +809,7 @@ async def list_agent_files(headers: HeaderParams = Depends(get_headers),):"""- Get the files attached to an agent with their open/closed status (paginated).+ Get the files attached to an agent with their open/closed status."""actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)