From 5ea15dde5ac024b8ac429a5ac08d7279f0e06620 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sat, 15 Nov 2025 22:26:13 +0800 Subject: [PATCH] feat: enhance LLM handsoff tool execution with system prompt and run hooks --- astrbot/core/astr_agent_tool_exec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astrbot/core/astr_agent_tool_exec.py b/astrbot/core/astr_agent_tool_exec.py index 25a6a06e5..440dea2d1 100644 --- a/astrbot/core/astr_agent_tool_exec.py +++ b/astrbot/core/astr_agent_tool_exec.py @@ -79,8 +79,10 @@ class FunctionToolExecutor(BaseFunctionToolExecutor[AstrAgentContext]): event=event, chat_provider_id=prov_id, prompt=input_, + system_prompt=tool.agent.instructions, tools=toolset, max_steps=30, + run_hooks=tool.agent.run_hooks, ) yield mcp.types.CallToolResult( content=[mcp.types.TextContent(type="text", text=llm_resp.completion_text)]