Skip to content

Commit cbbf714

Browse files
committed
Updated public examples
1 parent dbb860d commit cbbf714

18 files changed

+1084
-441
lines changed

examples/python-sdk/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ See the [context README](context/README.md) for prerequisites and detailed usage
9595

9696
## Prompt-to-SDK Conversion
9797

98-
### `example_complex_prompt.txt`
99-
A sample complex prompt that demonstrates multiple stages, conditions, and iterations. Use this to test the `/prompt-to-sdk` command.
98+
### `example_prompt.txt`
99+
A sample complex prompt that demonstrates multiple stages, conditions, and iterations. Use this to test the prompt-to-code converter.
100100

101101
**Example prompt structure:**
102102
```
@@ -118,7 +118,7 @@ Finally:
118118
- Create fix suggestions for top 3
119119
```
120120

121-
See [README_PROMPT_TO_CODE.md](README_PROMPT_TO_CODE.md) for more details on prompt-to-code conversion.
121+
See [PROMPT_TO_CODE.md](docs/PROMPT_TO_CODE.md) for more details on prompt-to-code conversion.
122122

123123
## Workflow Patterns
124124

examples/python-sdk/README_PROMPT_TO_CODE.md

Lines changed: 0 additions & 219 deletions
This file was deleted.

examples/python-sdk/acp_demo.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,32 @@
1616
class DemoListener(AgentEventListener):
1717
"""Simple listener that prints events in a user-friendly way."""
1818

19-
def on_agent_message(self, text: str) -> None:
19+
def on_agent_message_chunk(self, text: str) -> None:
20+
"""Called when the agent sends a message chunk."""
2021
print(text, end="", flush=True)
2122

22-
def on_tool_call_start(
23+
def on_tool_call(
2324
self,
2425
tool_call_id: str,
2526
title: str,
2627
kind: Optional[str] = None,
2728
status: Optional[str] = None,
2829
) -> None:
30+
"""Called when the agent starts a tool call."""
2931
print(f"\n 🔧 Using tool: {title}", flush=True)
3032

31-
def on_tool_call_update(
33+
def on_tool_response(
3234
self,
3335
tool_call_id: str,
3436
status: Optional[str] = None,
3537
content: Optional[Any] = None,
3638
) -> None:
39+
"""Called when a tool response is received."""
3740
if status == "completed":
3841
print(" ✓ Tool completed", flush=True)
3942

4043
def on_agent_thought(self, text: str) -> None:
44+
"""Called when the agent shares a thought."""
4145
pass
4246

4347

@@ -65,7 +69,7 @@ def main():
6569
print("3️⃣ Sending message that triggers tool calls: 'Read the README.md'\n")
6670
print(" Agent response: ", end="")
6771
client.send_message(
68-
"Read the file experimental/guy/auggie_sdk/README.md and tell me what it's about in one sentence.",
72+
"Read the README.md file in the current directory and tell me what it's about in one sentence.",
6973
timeout=30.0,
7074
)
7175
print("\n ✓ Got response (with tool call events shown above)\n")

examples/python-sdk/acp_example_usage.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
4. Clearing context
99
"""
1010

11-
from auggie_sdk.acp import AuggieACPClient, AgentEventListener, ModelName
11+
from auggie_sdk.acp import AuggieACPClient, AgentEventListener
1212
from typing import Optional, Any
1313

1414

1515
class 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\nFinal 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

Comments
 (0)