Skip to content

Conversation

@kaysonx
Copy link

@kaysonx kaysonx commented Dec 11, 2025

When submitting a PR, please confirm the following points and put [x] in the boxes one by one. | 在提出pr时,请确认了以下几点,并逐一使用[x]符号确认勾选。

Checklist | 检查项

  • I have read and understood the contributor guidelines. | 我已阅读并理解贡献者指南
  • I have checked for any duplicate features related to this request and communicated with the project maintainers. | 我已检查没有与此请求重复的功能并与项目维护者进行了沟通。
  • I accept the suggestion of the maintainers to make changes to or close this PR. | 我接受此PR配合维护人员的建议进行修改或关闭。
  • I have submitted the test files and can provide screenshots of the test results (required for feature or bug fixes) | 我已经提交了测试文件并可提供测试结果截图(功能修改、BUG修复类PR必须提供,其他按需)
  • I have added or modified the documentation related to this PR | 我已经添加或修改了本次pr对应的文档说明(非必要,根据实际PR内容按需添加)
  • I have added examples and notes if needed | 我已经添加了使用案例代码与文档说明(非必要,根据实际PR内容按需添加)

Please fill in the specific details of this PR: | 请详细填写本次PR的内容:
Add memory extractor component and context management toolkit that:
新增了记忆提取组件,以及上下文管理工具套件:

  • Add the memory extractor component, include factual/episodic/semantic/expert/default category, which can extract the long term memory from messages, the default implementation is to extract the memory of text format. You can expand the memory format of the extracted graphs.
    添加了记忆提取组件,包含事实性记忆、情景性记忆、语义性记忆、专家经验以及未分类记忆,能够通过配置自动的从短期会话中提取记忆并持久化以及自动加载记忆,默认为文本形式。也可以扩展图形态的记忆。
  • Add the context toolkit, which externalize the context information to the file. This is applicable when multiple agents in an architecture share the context, or when data, code, search content, and other long-context contents are externalized to a file.
    添加了上下文管理工具套件,用于在会话环境中通过文件的形式管理上下文。典型场景:让不同的子Agent共享相同的环境上下文,或者将数据、代码、搜索内容等长上下文的内容外置到文件中。
  • Add basic tests for both memory extractor and context toolkit.
    给记忆抽取、上下文工具套件添加了基础的测试

Please provide the path of test files and submit screenshots or files of the test results(fill in as needed): | 请填写测试文件路径并提供测试结果截图或文件(按需填写):

  • examples/sample_apps/react_agent_app/intelligence/test/test_react_agent.py
image
  • tests/test_agentuniverse/unit/agent/action/tool/test_context_tools.py
image

Please list the names of the docs that were added or modified in this PR (fill in as needed): | 请列出本次PR新增或修改的文档名称(按需填写):

  • agentuniverse/agent/action/tool/context_tool/config/context_toolkit.yaml
  • agentuniverse/agent/memory/memory_extract/default_memory_extract_config.yaml

…management toolkit

- Add the memory extractor component, which can extract the long term memory from messages, the default implementation is to extract the memory of text format. You can expand the memory format of the extracted graphs.
- Add the context toolkit, which externalize the context information to the file. This is applicable when multiple agents in an architecture share the context, or when data, code, search content, and other long-context contents are externalized to a file.
- Add basic tests for both memory extractor and context toolkit.

Part of agentuniverse-ai#500
@kaysonx
Copy link
Author

kaysonx commented Dec 11, 2025

#500

@kaysonx kaysonx changed the title Add memory extractor component and context management toolkit feat(context_management): Add memory extractor component and context management toolkit #500 Dec 12, 2025
- Reconstruct the memory retrieval prompt template and add detailed classification rules
- Dynamically set the user/helper ID for memory association based on the role
- Limit memory retrieval to only use the last 2 messages

Part of agentuniverse-ai#500
- Reconstruct the metadata update logic to avoid modifying the original data
- Add a session queue mechanism to ensure the sequential execution of tasks
- Incorporate queue idle timeout handling and resource cleanup

Part of agentuniverse-ai#500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant