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 |
|---|---|---|
taskId | String | 执行任务标识相关操作。 backend-assigned task identifier |
subagentId | String | 执行子智能体标识相关操作。 the subagent type executing the task |
status | String | 执行状态相关操作。 one of the `io.agentscope.harness.agent.subagent.task.TaskStatus` names |
createdAt | Instant | 执行已创建 At相关操作。 task submission time |
lastCheckedAt | Instant | 执行 `lastCheckedAt` 方法。 last status read time |
completed | boolean | 执行已完成相关操作。 convenience flag |
resultPreview | String | 执行结果预览相关操作。 first 500 chars of the result when `completed`, otherwise null |
errorMessage | String | 执行错误消息相关操作。 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–68subagentId
String subagentId执行子智能体标识相关操作。
the subagent type executing the task
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68status
String status执行状态相关操作。
one of the io.agentscope.harness.agent.subagent.task.TaskStatus names
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68createdAt
Instant createdAt执行已创建 At相关操作。
task submission time
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68lastCheckedAt
Instant lastCheckedAt执行 lastCheckedAt 方法。
last status read time
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68completed
boolean completed执行已完成相关操作。
convenience flag
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68resultPreview
String resultPreview执行结果预览相关操作。
first 500 chars of the result when completed, otherwise null
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:34–68errorMessage
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 |
|---|---|---|
t | BackgroundTask | t(类型 `BackgroundTask`)。The t. |
SubagentTaskView返回SubagentTaskView。Returns subagent task view.
源码Source
io/agentscope/spring/boot/admin/dto/SubagentTaskView.java:44–67