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

TaskGet

class TaskGet(_TaskToolBase)
源码Source agentscope/tool/_task/_get_task.py:18–100

任务读取,让智能体以受控方式调用外部能力。位于 agentscope.tool 包,继承自 _TaskToolBase。核心成员包括 call。

Retrieve a task by its ID from the task list. Declared in agentscope.tool. Extends _TaskToolBase.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
namestr
名称字段。
'TaskGet'
descriptionstr
`description` 字段。
"Use this tool to retrieve a task by its ID from the task list.\n\n## When to Use This Tool\n\n- When you need the full description and context before starting work on a task\n- To understand task dependencies (what it blocks, what blocks it)\n- After being assigned a task, to get complete requirements\n\n## Output\n\nReturns full task details:\n- **subject**: Task title\n- **description**: Detailed requirements and context\n- **status**: 'pending', 'in_progress', or 'completed'\n- **blocks**: Tasks waiting on this one to complete\n- **blockedBy**: Tasks that must complete before this one can start\n\n## Tips\n\n- After fetching a task, verify its blockedBy list is empty before beginning work.\n- Use TaskList to see all tasks in summary form."
input_schemadict
输入模式字段。
_TaskGetParams.model_json_schema()

方法摘要Method Summary

方法Method说明Description
async def call(task_id: str, _agent_state: AgentState) -> ToolChunkasync
向智能体发送输入并返回最终回复。
Retrieve a task by its ID.

属性详情Attribute Detail

name

str = 'TaskGet'

名称字段。声明为 str。

The name field.

源码Source agentscope/tool/_task/_get_task.py:21

description

str = "Use this tool to retrieve a task by its ID from the task list.\n\n## When to Use This Tool\n\n- When you need the full description and context before starting work on a task\n- To understand task dependencies (what it blocks, what blocks it)\n- After being assigned a task, to get complete requirements\n\n## Output\n\nReturns full task details:\n- **subject**: Task title\n- **description**: Detailed requirements and context\n- **status**: 'pending', 'in_progress', or 'completed'\n- **blocks**: Tasks waiting on this one to complete\n- **blockedBy**: Tasks that must complete before this one can start\n\n## Tips\n\n- After fetching a task, verify its blockedBy list is empty before beginning work.\n- Use TaskList to see all tasks in summary form."

description 字段。声明为 str。

The description field.

源码Source agentscope/tool/_task/_get_task.py:23

input_schema

dict = _TaskGetParams.model_json_schema()

输入模式字段。声明为 dict。

The input schema field.

源码Source agentscope/tool/_task/_get_task.py:45

方法详情Method Detail

call

async def call(task_id: str, _agent_state: AgentState) -> ToolChunk
async

向智能体发送输入并返回最终回复。

Retrieve a task by its ID.

参数Parameters
名称Name类型Type说明Description
task_idstr任务标识(类型 `str`)。The task id.
_agent_stateAgentState智能体状态(类型 `AgentState`)。The agent state.
返回Returns ToolChunk
返回ToolChunk。Returns tool chunk.
源码Source agentscope/tool/_task/_get_task.py:47–100
基于官方固定版本源码静态生成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.