AS AgentScopeAPI 手册 / API Reference

DefinitionStore

public interface DefinitionStore
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:29–51

定义定义存储契约的接口。位于 io.agentscope.builder.web.catalog 包。核心成员包括 putText、getText、delete、deletePrefix、list。

Control-plane persistence for agent definition files (skills, optional workspace assets, staged resources), independent of the session Hands AbstractFilesystem.

Structured config (tools[] / mcpServers[] / skill refs) remains in the DB version snapshot; this store holds file payloads so any control-plane replica can build a HarnessAgent without local disk affinity.

方法摘要Method Summary

方法Method说明Description
public void putText(String ownerId, String agentId, String relativePath, String content)
执行 `putText` 方法。
Writes or replaces a UTF-8 text file under the agent definition namespace.
public Optional<String> getText(String ownerId, String agentId, String relativePath)
获取文本。
Reads a UTF-8 text file, or empty when missing.
public void delete(String ownerId, String agentId, String relativePath)
删除数据。
Deletes one file key.
public void deletePrefix(String ownerId, String agentId, String prefix)
删除 `deletePrefix`。
Deletes every file whose relative path equals `prefix` or starts with ` prefix + "/"`.
public List<String> list(String ownerId, String agentId, String prefix)
执行列表相关操作。
Lists relative paths under `prefix` (inclusive of nested files).

方法详情Method Detail

putText

public void putText(String ownerId, String agentId, String relativePath, String content)

执行 putText 方法。

Writes or replaces a UTF-8 text file under the agent definition namespace.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
relativePathStringrelative 路径(类型 `String`)。The relative path.
contentString内容(类型 `String`)。The content.
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:32

getText

public Optional<String> getText(String ownerId, String agentId, String relativePath)

获取文本。

Reads a UTF-8 text file, or empty when missing.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
relativePathStringrelative 路径(类型 `String`)。The relative path.
返回Returns Optional<String>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:35

delete

public void delete(String ownerId, String agentId, String relativePath)

删除数据。

Deletes one file key.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
relativePathStringrelative 路径(类型 `String`)。The relative path.
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:38

deletePrefix

public void deletePrefix(String ownerId, String agentId, String prefix)

删除 deletePrefix。

Deletes every file whose relative path equals prefix or starts with prefix + "/".

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
prefixStringprefix(类型 `String`)。The prefix.
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:44

list

public List<String> list(String ownerId, String agentId, String prefix)

执行列表相关操作。

Lists relative paths under prefix (inclusive of nested files).

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
prefixStringprefix(类型 `String`)。The prefix.
返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/builder/web/catalog/DefinitionStore.java:50
基于官方固定版本源码静态生成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.