Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat(core): rename fetch_webpage to web_fetch (#5110)
Charles Packer09b173668ac9
diff --git a/letta/constants.py b/letta/constants.pyindex a06cd906e..5f9707b11 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", "fetch_webpage"]+BUILTIN_TOOLS = ["run_code", "web_search", "web_fetch"]# 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 a49f0661b..b813e2db7 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 fetch_webpage(url: str) -> str:+async def web_fetch(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 cf7e38813..e3d8adb4a 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, "fetch_webpage": self.fetch_webpage}+ function_map = {"run_code": self.run_code, "web_search": self.web_search, "web_fetch": self.web_fetch}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 fetch_webpage(self, agent_state: "AgentState", url: str) -> str:+ async def web_fetch(self, agent_state: "AgentState", url: str) -> str:"""Fetch a webpage and convert it to markdown/text format using trafilatura with readability fallback.