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 |
|---|---|---|
record | TaskRecord | 记录(类型 `TaskRecord`)。The record. |
源码Source
io/agentscope/extensions/agentprotocol/ProtocolTaskRepository.java:34find
public Optional<TaskRecord> find(String taskId)
设置查找。
Returns the task with the given id, or empty if unknown.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
Optional<TaskRecord>返回可选。Returns optional.
源码Source
io/agentscope/extensions/agentprotocol/ProtocolTaskRepository.java:37