Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/python-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ See the [context README](context/README.md) for prerequisites and detailed usage

## Prompt-to-SDK Conversion

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

**Example prompt structure:**
```
Expand All @@ -118,7 +118,7 @@ Finally:
- Create fix suggestions for top 3
```

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

## Workflow Patterns

Expand Down
219 changes: 0 additions & 219 deletions examples/python-sdk/README_PROMPT_TO_CODE.md

This file was deleted.

12 changes: 8 additions & 4 deletions examples/python-sdk/acp_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,32 @@
class DemoListener(AgentEventListener):
"""Simple listener that prints events in a user-friendly way."""

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

def on_tool_call_start(
def on_tool_call(
self,
tool_call_id: str,
title: str,
kind: Optional[str] = None,
status: Optional[str] = None,
) -> None:
"""Called when the agent starts a tool call."""
print(f"\n 🔧 Using tool: {title}", flush=True)

def on_tool_call_update(
def on_tool_response(
self,
tool_call_id: str,
status: Optional[str] = None,
content: Optional[Any] = None,
) -> None:
"""Called when a tool response is received."""
if status == "completed":
print(" ✓ Tool completed", flush=True)

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


Expand Down Expand Up @@ -65,7 +69,7 @@ def main():
print("3️⃣ Sending message that triggers tool calls: 'Read the README.md'\n")
print(" Agent response: ", end="")
client.send_message(
"Read the file experimental/guy/auggie_sdk/README.md and tell me what it's about in one sentence.",
"Read the README.md file in the current directory and tell me what it's about in one sentence.",
timeout=30.0,
)
print("\n ✓ Got response (with tool call events shown above)\n")
Expand Down
20 changes: 10 additions & 10 deletions examples/python-sdk/acp_example_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
4. Clearing context
"""

from auggie_sdk.acp import AuggieACPClient, AgentEventListener, ModelName
from auggie_sdk.acp import AuggieACPClient, AgentEventListener
from typing import Optional, Any


class MyEventListener(AgentEventListener):
"""Example event listener that prints all agent events."""

def on_agent_message(self, text: str) -> None:
def on_agent_message_chunk(self, text: str) -> None:
"""Called when the agent sends a message chunk."""
print(f"[AGENT MESSAGE] {text}", end="", flush=True)

def on_tool_call_start(
def on_tool_call(
self,
tool_call_id: str,
title: str,
Expand All @@ -32,14 +32,14 @@ def on_tool_call_start(
print(f" Kind: {kind}")
print(f" Status: {status}")

def on_tool_call_update(
def on_tool_response(
self,
tool_call_id: str,
status: Optional[str] = None,
content: Optional[Any] = None,
) -> None:
"""Called when a tool call is updated."""
print(f"[TOOL CALL UPDATE] {tool_call_id}")
"""Called when a tool response is received."""
print(f"[TOOL RESPONSE] {tool_call_id}")
print(f" Status: {status}")
if content:
print(f" Content: {str(content)[:100]}...") # Truncate long content
Expand All @@ -58,7 +58,7 @@ def example_basic_usage():
# Create client without listener
# You can optionally specify model and workspace_root:
# client = AuggieACPClient(
# model=ModelName.SONNET_4_5, # Use enum for type safety
# model="sonnet4.5", # Model string
# workspace_root="/path/to/workspace"
# )
client = AuggieACPClient()
Expand Down Expand Up @@ -95,7 +95,7 @@ def example_with_listener():
print(f"Agent started! Session ID: {client.session_id}\n")

# Send a message that will trigger tool calls
message = "Please read the file experimental/guy/auggie_sdk/README.md and summarize it in one sentence."
message = "Please read the README.md file in the current directory and summarize it in one sentence."
print(f"Sending: {message}\n")
response = client.send_message(message, timeout=30.0)
print(f"\n\nFinal Response: {response}\n")
Expand Down Expand Up @@ -191,9 +191,9 @@ def example_model_and_workspace():
import os

# Create client with specific model and workspace
# You can use the ModelName enum for type safety:
# Use model string directly:
client = AuggieACPClient(
model=ModelName.SONNET_4_5, # Use enum for type safety
model="sonnet4.5", # Model string
workspace_root=os.getcwd(), # Specify workspace root
)

Expand Down
Loading