SubAgentTaskInfo#
Build extensions, choose hooks, and manage request-scoped state. See the guide.
- class zett_agent.extensions.async_subagent.SubAgentTaskInfo(*, task_id, subagent_type, description, status, session_id, elapsed_seconds, content=None, stop=None, error=None, note=None)[源代码]#
Model-facing snapshot of one background task.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- 参数:
task_id (str)
subagent_type (str)
description (str)
status (SubAgentTaskStatus)
session_id (str)
elapsed_seconds (float)
content (str | None)
stop (StopInfo | None)
error (str | None)
note (str | None)
Fields#
task_id(required)Identifier to pass to task_status, task_output, or task_cancel
subagent_type(required)Subagent definition running the task
description(required)Short summary of the delegated work
status(required)running, completed, failed, or cancelled
session_id(required)Child session created for this task
elapsed_seconds(required)How long the task has run or ran
content(optional)The subagent's final report, once completed
stop(optional)Why the subagent stopped early, when it did; the report may be missing or partial
error(optional)Why the task failed, when it did
note(optional)What to do next with this task