类class
agentscope.toolTaskList
class TaskList(_TaskToolBase)
源码Source
agentscope/tool/_task/_list_task.py:16–74任务列表,让智能体以受控方式调用外部能力。位于 agentscope.tool 包,继承自 _TaskToolBase。核心成员包括 call。
List tasks for the agent to perform. Declared in agentscope.tool. Extends _TaskToolBase.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
name | str | 名称字段。 | 'TaskList' |
description | str | `description` 字段。 | "Use this tool to list all tasks in the task list.\n\n## When to Use This Tool\n- To see what tasks are available to work on (status: 'pending', no owner, not blocked)\n- To check overall progress on the project\n- To find tasks that are blocked and need dependencies resolved\n- After completing a task, to check for newly unblocked work or claim the next available task\n- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones\n\n## Output\n\nReturns a summary of each task:\n- **id**: Task identifier (use with TaskGet, TaskUpdate)\n- **subject**: Brief description of the task\n- **status**: 'pending', 'in_progress', or 'completed'\n- **owner**: Agent ID if assigned, empty if available\n- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve)\n\nUse TaskGet with a specific task ID to view full details including description and comments." |
input_schema | dict | 输入模式字段。 | _TaskListParams.model_json_schema() |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
async def call(_agent_state: AgentState) -> ToolChunkasync | 向智能体发送输入并返回最终回复。 List tasks for the agent to perform. |
属性详情Attribute Detail
name
str = 'TaskList'名称字段。声明为 str。
The name field.
源码Source
agentscope/tool/_task/_list_task.py:19description
str = "Use this tool to list all tasks in the task list.\n\n## When to Use This Tool\n- To see what tasks are available to work on (status: 'pending', no owner, not blocked)\n- To check overall progress on the project\n- To find tasks that are blocked and need dependencies resolved\n- After completing a task, to check for newly unblocked work or claim the next available task\n- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones\n\n## Output\n\nReturns a summary of each task:\n- **id**: Task identifier (use with TaskGet, TaskUpdate)\n- **subject**: Brief description of the task\n- **status**: 'pending', 'in_progress', or 'completed'\n- **owner**: Agent ID if assigned, empty if available\n- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve)\n\nUse TaskGet with a specific task ID to view full details including description and comments."description 字段。声明为 str。
The description field.
源码Source
agentscope/tool/_task/_list_task.py:22input_schema
dict = _TaskListParams.model_json_schema()输入模式字段。声明为 dict。
The input schema field.
源码Source
agentscope/tool/_task/_list_task.py:42方法详情Method Detail
call
async def call(_agent_state: AgentState) -> ToolChunk
async
向智能体发送输入并返回最终回复。
List tasks for the agent to perform.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
_agent_state | AgentState | 智能体状态(类型 `AgentState`)。The agent state. |
ToolChunk
返回ToolChunk。Returns tool chunk.
源码Source
agentscope/tool/_task/_list_task.py:44–74