[问题/Issue] 章节8.2.2:快速体验记忆功能

Author: vanityteenCreated Sep 21, 2026Updated Sep 21, 2026
Labelsdocumentation

1. 遇到问题的章节 / Affected Chapter

Chaper8.2.2

2. 问题类型 / Issue Type

代码错误 / Code Error

3. 具体问题描述 / Problem Description

示例代码中:

python
result1 = memory_tool.run("add", content="用户张三是一名Python开发者,专注于机器学习和数据分析", memory_type="semantic", importance=0.8)

运行后:

bash
Traceback (most recent call last):
  File "/Users/hollies/Documents/projects/hello-agents/code/chapter8/test.py", line 25, in <module>
    result1 = memory_tool.run("add", content="用户张三是一名Python开发者,专注于机器学习和数据分析", memory_type="semantic", importance=0.8)
              ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MemoryTool.run() got an unexpected keyword argument 'content'

4. 问题重现材料 / Reproduction Materials

按照教程尝试安装了0.2.0与0.2.9版本。 查找到MemoryTool中run的声明

python
def run(self, parameters: Dict[str, Any]) -> str:

请教下,我需要安装hello-agent哪个版本才是正确的

5. 补充信息 / Additional Information

No response

确认事项 / Verification

  • 我已阅读过相关章节的文档 / I have read the relevant chapter documentation
  • 我已搜索过现有的Issues,确认此问题未被报告 / I have searched existing Issues and confirmed this hasn't been reported
  • 我已尝试过基本的故障排除(如重启、重新安装依赖等) / I have tried basic troubleshooting (restart, reinstall dependencies, etc.)

Source: datawhalechina/hello-agents