Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Latest commit

 

History

History

task

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Task Tool Example

Project home: README.md.

Chinese documentation: README-zh.md.

This example shows how task tools read and write AgentState.TaskContext:

  • TaskCreate: create a task.
  • TaskUpdate: update status, owner, and metadata.
  • TaskList: list task summaries.
  • TaskGet: read one task in detail.
  • Let DashScope ChatModel request TaskGet, execute it against AgentState.TaskContext, send a ToolResultBlock back, and print the final model response.

Prerequisites

  • Go 1.26.3.
  • AI_DASHSCOPE_API_KEY for the DashScope model -> tool call -> tool result loop.

Run

cd example/tool/task
go run .

Expected Output

Output includes:

task_tools=TaskCreate,TaskGet,TaskList,TaskUpdate
chat_tool=TaskGet