AS AgentScopeAPI 手册 / API Reference

SubagentTaskView

public record SubagentTaskView( String taskId, String subagentId, String status, Instant createdAt, Instant lastCheckedAt, boolean completed, String resultPreview, String errorMessage)
源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

承载子智能体任务 View数据的记录类型。位于 io.agentscope.spring.boot.admin.dto 包。核心成员包括 taskId、subagentId、status、createdAt、lastCheckedAt、completed。

Wire view of a BackgroundTask dispatched to a subagent. Distinct from AgentTaskView, which is the in-AgentState TodoWrite-style record.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
taskIdString
执行任务标识相关操作。
backend-assigned task identifier
subagentIdString
执行子智能体标识相关操作。
the subagent type executing the task
statusString
执行状态相关操作。
one of the `io.agentscope.harness.agent.subagent.task.TaskStatus` names
createdAtInstant
执行已创建 At相关操作。
task submission time
lastCheckedAtInstant
执行 `lastCheckedAt` 方法。
last status read time
completedboolean
执行已完成相关操作。
convenience flag
resultPreviewString
执行结果预览相关操作。
first 500 chars of the result when `completed`, otherwise null
errorMessageString
执行错误消息相关操作。
non-null when the task failed

方法摘要Method Summary

方法Method说明Description
public static SubagentTaskView of(BackgroundTask t)
static
创建并返回实例。
Creates and returns an instance.

记录组件详情Record Component Detail

taskId

String taskId

执行任务标识相关操作。

backend-assigned task identifier

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

subagentId

String subagentId

执行子智能体标识相关操作。

the subagent type executing the task

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

status

String status

执行状态相关操作。

one of the io.agentscope.harness.agent.subagent.task.TaskStatus names

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

createdAt

Instant createdAt

执行已创建 At相关操作。

task submission time

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

lastCheckedAt

Instant lastCheckedAt

执行 lastCheckedAt 方法。

last status read time

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

completed

boolean completed

执行已完成相关操作。

convenience flag

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

resultPreview

String resultPreview

执行结果预览相关操作。

first 500 chars of the result when completed, otherwise null

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

errorMessage

String errorMessage

执行错误消息相关操作。

non-null when the task failed

源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68

方法详情Method Detail

of

public static SubagentTaskView of(BackgroundTask t)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
tBackgroundTaskt(类型 `BackgroundTask`)。The t.
返回Returns SubagentTaskView
返回SubagentTaskView。Returns subagent task view.
源码Source io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:44–67
基于官方固定版本源码静态生成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.