AS AgentScopeAPI 手册 / API Reference
类class agentscope.tool

TaskList

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
namestr
名称字段。
'TaskList'
descriptionstr
`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_schemadict
输入模式字段。
_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:19

description

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:22

input_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_stateAgentState智能体状态(类型 `AgentState`)。The agent state.
返回Returns ToolChunk
返回ToolChunk。Returns tool chunk.
源码Source agentscope/tool/_task/_list_task.py:44–74
基于官方固定版本源码静态生成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.