类class
agentscope.toolTaskGet
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 |
|---|---|---|---|
name | str | 名称字段。 | 'TaskGet' |
description | str | `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_schema | dict | 输入模式字段。 | _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:21description
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:23input_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_id | str | 任务标识(类型 `str`)。The task id. |
_agent_state | AgentState | 智能体状态(类型 `AgentState`)。The agent state. |
ToolChunk
返回ToolChunk。Returns tool chunk.
源码Source
agentscope/tool/_task/_get_task.py:47–100