File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/agentex/lib/cli/templates/default/project Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,24 @@ async def handle_task_event_send(params: SendEventParams):
1616 # so you can see where and how messages within a task are handled
1717 print(f"Hello world! I just received this message: {params}")
1818
19+ await adk.messages.create(
20+ task_id=params.task.id,
21+ trace_id=params.task.id,
22+ content=TextContent(
23+ author="user",
24+ content=params.event.content,
25+ ),
26+ )
27+
28+ await adk.messages.create(
29+ task_id=params.task.id,
30+ trace_id=params.task.id,
31+ content=TextContent(
32+ author="agent",
33+ content="Hello world! I just received this message: {params.event.content}",
34+ ),
35+ )
36+
1937@acp.on_task_cancel
2038async def handle_task_canceled(params: CancelTaskParams):
2139 # For this tutorial, we print the parameters sent to the handler
You can’t perform that action at this time.
0 commit comments