Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

agentwatch-io

Production monitoring SDK for AI agents

Published6 Apr 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

AgentWatch Python SDK

Production monitoring for AI agents: rule-based checks on every trace, optional LLM judge analysis when a step is flagged, plus async delivery to your AgentWatch API.

Install

pip install agentwatch-io

From a clone of this repo (editable / dev):

pip install -e ./agentwatch-sdk

Import name is always agentwatch after either install.

Quick start

import agentwatch
import openai

agentwatch.init(
    api_key="aw_...",                 # Dashboard → API Keys
    server_url="http://localhost:8000",
    agent_name="my-agent",
)

client = agentwatch.watch(openai.OpenAI())

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)

init alone does not trace calls — you must use watch(client) (or a patched default client) so requests go through the wrapper.

LLM analysis (optional judge)

When rule checks flag a trace, the server can call your OpenAI, Anthropic, or Groq API with a judge prompt. Enable in init:

import os

agentwatch.init(
    api_key="aw_...",
    server_url="https://your-api.example.com",
    agent_name="my-agent",
    deep_analysis=True,
    llm_provider="openai",
    llm_api_key=os.environ["OPENAI_API_KEY"],
    llm_model="gpt-4o-mini",
)

Your LLM key is sent only to your provider from the API process; AgentWatch does not log or store it.

Parameters

ParameterDescription
api_keyAgentWatch key (aw_...).
server_urlFastAPI base URL.
agent_nameShown in dashboard.
deep_analysisEnable LLM judge on flagged traces.
llm_provider"openai", "anthropic", or "groq".
llm_api_keyProvider key for judge (including Groq).
groq_api_keyOptional; same as putting the Groq key in llm_api_key.
llm_modelOptional model override.
content_modeIf True, server runs extra content-creation checks (repetition, length, injection phrases, off-topic heuristic).
redact_fieldsField names to redact in trace text.
silentSuppress stdout from init.

Anthropic

import anthropic

agentwatch.init(api_key="aw_...", server_url="...", agent_name="bot")
client = agentwatch.watch(anthropic.Anthropic())
client.messages.create(model="claude-3-5-haiku-20241022", max_tokens=256, messages=[...])

Groq

Install Groq’s Python SDK (pip install groq). The client is OpenAI-compatible for chat.completions:

import os
import agentwatch
from groq import Groq

agentwatch.init(
    api_key="aw_...",
    server_url="http://localhost:8000",
    agent_name="content-generator",
    deep_analysis=True,
    llm_provider="groq",
    llm_api_key=os.environ["GROQ_API_KEY"],
    llm_model="llama-3.3-70b-versatile",
)

client = agentwatch.watch(Groq())
client.chat.completions.create(
    model="llama-3.3-70b-versatile",
    messages=[{"role": "user", "content": "Write a short paragraph about Python."}],
)

Full documentation

See the Documentation page in the AgentWatch dashboard (/docs) for architecture, runs, alerts, and dashboard setup.

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.28.0runtime

Distribution files

2 collected
agentwatch_io-0.1.0-py3-none-any.whl

bdist_wheel · 7.49 KB · Python py3

Source file
agentwatch_io-0.1.0.tar.gz

sdist · 6.42 KB · Python source

Source file

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_version:9bc4cd8111e64dddf0a9bf1d97c1ae7f4bb57c8b066f8dda176c19e394c3ccba

Other collected versions

View all collected versions →