Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add descriptive titles to tools routes for docs search [LET-5757] (#5605)
cthomas952019b07275
diff --git a/fern/openapi.json b/fern/openapi.jsonindex e0dba5837..a2e8a4273 100644--- a/fern/openapi.json+++ b/fern/openapi.json@@ -4193,9 +4193,9 @@"/v1/agents/{agent_id}/tools": {"get": {"tags": ["agents"],- "summary": "List Agent Tools",- "description": "Get tools from an existing agent",- "operationId": "list_agent_tools",+ "summary": "List Tools For Agent",+ "description": "Get tools from an existing agent.",+ "operationId": "list_tools_for_agent","parameters": [{"name": "agent_id",@@ -4304,7 +4304,7 @@"items": {"$ref": "#/components/schemas/Tool"},- "title": "Response List Agent Tools"+ "title": "Response List Tools For Agent"}}}@@ -4325,9 +4325,9 @@"/v1/agents/{agent_id}/tools/attach/{tool_id}": {"patch": {"tags": ["agents"],- "summary": "Attach Tool",+ "summary": "Attach Tool To Agent","description": "Attach a tool to an agent.",- "operationId": "attach_tool",+ "operationId": "attach_tool_to_agent","parameters": [{"name": "tool_id",@@ -4387,9 +4387,9 @@"/v1/agents/{agent_id}/tools/detach/{tool_id}": {"patch": {"tags": ["agents"],- "summary": "Detach Tool",+ "summary": "Detach Tool From Agent","description": "Detach a tool from an agent.",- "operationId": "detach_tool",+ "operationId": "detach_tool_from_agent","parameters": [{"name": "tool_id",@@ -4449,9 +4449,9 @@"/v1/agents/{agent_id}/tools/approval/{tool_name}": {"patch": {"tags": ["agents"],- "summary": "Modify Approval",+ "summary": "Modify Approval For Tool","description": "Attach a tool to an agent.",- "operationId": "modify_approval",+ "operationId": "modify_approval_for_tool","parameters": [{"name": "tool_name",diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex 1015b82d7..711b7fb72 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -403,8 +403,8 @@ async def modify_agent(return await server.update_agent_async(agent_id=agent_id, request=update_agent, actor=actor)[email protected]("/{agent_id}/tools", response_model=list[Tool], operation_id="list_agent_tools")-async def list_agent_tools([email protected]("/{agent_id}/tools", response_model=list[Tool], operation_id="list_tools_for_agent")+async def list_tools_for_agent(agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),headers: HeaderParams = Depends(get_headers),@@ -420,7 +420,7 @@ async def list_agent_tools(),order_by: Literal["created_at"] = Query("created_at", description="Field to sort by"),):- """Get tools from an existing agent"""+ """Get tools from an existing agent."""actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)return await server.agent_manager.list_attached_tools_async(agent_id=agent_id,@@ -432,8 +432,8 @@ async def list_agent_tools()[email protected]("/{agent_id}/tools/attach/{tool_id}", response_model=AgentState, operation_id="attach_tool")-async def attach_tool([email protected]("/{agent_id}/tools/attach/{tool_id}", response_model=AgentState, operation_id="attach_tool_to_agent")+async def attach_tool_to_agent(tool_id: str = PATH_VALIDATORS[BaseTool.__id_prefix__],agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),@@ -448,8 +448,8 @@ async def attach_tool(return await server.agent_manager.get_agent_by_id_async(agent_id=agent_id, actor=actor)[email protected]("/{agent_id}/tools/detach/{tool_id}", response_model=AgentState, operation_id="detach_tool")-async def detach_tool([email protected]("/{agent_id}/tools/detach/{tool_id}", response_model=AgentState, operation_id="detach_tool_from_agent")+async def detach_tool_from_agent(tool_id: str = PATH_VALIDATORS[BaseTool.__id_prefix__],agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],server: "SyncServer" = Depends(get_letta_server),@@ -464,8 +464,8 @@ async def detach_tool(return await server.agent_manager.get_agent_by_id_async(agent_id=agent_id, actor=actor)[email protected]("/{agent_id}/tools/approval/{tool_name}", response_model=AgentState, operation_id="modify_approval")-async def modify_approval([email protected]("/{agent_id}/tools/approval/{tool_name}", response_model=AgentState, operation_id="modify_approval_for_tool")+async def modify_approval_for_tool(tool_name: str,requires_approval: bool,agent_id: str = PATH_VALIDATORS[AgentState.__id_prefix__],