884. Clearing context
99"""
1010
11- from auggie_sdk .acp import AuggieACPClient , AgentEventListener , ModelName
11+ from auggie_sdk .acp import AuggieACPClient , AgentEventListener
1212from typing import Optional , Any
1313
1414
1515class MyEventListener (AgentEventListener ):
1616 """Example event listener that prints all agent events."""
1717
18- def on_agent_message (self , text : str ) -> None :
18+ def on_agent_message_chunk (self , text : str ) -> None :
1919 """Called when the agent sends a message chunk."""
2020 print (f"[AGENT MESSAGE] { text } " , end = "" , flush = True )
2121
22- def on_tool_call_start (
22+ def on_tool_call (
2323 self ,
2424 tool_call_id : str ,
2525 title : str ,
@@ -32,14 +32,14 @@ def on_tool_call_start(
3232 print (f" Kind: { kind } " )
3333 print (f" Status: { status } " )
3434
35- def on_tool_call_update (
35+ def on_tool_response (
3636 self ,
3737 tool_call_id : str ,
3838 status : Optional [str ] = None ,
3939 content : Optional [Any ] = None ,
4040 ) -> None :
41- """Called when a tool call is updated ."""
42- print (f"[TOOL CALL UPDATE ] { tool_call_id } " )
41+ """Called when a tool response is received ."""
42+ print (f"[TOOL RESPONSE ] { tool_call_id } " )
4343 print (f" Status: { status } " )
4444 if content :
4545 print (f" Content: { str (content )[:100 ]} ..." ) # Truncate long content
@@ -58,7 +58,7 @@ def example_basic_usage():
5858 # Create client without listener
5959 # You can optionally specify model and workspace_root:
6060 # client = AuggieACPClient(
61- # model=ModelName.SONNET_4_5 , # Use enum for type safety
61+ # model="sonnet4.5" , # Model string
6262 # workspace_root="/path/to/workspace"
6363 # )
6464 client = AuggieACPClient ()
@@ -95,7 +95,7 @@ def example_with_listener():
9595 print (f"Agent started! Session ID: { client .session_id } \n " )
9696
9797 # Send a message that will trigger tool calls
98- message = "Please read the file experimental/guy/auggie_sdk/ README.md and summarize it in one sentence."
98+ message = "Please read the README.md file in the current directory and summarize it in one sentence."
9999 print (f"Sending: { message } \n " )
100100 response = client .send_message (message , timeout = 30.0 )
101101 print (f"\n \n Final Response: { response } \n " )
@@ -191,9 +191,9 @@ def example_model_and_workspace():
191191 import os
192192
193193 # Create client with specific model and workspace
194- # You can use the ModelName enum for type safety :
194+ # Use model string directly :
195195 client = AuggieACPClient (
196- model = ModelName . SONNET_4_5 , # Use enum for type safety
196+ model = "sonnet4.5" , # Model string
197197 workspace_root = os .getcwd (), # Specify workspace root
198198 )
199199
0 commit comments