Current collected state Current
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Zero-config OpenAI usage tracking for AgentWatch — prompts never leave your server
Lightweight OpenAI usage tracking for AgentWatch. Token counts, model, and latency are sent to AgentWatch after each response — prompts and completions never leave your server.
pip install agentwatch-py
from openai import OpenAI
from agentwatch import wrap
client = wrap(
OpenAI(),
api_key="aw_live_...", # Your AgentWatch API key
agent_id="...", # Agent ID from your AgentWatch dashboard
)
# Use exactly as before — tracking happens automatically
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
# Streaming works too
for chunk in client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
):
pass # process chunk as normal
Only usage metadata — never your prompts or completions:
{
"agent_id": "...",
"model": "gpt-4o",
"prompt_tokens": 12,
"completion_tokens": 34,
"latency_ms": 843,
"success": true
}
| Argument | Type | Description |
|---|---|---|
api_key | str | Your AgentWatch API key (aw_live_...) |
agent_id | str | Agent ID from your dashboard |
ingest_url | str | Override the ingest URL (optional) |
Find your API key and agent IDs at getagentwatch.com/dashboard/integrations.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 14 Apr 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 08:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d58b98f44880cf531e0e87c7409c62596cccadcd41580d3d53b86557d34ef4aa