Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: undo fetch_webpage rename (#5132)
Sarah Wooders6016ac0f3319
diff --git a/letta/constants.py b/letta/constants.pyindex 5f9707b11..a06cd906e 100644--- a/letta/constants.py+++ b/letta/constants.py@@ -138,7 +138,7 @@ MEMORY_TOOLS_LINE_NUMBER_PREFIX_REGEX = re.compile()# Built in tools-BUILTIN_TOOLS = ["run_code", "web_search", "web_fetch"]+BUILTIN_TOOLS = ["run_code", "web_search", "fetch_webpage"]# Built in toolsFILES_TOOLS = ["open_files", "grep_files", "semantic_search_files"]diff --git a/letta/functions/function_sets/builtin.py b/letta/functions/function_sets/builtin.pyindex b813e2db7..a49f0661b 100644--- a/letta/functions/function_sets/builtin.py+++ b/letta/functions/function_sets/builtin.py@@ -53,7 +53,7 @@ async def web_search(raise NotImplementedError("This is only available on the latest agent architecture. Please contact the Letta team.")-async def web_fetch(url: str) -> str:+async def fetch_webpage(url: str) -> str:"""Fetch a webpage and convert it to markdown/text format using Jina AI reader.diff --git a/letta/services/tool_executor/builtin_tool_executor.py b/letta/services/tool_executor/builtin_tool_executor.pyindex e3d8adb4a..cf7e38813 100644--- a/letta/services/tool_executor/builtin_tool_executor.py+++ b/letta/services/tool_executor/builtin_tool_executor.py@@ -29,7 +29,7 @@ class LettaBuiltinToolExecutor(ToolExecutor):sandbox_config: Optional[SandboxConfig] = None,sandbox_env_vars: Optional[Dict[str, Any]] = None,) -> ToolExecutionResult:- function_map = {"run_code": self.run_code, "web_search": self.web_search, "web_fetch": self.web_fetch}+ function_map = {"run_code": self.run_code, "web_search": self.web_search, "fetch_webpage": self.fetch_webpage}if function_name not in function_map:raise ValueError(f"Unknown function: {function_name}")@@ -192,7 +192,7 @@ class LettaBuiltinToolExecutor(ToolExecutor):logger.error(f"Exa search failed for query '{query}': {str(e)}")return json.dumps({"query": query, "error": f"Search failed: {str(e)}"})- async def web_fetch(self, agent_state: "AgentState", url: str) -> str:+ async def fetch_webpage(self, agent_state: "AgentState", url: str) -> str:"""Fetch a webpage and convert it to markdown/text format using trafilatura with readability fallback.