AS AgentScopeAPI 手册 / API Reference

ManagedMemoryTools

public final class ManagedMemoryTools
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:26–95

托管记忆工具,封装可被智能体调用的能力。位于 io.agentscope.builder.web.managed 包。核心成员包括 list、read、write、edit、ManagedMemoryTools。

Direct CP memory operations also usable when filesystem tools execute on an external Worker.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ManagedMemoryTools(List<MemoryStoreFilesystem> stores)
初始化 `ManagedMemoryTools` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String list(String id)
设置列表。
Performs the list operation.
public String read(String id, String path)
执行读取相关操作。
Performs the read operation.
public String write(String id, String path, String content)
执行写入相关操作。
Performs the write operation.
public String edit(String id, String path, String oldText, String newText)
执行 `edit` 方法。
Performs the edit operation.

构造器详情Constructor Detail

ManagedMemoryTools

public ManagedMemoryTools(List<MemoryStoreFilesystem> stores)

初始化 ManagedMemoryTools 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
storesList<MemoryStoreFilesystem>stores(类型 `List`)。The stores.
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:30–33

方法详情Method Detail

list

public String list(String id)

设置列表。

Performs the list operation.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:49–59

read

public String read(String id, String path)

执行读取相关操作。

Performs the read operation.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
pathString路径(类型 `String`)。The path.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:61–69

write

public String write(String id, String path, String content)

执行写入相关操作。

Performs the write operation.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
pathString路径(类型 `String`)。The path.
contentString内容(类型 `String`)。The content.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:71–81

edit

public String edit(String id, String path, String oldText, String newText)

执行 edit 方法。

Performs the edit operation.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
pathString路径(类型 `String`)。The path.
oldTextString旧的文本(类型 `String`)。The old text.
newTextString新建文本(类型 `String`)。The new text.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/managed/ManagedMemoryTools.java:83–94
基于官方固定版本源码静态生成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.