From 59f24fb5b4020a0c2a42283f5dbe0d48eb43db80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E4=BF=8A=E7=94=B7?= Date: Thu, 15 Jan 2026 11:55:00 +0800 Subject: [PATCH 1/2] feat(muti agent): non-streaming output sub-nodes do not record the generated content of the conversation --- api/app/services/draft_run_service.py | 5 +++-- api/app/services/multi_agent_orchestrator.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/app/services/draft_run_service.py b/api/app/services/draft_run_service.py index 569684d5..50934226 100644 --- a/api/app/services/draft_run_service.py +++ b/api/app/services/draft_run_service.py @@ -245,7 +245,8 @@ class DraftRunService: storage_type: Optional[str] = None, user_rag_memory_id: Optional[str] = None, web_search: bool = True, - memory: bool = True + memory: bool = True, + sub_agent: bool = False ) -> Dict[str, Any]: """执行试运行(使用 LangChain Agent) @@ -435,7 +436,7 @@ class DraftRunService: elapsed_time = time.time() - start_time # 8. 保存会话消息 - if agent_config.memory and agent_config.memory.get("enabled"): + if not sub_agent and agent_config.memory and agent_config.memory.get("enabled"): await self._save_conversation_message( conversation_id=conversation_id, user_message=message, diff --git a/api/app/services/multi_agent_orchestrator.py b/api/app/services/multi_agent_orchestrator.py index b0c7a957..1972f344 100644 --- a/api/app/services/multi_agent_orchestrator.py +++ b/api/app/services/multi_agent_orchestrator.py @@ -1327,7 +1327,8 @@ class MultiAgentOrchestrator: web_search=web_search, memory=memory, storage_type=storage_type, - user_rag_memory_id=user_rag_memory_id + user_rag_memory_id=user_rag_memory_id, + sub_agent=True ) return result From ec25efcb756f51977cd8664121c9a7fd42096305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E4=BF=8A=E7=94=B7?= Date: Thu, 15 Jan 2026 12:21:24 +0800 Subject: [PATCH 2/2] fix(mcp tool): bug fix for the sse protocol request header in the mcp tool --- api/app/core/tools/mcp/client.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/app/core/tools/mcp/client.py b/api/app/core/tools/mcp/client.py index e513a147..c082b314 100644 --- a/api/app/core/tools/mcp/client.py +++ b/api/app/core/tools/mcp/client.py @@ -96,10 +96,7 @@ class SimpleMCPClient: """初始化 SSE MCP 会话 - 参考 Dify 实现""" try: # 建立 SSE 连接 - response = await self._session.get( - self.server_url, - headers={"Accept": "text/event-stream"} - ) + response = await self._session.get(self.server_url) if response.status != 200: error_text = await response.text()