Skip to content

Commit f9afca1

Browse files
committed
Fix acp j2
1 parent 98c566f commit f9afca1

File tree

1 file changed

+13
-1
lines changed
  • src/agentex/lib/cli/templates/default/project

1 file changed

+13
-1
lines changed

src/agentex/lib/cli/templates/default/project/acp.py.j2

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
from agentex.lib.sdk.fastacp.fastacp import FastACP
22
from agentex.lib.types.fastacp import AsyncACPConfig
33
from agentex.lib.types.acp import SendEventParams, CancelTaskParams, CreateTaskParams
4+
from agentex.lib.utils.logging import make_logger
5+
from agentex.types.text_content import TextContent
6+
from agentex.lib import adk
7+
8+
9+
logger = make_logger(__name__)
410

511

612
# Create an ACP server
13+
# This sets up the core server that will handle task creation, events, and cancellation
14+
# The `type="base"` configuration is the default configuration for the ACP server
715
acp = FastACP.create(
816
acp_type="async",
9-
config=AsyncACPConfig(type="base")
17+
config=AsyncACPConfig(
18+
type="base",
19+
),
1020
)
1121

1222

23+
# This handler is called first whenever a new task is created.
24+
# It's a good place to initialize any state or resources needed for the task.
1325
@acp.on_task_event_send
1426
async def handle_task_event_send(params: SendEventParams):
1527
# For this tutorial, we log the parameters sent to the handler

0 commit comments

Comments
 (0)