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 againstAgentState.TaskContext, send aToolResultBlockback, and print the final model response.
- Go 1.26.3.
AI_DASHSCOPE_API_KEYfor the DashScope model -> tool call -> tool result loop.
cd example/tool/task
go run .Output includes:
task_tools=TaskCreate,TaskGet,TaskList,TaskUpdate
chat_tool=TaskGet