Agent Loop
Agent 的主循环基本都是一致的:
1 | research_log = [] |
Agent Design
所有 Agent 的设计都包含四个部分:
- Planning
- Memory
- Tool Use
- Interaction
这里注意的是,Agent 的本质是围绕 LLM 搭建的 System (即刚刚提到的 Memory + Planning + Tools + Interaction 的 entity),而不是 LLM 本质.
一些 Agent 的例子
- Deep Research Agent
Deep Research 的核心在于 Information Retrieval -> Summarization -> Generation
基于这个思路,我们可以这样设计 Agent 的四个部分:
- Planning
- Memory
- 跟踪上下文和用户需求(e.g. latency vs memory)
- 总结并分析现有文档
- Tool Use
- Web Search via ArXiv
- Read and Extract Key Insights
- Interaction
- User <-> Agents <-> LLM <-> Tools
- sub-Agent 1 <-> sub-Agent 2