精品欧美一区二区三区在线观看 _久久久久国色av免费观看性色_国产精品久久在线观看_亚洲第一综合网站_91精品又粗又猛又爽_小泽玛利亚一区二区免费_91亚洲精品国偷拍自产在线观看 _久久精品视频在线播放_美女精品久久久_欧美日韩国产成人在线

告別上下文溢出!用DeepAgents+DeepSeek快速構建具備網絡搜索能力的AI研究助手 原創

發布于 2025-10-29 07:27
瀏覽
0收藏

概述

在人工智能快速發展的今天,構建智能代理系統已成為開發者關注的焦點。DeepAgents 作為 LangChain 生態系統中的重要組成部分,為開發者提供了一個強大而易用的代理工具包。本文將從概念理解到代碼實踐,全面解析 DeepAgents 的技術特性與應用場景。

DeepAgents 核心概念

DeepAgents 是由 LangChain 團隊開發的開源 Python 工具包,專門用于構建能夠處理復雜任務的智能 AI 代理。它基于 LangGraph 構建,并受到 Claude Code、Deep Research 和 Manus 等先進應用程序的啟發,為開發者提供了一套完整的代理構建解決方案。

四大核心能力

1. 智能規劃與任務分解 DeepAgents 內置 ??write_todos?? 工具,使代理能夠:

  • 將復雜任務分解為離散的執行步驟
  • 實時跟蹤任務執行進度
  • 根據新信息動態調整執行計劃

2. 高效上下文管理 通過文件系統工具集(??ls???、??read_file???、??write_file???、??edit_file??),代理可以:

  • 將大型上下文信息卸載到外部存儲
  • 有效防止上下文窗口溢出問題
  • 處理可變長度的工具執行結果

3. 子代理生成機制 內置的 ??task?? 工具支持:

  • 生成專門化的子代理處理特定任務
  • 實現上下文隔離,保持主代理環境整潔
  • 深入執行復雜的子任務流程

4. 長期記憶能力 利用 LangGraph 的 Store 功能:

  • 為代理擴展跨線程持久內存
  • 保存和檢索歷史對話信息
  • 支持多會話間的知識共享

與 LangChain 生態系統的關系

DeepAgents 在 LangChain 生態系統中扮演著重要角色,它與其他組件形成了完整的技術棧:

核心依賴關系:

  • LangGraph:提供底層圖形執行引擎和狀態管理機制
  • LangChain:提供工具集成和模型抽象,與 DeepAgents 無縫協作
  • LangSmith:通過 LangGraph 平臺實現系統可觀察性和生產部署

技術架構定位:DeepAgents、LangChain 和 LangGraph

為了更好地理解這三個組件的關系,我們可以將它們類比為不同層次的技術解決方案:

  • LangChain:代理框架層 - 提供標準化的開發抽象
  • LangGraph:代理運行時層 - 負責底層執行和狀態管理
  • DeepAgents:代理工具包層 - 提供開箱即用的完整解決方案

告別上下文溢出!用DeepAgents+DeepSeek快速構建具備網絡搜索能力的AI研究助手-AI.x社區

DeepAgents 技術架構圖

DeepAgents 在技術架構中的定位關系

LangGraph:代理運行時層

LangGraph 作為代理運行時,專注于提供底層的圖形執行引擎和狀態管理能力。

核心職責: 當您需要在生產環境中運行代理時,需要可靠的代理運行時支持。LangGraph 提供了完整的基礎設施層面考慮:

  • 持久化執行:支持長時間運行的代理任務
  • 流式傳輸支持:實時數據流處理能力
  • 人機交互支持:支持人工干預和監督
  • 線程級持久化:單個會話內的狀態保持
  • 跨線程持久化:多會話間的數據共享

技術定位: LangGraph 的設計理念借鑒了 Temporal、Inngest 等持久執行引擎,專注于為代理框架提供可靠的底層運行時支持。

LangChain:代理框架層

LangChain 作為代理框架,主要價值在于提供標準化的開發抽象。

核心價值:

  • 抽象化設計:將復雜的 LLM 交互抽象為易用的接口
  • 標準化開發:提供統一的應用構建方法
  • 簡化入門:降低開發者的學習和使用門檻
  • 項目遷移:支持開發人員在不同項目間輕松遷移

設計理念: 優秀的抽象應該簡化復雜性而不是增加復雜性。LangChain 1.0 構建于 LangGraph 之上,充分利用其代理運行時能力,為開發者提供更高層次的開發體驗。

DeepAgents:代理工具包層

DeepAgents 是 LangChain 團隊的最新項目,它比代理框架更高層次——直接構建于 LangChain 之上。

獨特優勢:

  • 預設提示詞:內置優化的提示詞模板
  • 工具調用處理:自定義的工具調用邏輯
  • 規劃工具集:內置任務規劃和分解能力
  • 文件系統訪問:完整的文件操作支持
  • 開箱即用:自帶"電池"的完整解決方案

產品定位: DeepAgents 可以理解為"通用版的 Claude Code"。它不僅僅是一個框架,而是一個完整的代理工具包,為開發者提供了構建復雜代理系統的所有必要組件。

三者詳細對比

Agent Frameworks(代理框架)、Agent Runtimes(代理運行時) 和 Agent Harnesses(代理工具包) 的詳細對比

層級

代表工具/框架

中文解釋與價值點

典型使用場景

工具包層

 (Harness)

DeepAgents Claude Agent SDK

開箱即用的完整解決方案

 ? 預設提示詞和工具 ? 內置子代理生成 ? 完整的文件系統支持 ? 高度封裝,開發效率最高

快速原型開發

 ? 構建自主研究代理 ? 自動化報告生成 ? 復雜任務自動化 ? 需要快速上線的項目

框架層

 (Framework)

LangChain CrewAI Google ADK OpenAI Agents SDK LlamaIndex Vercel AI SDK

標準化開發抽象

 ? 統一的工具調用接口 ? 標準化的鏈式操作 ? 模塊化的組件設計 ? 便于團隊協作和維護

企業級應用開發

 ? 需要靈活組合的項目 ? 團隊協作開發 ? 自定義業務邏輯 ? 多模型集成場景

運行時層

 (Runtime)

LangGraph Temporal Inngest

生產級執行保障

 ? 持久化狀態管理 ? 斷點續跑機制 ? 流式輸出支持 ? 人機交互回路(HITL) ? 適合長時間、有狀態任務

生產環境部署

 ? 長時間運行的代理 ? 高可靠性要求 ? 復雜工作流編排 ? 需要監控和調試的系統

一句話總結:

  • Harness 像“整機”,拿來就用;
  • Framework 像“主板”,按需插拔;
  • Runtime 像“電源+冷卻”,保證任務不熄火。

快速入門

首先安裝必要的依賴包:

uv add deepagents tavily-python python-dotenv langchain-deepseek

在工程根目錄下創建 ??.env?? 文件,配置 API 密鑰:

DEEPSEEK_API_KEY=sk-xxx
TAVILY_API_KEY=tvly-dev-xxx

基礎示例:構建研究代理

以下代碼展示了如何使用 DeepAgents 結合 DeepSeek 和 Tavily 構建一個具備網絡搜索能力的研究代理:

import os
from typing import Literal
from tavily import TavilyClient
from deepagents import create_deep_agent
from langchain_deepseek import ChatDeepSeek

# 加載環境變量
from dotenv import load_dotenv
load_dotenv()

tavily_client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])

# 初始化 DeepSeek 模型
deepseek_model = ChatDeepSeek(
    model="deepseek-chat",  # 使用 DeepSeek-V3,支持工具調用和結構化輸出
    api_key=os.environ["DEEPSEEK_API_KEY"],
    temperature=0.1,
)

def internet_search(
    query: str,
    max_results: int = 5,
    topic: Literal["general", "news", "finance"] = "general",
    include_raw_content: bool = False,
):
    """Run a web search"""
    return tavily_client.search(
        query,
        max_results=max_results,
        include_raw_cnotallow=include_raw_content,
        topic=topic,
    )

# System prompt to steer the agent to be an expert researcher
research_instructions = """You are an expert researcher. Your job is to conduct thorough research and then write a polished report.

You have access to an internet search tool as your primary means of gathering information.

## `internet_search`

Use this to run an internet search for a given query. You can specify the max number of results to return, the topic, and whether raw content should be included.
"""

agent = create_deep_agent(
    tools=[internet_search],
    system_prompt=research_instructions,
    model=deepseek_model  # 使用 DeepSeek 模型
)

result = agent.invoke({"messages": [{"role": "user", "content": "What is langgraph?"}]})

# Print the agent's response
print(result["messages"][-1].content)

運行結果

執行命令 ??uv run deepagents_samples.py??,可以看到代理成功調用了網絡搜索工具,并生成了關于 LangGraph 的詳細報告:

Based on my research, here's a comprehensive overview of what LangGraph is:

## What is LangGraph?

**LangGraph** is an open-source framework within the LangChain ecosystem designed for building **stateful, multi-actor applications** using Large Language Models (LLMs). It provides a structured approach to creating complex agent and multi-agent workflows with fine-grained control over both the flow and state of applications.

## Key Features and Capabilities

### 1. **State Management**
- Maintains persistent state across multiple agent interactions
- Enables agents to remember context and build upon previous interactions
- Supports complex, long-running workflows that require memory

### 2. **Multi-Agent Coordination**
- Orchestrates multiple AI agents working together
- Manages parallel execution of agents
- Coordinates information sharing between agents through centralized state

### 3. **Graph-Based Architecture**
- Models workflows as directed graphs where nodes represent agents or operations
- Supports conditional workflows that alter execution paths based on agent outputs
- Provides fine-grained control over workflow logic

### 4. **Human-in-the-Loop Integration**
- Allows human intervention and oversight in agent workflows
- Supports real-time monitoring and debugging
- Enables manual approval or modification of agent decisions

## Primary Use Cases

LangGraph is particularly well-suited for:

- **Complex multi-agent systems** where multiple specialized agents need to collaborate
- **Stateful applications** that require memory and context across interactions
- **Custom agent architectures** with unique logic and workflow requirements
- **Production-ready agent systems** that need reliability and monitoring
- **Task automation tools** with complex, conditional workflows

## Technical Foundation

- Built on top of LangChain's ecosystem
- Available in both Python and JavaScript
- Supports integration with various LLM providers
- Provides APIs and tools for deployment and monitoring
- Used by companies like GitLab, Elastic, Cisco, and Vodafone in production

## Why Use LangGraph?

LangGraph addresses the challenges of building sophisticated LLM applications by providing:
- **Structured coordination** of multiple agents
- **State persistence** across complex workflows
- **Fine-grained control** over agent behavior
- **Production-ready** deployment capabilities
- **Flexible architecture** for custom requirements

In essence, LangGraph moves beyond simple LLM integrations to enable the creation of truly sophisticated, stateful agent systems capable of handling complex, real-world tasks that require coordination, memory, and conditional logic

深入理解:添加日志追蹤

由于 DeepAgents 進行了高度封裝,為了更好地理解其內部工作機制,我們可以添加日志記錄來觀察模型的調用和執行過程:

import os
import logging
import json
from typing import Literal
from tavily import TavilyClient
from deepagents import create_deep_agent
from langchain_deepseek import ChatDeepSeek
from langchain_core.callbacks import BaseCallbackHandler
from langchain_core.messages import BaseMessage
from langchain_core.outputs import LLMResult

# 加載環境變量
from dotenv import load_dotenv
load_dotenv()

# 配置日志
logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    handlers=[
        logging.FileHandler('deepagents.log'),
        logging.StreamHandler()
    ]
)
logger = logging.getLogger(__name__)

# 自定義回調處理器來記錄模型交互
class DeepSeekLoggingCallback(BaseCallbackHandler):
    """自定義回調處理器,用于記錄 DeepSeek 模型的完整交互過程"""
    
    def on_llm_start(self, serialized, prompts, **kwargs):
        """記錄模型調用開始"""
        logger.info("=== DeepSeek 模型調用開始 ===")
        try:
            logger.info(f"序列化信息: {json.dumps(serialized, ensure_ascii=False, indent=2, default=str)}")
        except Exception as e:
            logger.info(f"序列化信息: {str(serialized)} (序列化失敗: {e})")
        for i, prompt in enumerate(prompts):
            logger.info(f"輸入提示 {i+1}: {prompt}")
        if kwargs:
            try:
                logger.info(f"額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2, default=str)}")
            except Exception as e:
                logger.info(f"額外參數: {str(kwargs)} (序列化失敗: {e})")
    
    def on_llm_end(self, response: LLMResult, **kwargs):
        """記錄模型調用結束"""
        logger.info("=== DeepSeek 模型調用結束 ===")
        for i, generation in enumerate(response.generations):
            for j, gen in enumerate(generation):
                output_text = gen.text
                logger.info(f"輸出結果 {i+1}-{j+1}: {output_text}")
                
                # 記錄生成信息(如果可用)
                if hasattr(gen, 'generation_info') and gen.generation_info:
                    try:
                        logger.info(f"生成信息 {i+1}-{j+1}: {json.dumps(gen.generation_info, ensure_ascii=False, indent=2, default=str)}")
                    except Exception as e:
                        logger.info(f"生成信息 {i+1}-{j+1}: {str(gen.generation_info)}")
        
        # 記錄使用的 token 數量(如果可用)
        if hasattr(response, 'llm_output') and response.llm_output:
            try:
                logger.info(f"LLM 輸出信息: {json.dumps(response.llm_output, ensure_ascii=False, indent=2, default=str)}")
            except Exception as e:
                logger.info(f"LLM 輸出信息: {str(response.llm_output)}")
        
        if kwargs:
            try:
                logger.info(f"額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2, default=str)}")
            except Exception as e:
                logger.info(f"額外參數: {str(kwargs)}")
    
    def on_llm_error(self, error, **kwargs):
        """LLM 出錯時調用"""
        logger.error(f"=== DeepSeek 模型調用出錯 ===")
        logger.error(f"錯誤信息: {str(error)}")
        logger.error(f"錯誤類型: {type(error).__name__}")
        if kwargs:
            logger.error(f"額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_llm_new_token(self, token: str, **kwargs):
        """記錄新生成的 token"""
        logger.info(f"新生成 token: '{token}'")
        if kwargs:
            logger.info(f"Token 額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_chain_start(self, serialized, inputs, **kwargs):
        """記錄鏈調用開始"""
        logger.info("=== 鏈調用開始 ===")
        logger.info(f"鏈序列化信息: {json.dumps(serialized, ensure_ascii=False, indent=2)}")
        logger.info(f"鏈輸入: {json.dumps(inputs, ensure_ascii=False, indent=2)}")
        if kwargs:
            logger.info(f"鏈額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_chain_end(self, outputs, **kwargs):
        """記錄鏈調用結束"""
        logger.info("=== 鏈調用結束 ===")
        logger.info(f"鏈輸出: {json.dumps(outputs, ensure_ascii=False, indent=2)}")
        if kwargs:
            logger.info(f"鏈額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_chain_error(self, error, **kwargs):
        """記錄鏈調用出錯"""
        logger.error(f"=== 鏈調用出錯 ===")
        logger.error(f"錯誤信息: {str(error)}")
        logger.error(f"錯誤類型: {type(error).__name__}")
        if kwargs:
            logger.error(f"鏈額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_tool_start(self, serialized, input_str, **kwargs):
        """記錄工具調用開始"""
        logger.info("=== 工具調用開始 ===")
        logger.info(f"工具序列化信息: {json.dumps(serialized, ensure_ascii=False, indent=2)}")
        logger.info(f"工具輸入: {input_str}")
        if kwargs:
            logger.info(f"工具額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_tool_end(self, output, **kwargs):
        """記錄工具調用結束"""
        logger.info("=== 工具調用結束 ===")
        logger.info(f"工具輸出: {output}")
        if kwargs:
            logger.info(f"工具額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_tool_error(self, error, **kwargs):
        """記錄工具調用出錯"""
        logger.error(f"=== 工具調用出錯 ===")
        logger.error(f"錯誤信息: {str(error)}")
        logger.error(f"錯誤類型: {type(error).__name__}")
        if kwargs:
            logger.error(f"工具額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_text(self, text, **kwargs):
        """記錄文本輸出"""
        logger.info(f"=== 文本輸出 ===")
        logger.info(f"文本內容: {text}")
        if kwargs:
            logger.info(f"文本額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_retry(self, retry_state, **kwargs):
        """記錄重試"""
        logger.info(f"=== 重試操作 ===")
        logger.info(f"重試狀態: {retry_state}")
        if kwargs:
            logger.info(f"重試額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")
    
    def on_custom_event(self, name, data, **kwargs):
        """記錄自定義事件"""
        logger.info(f"=== 自定義事件: {name} ===")
        logger.info(f"事件數據: {json.dumps(data, ensure_ascii=False, indent=2)}")
        if kwargs:
            logger.info(f"事件額外參數: {json.dumps(kwargs, ensure_ascii=False, indent=2)}")

# 創建回調處理器實例
deepseek_callback = DeepSeekLoggingCallback()

tavily_client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])

# 初始化 DeepSeek 模型
logger.info("初始化 DeepSeek 模型...")
deepseek_model = ChatDeepSeek(
    model="deepseek-chat",  # 使用 DeepSeek-V3,支持工具調用和結構化輸出
    api_key=os.environ["DEEPSEEK_API_KEY"],
    temperature=0.1,
    callbacks=[deepseek_callback]  # 添加回調處理器
)
logger.info(f"DeepSeek 模型初始化完成: model=deepseek-chat, temperature=0.1")

def internet_search(
    query: str,
    max_results: int = 5,
    topic: Literal["general", "news", "finance"] = "general",
    include_raw_content: bool = False,
):
    """Run a web search"""
    logger.info("=== Tavily 網絡搜索開始 ===")
    logger.info(f"搜索參數:")
    logger.info(f"  - 查詢內容: '{query}'")
    logger.info(f"  - 最大結果數: {max_results}")
    logger.info(f"  - 搜索主題: '{topic}'")
    logger.info(f"  - 包含原始內容: {include_raw_content}")
    
    try:
        result = tavily_client.search(
            query,
            max_results=max_results,
            include_raw_cnotallow=include_raw_content,
            topic=topic,
        )
        
        logger.info("=== Tavily 網絡搜索結果 ===")
        results_count = len(result.get('results', []))
        logger.info(f"搜索完成,返回 {results_count} 個結果")
        
        # 記錄每個搜索結果的詳細信息
        for i, search_result in enumerate(result.get('results', []), 1):
            logger.info(f"結果 {i}:")
            logger.info(f"  - 標題: {search_result.get('title', 'N/A')}")
            logger.info(f"  - URL: {search_result.get('url', 'N/A')}")
            logger.info(f"  - 評分: {search_result.get('score', 'N/A')}")
            
            # 記錄內容摘要
            content = search_result.get('content', '')
            if content:
                logger.info(f"  - 內容摘要: {content}")
            else:
                logger.info(f"  - 內容摘要: 無內容")
            
            # 如果包含原始內容,也記錄完整內容
        if include_raw_content and'raw_content'in search_result:
            raw_content = search_result.get('raw_content', '')
            if raw_content:
                logger.info(f"  - 原始內容: {raw_content}")
            else:
                logger.info(f"  - 原始內容: 無原始內容")
        
        # 記錄搜索查詢信息(如果可用)
        if'query'in result:
            logger.info(f"實際執行的查詢: '{result['query']}'")
        
        logger.info("=== Tavily 網絡搜索完成 ===")
        return result
        
    except Exception as e:
        logger.error(f"=== Tavily 網絡搜索失敗 ===")
        logger.error(f"錯誤信息: {str(e)}")
        logger.error(f"搜索參數: query='{query}', max_results={max_results}, topic='{topic}'")
        raise

# System prompt to steer the agent to be an expert researcher
research_instructions = """You are an expert researcher. Your job is to conduct thorough research and then write a polished report.

You have access to an internet search tool as your primary means of gathering information.

## `internet_search`

Use this to run an internet search for a given query. You can specify the max number of results to return, the topic, and whether raw content should be included.
"""

logger.info("=== 創建 DeepAgent ===")
agent = create_deep_agent(
    tools=[internet_search],
    system_prompt=research_instructions,
    model=deepseek_model  # 使用 DeepSeek 模型
)
logger.info("DeepAgent 創建完成")

user_query = "What is langgraph?"
logger.info(f"=== 開始執行用戶查詢 ===")
logger.info(f"用戶問題: '{user_query}'")

result = agent.invoke({"messages": [{"role": "user", "content": user_query}]})

logger.info("=== 用戶查詢執行完成 ===")
logger.info("=== Agent 最終響應 ===")

# 記錄完整的對話歷史
for i, message in enumerate(result["messages"]):
    role = message.role if hasattr(message, 'role') else getattr(message, 'type', 'unknown')
    content = message.content if hasattr(message, 'content') else str(message)
    
    logger.info(f"消息 {i+1} ({role}):")
    logger.info(f"  內容: {content}")

# Print the agent's response
final_response = result["messages"][-1].content
logger.info("=== 輸出最終結果給用戶 ===")
print("\n" + "="*50)
print("DeepAgent 響應:")
print("="*50)
print(final_response)
print("="*50)

可以看見完整調用過程,內容過長,不進行展示。其中 DeepAgents 添加的提示詞如下。

System: You are an expert researcher. Your job is to conduct thorough research and then write a polished report.

You have access to an internet search tool as your primary means of gathering information.

## `internet_search`

Use this to run an internet search for a given query. You can specify the max number of results to return, the topic, and whether raw content should be included.


In order to complete the objective that the user asks of you, you have access to a number of standard tools.

## `write_todos`

You have access to the `write_todos` tool to help you manage and plan complex objectives.
Use this tool for complex objectives to ensure that you are tracking each necessary step and giving the user visibility into your progress.
This tool is very helpful for planning complex objectives, and for breaking down these larger complex objectives into smaller steps.

It is critical that you mark todos as completed as soon as you are done with a step. Do not batch up multiple steps before marking them as completed.
For simple objectives that only require a few steps, it is better to just complete the objective directly and NOT use this tool.
Writing todos takes time and tokens, use it when it is helpful for managing complex many-step problems! But not for simple few-step requests.

## Important To-Do List Usage Notes to Remember
- The `write_todos` tool should never be called multiple times in parallel.
- Don't be afraid to revise the To-Do list as you go. New information may reveal new tasks that need to be done, or old tasks that are irrelevant.

## Filesystem Tools `ls`, `read_file`, `write_file`, `edit_file`

You have access to a filesystem which you can interact with using these tools.
All file paths must start with a /.

- ls: list all files in the filesystem
- read_file: read a file from the filesystem
- write_file: write to a file in the filesystem
- edit_file: edit a file in the filesystem

## `task` (subagent spawner)

You have access to a `task` tool to launch short-lived subagents that handle isolated tasks. These agents are ephemeral — they live only for the duration of the task and return a single result.

When to use the task tool:
- When a task is complex and multi-step, and can be fully delegated in isolation
- When a task is independent of other tasks and can run in parallel
- When a task requires focused reasoning or heavy token/context usage that would bloat the orchestrator thread
- When sandboxing improves reliability (e.g. code execution, structured searches, data formatting)
- When you only care about the output of the subagent, and not the intermediate steps (ex. performing a lot of research and then returned a synthesized report, performing a series of computations or lookups to achieve a concise, relevant answer.)

Subagent lifecycle:
1. **Spawn** → Provide clear role, instructions, and expected output
2. **Run** → The subagent completes the task autonomously
3. **Return** → The subagent provides a single structured result
4. **Reconcile** → Incorporate or synthesize the result into the main thread

When NOT to use the task tool:
- If you need to see the intermediate reasoning or steps after the subagent has completed (the task tool hides them)
- If the task is trivial (a few tool calls or simple lookup)
- If delegating does not reduce token usage, complexity, or context switching
- If splitting would add latency without benefit

## Important Task Tool Usage Notes to Remember
- Whenever possible, parallelize the work that you do. This is true for both tool_calls, and for tasks. Whenever you have independent steps to complete - make tool_calls, or kick off tasks (subagents) in parallel to accomplish them faster. This saves time for the user, which is incredibly important.
- Remember to use the `task` tool to silo independent tasks within a multi-part objective.
- You should use the `task` tool whenever you have a complex task that will take multiple steps, and is independent from other tasks that the agent needs to complete. These agents are highly competent and efficient.
Human: What is langgraph?

總結

核心價值:

  • 開箱即用:DeepAgents 作為代理工具包,提供了完整的解決方案,大大降低了開發門檻
  • 高度集成:基于 LangGraph 運行時和 LangChain 框架,充分利用了成熟的生態系統
  • 靈活擴展:支持自定義工具和模型,滿足不同場景的需求

技術優勢:

  • 預設的提示詞和工具集合
  • 內置的子代理生成能力
  • 完整的文件系統操作支持
  • 與主流 LLM 提供商的無縫集成

適用場景:

  • 快速原型開發和概念驗證
  • 自動化研究和報告生成
  • 復雜任務的智能化處理
  • 需要快速上線的 AI 代理項目

DeepAgents 代表了 AI 代理開發的一個重要方向:通過高度封裝和標準化,讓開發者能夠專注于業務邏輯而非底層實現細節。隨著 AI 技術的不斷發展,這種"工具包"模式將在企業級應用中發揮越來越重要的作用。


本文轉載自??AI 博物院?? 作者:longyunfeigu

?著作權歸作者所有,如需轉載,請注明出處,否則將追究法律責任
已于2025-10-29 07:27:05修改
收藏
回復
舉報
回復
相關推薦
男人久久天堂| 空姐吹箫视频大全| 一区二区日韩欧美| 91福利精品第一导航| 亚洲高清视频一区二区| 国产免费黄色片| 野花国产精品入口| 日韩专区在线观看| 李丽珍裸体午夜理伦片| 欧美片第一页| 一区二区三区四区av| 久久人人九九| jlzzjlzzjlzz亚洲人| 午夜影院日韩| 色综合五月天导航| www在线观看免费视频| 精品中文字幕一区二区三区四区| 亚洲国产视频a| 亚洲视频欧美在线| 天天操天天干天天舔| 久久精品国产网站| 热99精品里视频精品| 国语对白在线播放| 精品国产网站| 亚洲精品国精品久久99热| 天天操,天天操| www.youjizz.com在线| 国产精品全国免费观看高清| 精品久久久久久综合日本| 91久久国语露脸精品国产高跟| 99热精品在线| 欧美激情欧美狂野欧美精品| 国产精品综合激情| 啄木系列成人av电影| 亚洲精品一区二区三区99| 在线免费黄色网| 91tv亚洲精品香蕉国产一区| 大伊人狠狠躁夜夜躁av一区| 日本a在线天堂| 免费人成在线观看播放视频| 国产欧美日本一区二区三区| 久久精品99| 亚洲精品网站在线| 国产激情精品久久久第一区二区| 国产日本欧美一区二区三区在线 | 色偷偷中文字幕| 成人久久网站| 欧美色爱综合网| 国产精品第12页| 韩漫成人漫画| 一本久久a久久免费精品不卡| 亚洲理论电影在线观看| 日韩欧美一起| 亚洲一本大道在线| 日本一级黄视频| 日韩激情av| 亚洲午夜影视影院在线观看| 麻豆一区二区三区在线观看| 黄色免费网站在线观看| 亚洲日本在线看| 青青草影院在线观看| 国产一区久久精品| 亚洲精品视频自拍| 日韩小视频网站| 高清在线视频不卡| 性感美女久久精品| 成年人视频网站免费观看| 免费成人在线电影| 欧美日韩国产精品一区| 少妇高清精品毛片在线视频| 欧美日韩成人影院| 欧美日韩中文字幕一区| 黄色小视频免费网站| 高清一区二区| 精品国内二区三区| 色呦呦一区二区| av影片在线一区| 久久九九有精品国产23| 欧美日韩三级在线观看| 一区在线视频| 日韩美女免费视频| 97在线播放免费观看| 国产曰批免费观看久久久| 999热视频| 欧美精品少妇| 亚洲天天做日日做天天谢日日欢 | 欧美一区二区性放荡片| 国产性猛交96| 红桃视频在线观看一区二区| 日韩中文字幕视频在线| 国产在线观看免费视频今夜| 久久蜜桃精品| 亚洲一区亚洲二区| 日韩大胆人体| 亚洲免费在线观看视频| 国产免费黄色小视频| 亚洲mmav| 成人18在线| 激情久久久久久久久久久久久久久久| 91视频免费进入| 日批视频免费播放| 欧美激情一区二区三区不卡| 天天操天天干天天玩| 狼人综合视频| 欧美日韩国产经典色站一区二区三区 | 瑟瑟视频在线| 天天色天天爱天天射综合| 992kp快乐看片永久免费网址| 日本伊人久久| 亚洲午夜久久久久久久| 久久久久亚洲av片无码下载蜜桃 | 欧美一级小视频| 精品中国亚洲| 久久久999国产| 国产又粗又猛又黄视频| 丁香一区二区三区| 一本一道久久a久久精品综合 | 国产精品网址在线| 六月婷婷综合网| 国产精品二区一区二区aⅴ污介绍| 日韩xxxx视频| 欧美日韩国产一区二区在线观看| 亚洲丝袜一区在线| jizz国产免费| 国产精品69毛片高清亚洲| 亚洲欧美一区二区原创| 亚洲国产福利| 亚洲高清久久网| 欧美黄色免费看| 国内外成人在线视频| 欧美亚洲精品日韩| 17videosex性欧美| 欧美xxxx在线观看| 国产一区二区播放| 久久99在线观看| 亚洲第一综合| 成人h在线观看| 亚洲色图色老头| 依依成人综合网| 99久久99久久精品免费看蜜桃| wwwjizzjizzcom| 国产一区二区久久久久| www国产精品视频| 中文在线观看免费高清| 国产亚洲精品精华液| 99999精品视频| 四虎884aa成人精品最新| 孩xxxx性bbbb欧美| 亚洲国产中文字幕在线| 一区二区三区四区国产精品| 韩国三级丰满少妇高潮| 综合激情婷婷| 成人高清在线观看| av福利导福航大全在线| 精品国产污网站| 国产成人精品片| 91日韩在线专区| 99精品视频在线看| 国产调教一区二区三区| 国产精品国产亚洲伊人久久| www日韩tube| 欧美日韩午夜影院| 免费看特级毛片| 国产精品白丝jk黑袜喷水| 男插女免费视频| 91麻豆精品国产91久久久久推荐资源| 欧美黄色片视频| 姝姝窝人体www聚色窝| 欧美小视频在线观看| 亚洲av无码一区二区三区人| 欧美aa在线视频| 无码人妻精品一区二区三区99v| 日韩视频一二区| 97国产精品免费视频| 男女污视频在线观看| 欧美午夜免费电影| 紧身裙女教师波多野结衣| 成人综合婷婷国产精品久久蜜臀| 亚洲人成无码网站久久99热国产| 国产精品毛片视频| 日本一区二区三区在线播放| 国产三级视频在线看| 欧美人妖巨大在线| 国产精品7777| 中文字幕欧美区| 老女人性生活视频| 久久xxxx| 法国空姐在线观看免费| 久久久久观看| 国产免费成人av| 97人人在线视频| 影音先锋欧美精品| 性一交一乱一伧老太| 欧美日韩国产中字| 久草福利资源在线| 99久久精品99国产精品| 天堂在线中文在线| 亚洲美女一区| 亚洲一卡二卡| 西野翔中文久久精品字幕| 国产日产久久高清欧美一区| 成人在线黄色电影| 久久精品国产成人精品| 视频在线观看你懂的| 7777精品伊人久久久大香线蕉经典版下载| 日韩免费黄色片| 亚洲丝袜美腿综合| 极品人妻videosss人妻| 懂色av一区二区三区蜜臀| 在线观看免费黄网站| 国内精品美女在线观看| 婷婷四房综合激情五月| 久久aimee| 91免费电影网站| 性欧美freehd18| 97精品在线视频| caoporn免费在线| 中文字幕久热精品视频在线| 日韩在线一区二区三区四区| 91精品国产综合久久蜜臀| 日韩在线播放中文字幕| 亚洲美女屁股眼交| 国产三级短视频| 久久女同互慰一区二区三区| 美国黄色一级视频| 国产精品123区| 国产精品一区二区小说| 亚洲在线网站| 久久久久免费看黄a片app| 在线成人激情| 中文字幕不卡每日更新1区2区| 国产欧美日韩精品高清二区综合区| 国产精品yjizz| av综合网页| αv一区二区三区| 久久国产精品美女| 国产原创欧美精品| 黑人一区二区三区| 国产精品美女www| 日韩成人高清| 国产成人一区二区三区小说| 性感女国产在线| 国产91精品久久久| 悠悠资源网亚洲青| 91av福利视频| 蜜桃视频动漫在线播放| 51精品在线观看| 中文在线а√天堂| 2020欧美日韩在线视频| www视频在线观看| 久久全国免费视频| 久久男人av资源站| 欧美一二三视频| 成人性生交大片免费观看网站| 日本精品一区二区三区在线| 在线日韩影院| 国产成人免费av| 欧美国产日韩电影| 国产精品视频内| 在线播放成人| 99久久一区三区四区免费| 粉嫩一区二区三区四区公司1| 国产激情一区二区三区在线观看| 丁香婷婷成人| 免费亚洲精品视频| 精品久久久久久久久久久下田| 日韩欧美亚洲在线| 99精品视频在线观看播放| 中文字幕欧美日韩一区二区| 欧美成人久久| 日本在线xxx| 日韩高清在线电影| 日日干日日操日日射| 国产成人午夜99999| 国产综合内射日韩久| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲天堂久久新| 国产精品国产三级国产三级人妇 | 亚洲a级在线播放观看| 人人爱人人干婷婷丁香亚洲| 国产精品永久入口久久久| 少妇高潮一区二区三区| 亚洲国产精品久久久久婷婷老年| 亚洲成人最新网站| 九色自拍视频在线观看| 日韩国产一区二| 男人女人拔萝卜视频| 99久久精品国产精品久久| jizz中文字幕| 洋洋成人永久网站入口| 国产无套丰满白嫩对白| 欧美二区三区91| 午夜影院在线视频| xvideos成人免费中文版| 91超碰在线播放| 国产欧美 在线欧美| 国产精品videossex| 色综合电影网| 18成人免费观看视频| 91香蕉视频导航| 成人免费电影视频| 国产馆在线观看| 偷拍一区二区三区四区| 在线免费看av的网站| 亚洲精品久久久久久久久久久久 | 亚洲资源网你懂的| 毛片在线视频观看| 日韩精品欧美精品| www.com日本| 亚洲欧美一区二区三区久本道91| 影音先锋亚洲天堂| 日韩欧美你懂的| 午夜免费播放观看在线视频| 91精品国产高清| 2023国产精华国产精品| 亚洲狠狠婷婷综合久久久| 一区二区动漫| 精品伦一区二区三区| 亚洲欧洲日本在线| 一级片免费在线播放| 亚洲福利视频网站| 欧美videossex| 91欧美日韩一区| 久久国产成人精品| 少妇高清精品毛片在线视频 | 免费不卡av| 成人免费看黄网站| 成人免费电影网址| 97av视频在线观看| 成人一区二区三区在线观看| 欧美爱爱免费视频| 欧美日韩一区二区三区在线| 免费黄色在线视频网站| 91精品国产自产91精品| 国产精品白丝一区二区三区| 97久久国产亚洲精品超碰热| 国产乱妇无码大片在线观看| 国产尤物在线播放| 欧美精品一卡两卡| 888av在线| 国产精品igao视频| 国产精品欧美三级在线观看| 免费黄色日本网站| 91在线视频播放地址| 中文字幕一区二区三区精品| 亚洲精品在线网站| 不卡av免费观看| 国产高清精品一区二区三区| 欧美激情一区| 在线xxxxx| 偷窥少妇高潮呻吟av久久免费| 天堂在线视频免费| 欧美在线一区二区三区四| 亚洲人成网亚洲欧洲无码| 日本成年人网址| 国产日产亚洲精品系列| 免费看av在线| 久久精视频免费在线久久完整在线看| www一区二区三区| 欧美交换配乱吟粗大25p| 国产激情精品久久久第一区二区 | 超碰在线最新| 爱情岛论坛亚洲入口| 一本色道精品久久一区二区三区| 久久人人爽人人爽人人片| 欧美性猛交xxxx乱大交| 国产毛片av在线| 成人伊人精品色xxxx视频| 欧美成人亚洲| 国产亚洲色婷婷久久99精品91| 色先锋aa成人| 欧美激情视频在线播放| 亚洲v日韩v综合v精品v| 在线不卡视频| japanese中文字幕| 在线综合视频播放| xxxx另类黑人| 视频一区三区| 国产精品1区2区| 天堂在线免费观看视频| 中文字幕一精品亚洲无线一区| 久久伦理中文字幕| 无码人妻丰满熟妇区96| 日本一区二区免费在线| av在线免费在线观看| 2024亚洲男人天堂| 日韩精品一区二区久久| 色悠悠在线视频| 欧洲精品在线观看| 亚洲91av| 日产精品一线二线三线芒果| 国产福利91精品一区| 国产精品777777| 欧美精品在线免费| 九九精品久久| 一级全黄裸体片| 欧美日韩一区国产| 涩涩网在线视频| 成人污网站在线观看| 国产日韩欧美亚洲|