AS AgentScopeAPI 手册 / API Reference

ProtocolTaskRepository

public interface ProtocolTaskRepository
源码Source io/agentscope/extensions/agentprotocol/ProtocolTaskRepository.java:31–38

定义协议任务仓库契约的接口。位于 io.agentscope.extensions.agentprotocol 包。核心成员包括 save、find。

Control-plane persistence for Agent Protocol TaskRecords.

This store is not an execution agent's workspace. Task HTTP endpoints need a global task_id lookup independent of which io.agentscope.harness.agent.HarnessAgent ran the task; records therefore live under a dedicated protocol bucket (see AgentProtocolConstants#PROTOCOL_AGENT_ID). Each agent's own io.agentscope.harness.agent.workspace.WorkspaceManager continues to own MEMORY / sessions / skills for that agent only.

方法摘要Method Summary

方法Method说明Description
public void save(TaskRecord record)
保存数据到持久化存储。
Upserts the given task record.
public Optional<TaskRecord> find(String taskId)
设置查找。
Returns the task with the given id, or empty if unknown.

方法详情Method Detail

save

public void save(TaskRecord record)

保存数据到持久化存储。

Upserts the given task record.

参数Parameters
名称Name类型Type说明Description
recordTaskRecord记录(类型 `TaskRecord`)。The record.
源码Source io/agentscope/extensions/agentprotocol/ProtocolTaskRepository.java:34

find

public Optional<TaskRecord> find(String taskId)

设置查找。

Returns the task with the given id, or empty if unknown.

参数Parameters
名称Name类型Type说明Description
taskIdString任务标识(类型 `String`)。The task id.
返回Returns Optional<TaskRecord>
返回可选。Returns optional.
源码Source io/agentscope/extensions/agentprotocol/ProtocolTaskRepository.java:37
基于官方固定版本源码静态生成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.