AS AgentScopeAPI 手册 / API Reference

TaskCompletionCallback

@FunctionalInterface interface TaskCompletionCallback
源码Source io/agentscope/harness/agent/subagent/task/TaskRepository.java:152–160

定义任务补全回调契约的接口。位于 io.agentscope.harness.agent.subagent.task 包。核心成员包括 onCompleted。

Callback invoked when a background task reaches a terminal state (COMPLETED or FAILED). result is null when the task failed.

方法摘要Method Summary

方法Method说明Description
public void onCompleted(RuntimeContext rc, String taskId, String subAgentId, String sessionId, String result)
处理已完成事件。
Performs the on completed operation.

方法详情Method Detail

onCompleted

public void onCompleted(RuntimeContext rc, String taskId, String subAgentId, String sessionId, String result)

处理已完成事件。

Performs the on completed operation.

参数Parameters
名称Name类型Type说明Description
rcRuntimeContextrc(类型 `RuntimeContext`)。The rc.
taskIdString任务标识(类型 `String`)。The task id.
subAgentIdString子智能体标识(类型 `String`)。The sub agent id.
sessionIdString会话标识(类型 `String`)。The session id.
resultString结果(类型 `String`)。The result.
源码Source io/agentscope/harness/agent/subagent/task/TaskRepository.java:154–159
基于官方固定版本源码静态生成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.