AS AgentScopeAPI 手册 / API Reference

MemorySearchTool

public class MemorySearchTool
源码Source io/agentscope/harness/agent/tool/MemorySearchTool.java:35–90

记忆搜索工具,封装可被智能体调用的能力。位于 io.agentscope.harness.agent.tool 包。核心成员包括 memorySearch、MemorySearchTool。

Tool for searching through persisted memories (MEMORY.md and memory/*.md files).

Uses keyword-based search through all memory files visible via the configured io.agentscope.harness.agent.filesystem.AbstractFilesystem (works across Local, Sandbox, and Store stores).

构造器摘要Constructor Summary

构造器Constructor说明Description
public MemorySearchTool(WorkspaceManager workspaceManager)
初始化 `MemorySearchTool` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String memorySearch(RuntimeContext runtimeContext, String query)
执行记忆搜索相关操作。
Performs the memory search operation.

构造器详情Constructor Detail

MemorySearchTool

public MemorySearchTool(WorkspaceManager workspaceManager)

初始化 MemorySearchTool 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
workspaceManagerWorkspaceManager工作区管理器(类型 `WorkspaceManager`)。The workspace manager.
源码Source io/agentscope/harness/agent/tool/MemorySearchTool.java:41–43

方法详情Method Detail

memorySearch

public String memorySearch(RuntimeContext runtimeContext, String query)

执行记忆搜索相关操作。

Performs the memory search operation.

参数Parameters
名称Name类型Type说明Description
runtimeContextRuntimeContext运行时上下文(类型 `RuntimeContext`)。The runtime context.
queryString查询文本(类型 `String`)。The query.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/tool/MemorySearchTool.java:45–62
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.