Catalog PyPI
PACKAGE EXPLORERView in registry

agentwatch-py

PyPI

Zero-config OpenAI usage tracking for AgentWatch — prompts never leave your server

agentwatchcost-trackingllmobservabilityopenai
Versions collected1
Direct dependencies1From release 0.2.0
Last observed21 Oct, 08:56 UTC

README

Version 0.2.0 documentation

agentwatch

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.

Install

pip install agentwatch-py

Usage

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

What gets sent to AgentWatch

Only usage metadata — never your prompts or completions:

{
  "agent_id": "...",
  "model": "gpt-4o",
  "prompt_tokens": 12,
  "completion_tokens": 34,
  "latency_ms": 843,
  "success": true
}

Options

ArgumentTypeDescription
api_keystrYour AgentWatch API key (aw_live_...)
agent_idstrAgent ID from your dashboard
ingest_urlstrOverride the ingest URL (optional)

Find your API key and agent IDs at getagentwatch.com/dashboard/integrations.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.014 Apr 20261

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
sbaruwal/agentwatch

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 08:56 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d58b98f44880cf531e0e87c7409c62596cccadcd41580d3d53b86557d34ef4aa