RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix:remove duplicate tool_meta (#12139)
buua436957bc021ebd7
diff --git a/agent/component/agent_with_tools.py b/agent/component/agent_with_tools.pyindex 91b467cc53..f931f2f18d 100644--- a/agent/component/agent_with_tools.py+++ b/agent/component/agent_with_tools.py@@ -277,19 +277,15 @@ class Agent(LLM, ToolBase):else:user_request = history[-1]["content"]- def build_task_desc(prompt: str, user_request: str, tool_metas: list[dict], user_defined_prompt: dict | None = None) -> str:+ def build_task_desc(prompt: str, user_request: str, user_defined_prompt: dict | None = None) -> str:"""Build a minimal task_desc by concatenating prompt, query, and tool schemas."""user_defined_prompt = user_defined_prompt or {}- tools_json = json.dumps(tool_metas, ensure_ascii=False, indent=2)-task_desc = ("### Agent Prompt\n"f"{prompt}\n\n""### User Request\n"f"{user_request}\n\n"- "### Tools (schemas)\n"- f"{tools_json}\n")if user_defined_prompt:@@ -368,7 +364,7 @@ class Agent(LLM, ToolBase):hist.append({"role": "user", "content": content})st = timer()- task_desc = build_task_desc(prompt, user_request, tool_metas, user_defined_prompt)+ task_desc = build_task_desc(prompt, user_request, user_defined_prompt)self.callback("analyze_task", {}, task_desc, elapsed_time=timer()-st)for _ in range(self._param.max_rounds + 1):if self.check_if_canceled("Agent streaming"):diff --git a/rag/prompts/next_step.md b/rag/prompts/next_step.mdindex e84aa8f4e3..3c45a0d086 100644--- a/rag/prompts/next_step.md+++ b/rag/prompts/next_step.md@@ -94,7 +94,7 @@ This content will NOT be shown to the user.## Step 2: Structured Reflection (MANDATORY before `complete_task`)### Context-- Goal: {{ task_analysis }}+- Goal: Reflect on the current task based on the full conversation context- Executed tool calls so far (if any): reflect from conversation history### Task Complexity Assessment