Quick Start
Get up and running with Watchtower in under 5 minutes
Step 1: Install
# Install CLI npm install -g @watchtower/cli # Install Python SDK pip install watchtower-adk
Step 2: Add the Plugin to Your Agent
Add the AgentTracePlugin to your Google ADK agent:
import os
from google.adk import Agent
from watchtower import AgentTracePlugin
# Create the plugin
plugin = AgentTracePlugin(
# Enable stdout streaming for live tail
enable_stdout=os.environ.get("WATCHTOWER_LIVE") == "1",
# Use run ID from CLI if provided
run_id=os.environ.get("WATCHTOWER_RUN_ID"),
)
# Add to your agent
agent = Agent(
name="my_agent",
model="gemini-2.0-flash",
plugins=[plugin],
)
# Run your agent as normal
result = agent.run("Hello, world!")Step 3: Run with Live Streaming
Use watchtower tail to see events in real-time:
watchtower tail python my_agent.py
You'll see a live stream of events as your agent runs:
watchtower tail
watchtower • LIVE • Run: abc123
+0ms ▶ run.start
+12ms → llm.request gemini-2.0-flash
+847ms ← llm.response 1,203 tokens 835ms
+850ms ⚙ tool.start search_web
+1341ms ✓ tool.end search_web 491ms
Step 4: View Saved Traces
After your agent finishes, traces are automatically saved. View them with:
# View the most recent trace watchtower show last # List all traces watchtower list # View a specific trace by run ID watchtower show abc123