AS AgentScopeAPI 手册 / API Reference

MemoryGetTool

public class MemoryGetTool
源码Source io/agentscope/harness/agent/tool/MemoryGetTool.java:29–84

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

Tool for reading specific lines from memory files, typically used after MemorySearchTool to fetch surrounding context.

构造器摘要Constructor Summary

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

方法摘要Method Summary

方法Method说明Description
public String memoryGet(RuntimeContext runtimeContext, String path, int startLine, int endLine)
执行记忆读取相关操作。
Performs the memory get operation.

构造器详情Constructor Detail

MemoryGetTool

public MemoryGetTool(WorkspaceManager workspaceManager)

初始化 MemoryGetTool 实例。

Creates a new instance.

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

方法详情Method Detail

memoryGet

public String memoryGet(RuntimeContext runtimeContext, String path, int startLine, int endLine)

执行记忆读取相关操作。

Performs the memory get operation.

参数Parameters
名称Name类型Type说明Description
runtimeContextRuntimeContext运行时上下文(类型 `RuntimeContext`)。The runtime context.
pathString路径(类型 `String`)。The path.
startLineint启动 Line(类型 `int`)。The start line.
endLineint结束 Line(类型 `int`)。The end line.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/tool/MemoryGetTool.java:37–83
基于官方固定版本源码静态生成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.