Catalog PyPI
PACKAGE EXPLORERView in registry

agentwatch-observe

PyPI

Lightweight observability SDK for AI agents — wrap any agent framework, get anomaly detection, guardrails, and cost tracking.

agentsaiguardrailsllmmonitoringobservability
Versions collected1
Direct dependencies3From release 0.1.1
Last observed21 Oct, 08:56 UTC

README

Version 0.1.1 documentation

agentwatch-observe

Lightweight observability for AI agents. Wrap any local or cloud model call, stream steps to AgentWatch, and get cost tracking, anomaly detection, and guardrails on the dashboard at agentwatch.in.

Privacy: Your model credentials (OpenAI, Gemini, Ollama, etc.) stay on your machine. AgentWatch only receives telemetry — tokens, cost estimates, tool names, timing, and step metadata — never your API keys or raw model weights.

Install

pip install agentwatch-observe

Optional LangChain integration:

pip install "agentwatch-observe[langchain]"

Quickstart (any agent, any model)

Add to your project .env:

AGENTWATCH_API_KEY=your_key_here
AGENTWATCH_BASE_URL=https://api.agentwatch.in   # optional

Two lines in your agent code — works with Gemini, OpenAI, Ollama, LangChain, or custom logic:

import agentwatch

agentwatch.bootstrap()  # reads AGENTWATCH_API_KEY from env

@agentwatch.track(agent_name="my-agent")
def handle_message(message: str):
    return your_existing_agent_logic(message)

Open the AgentWatch dashboard → Runs to see the trace.

Optional: auto-capture provider SDK calls

If you call a provider SDK directly, wrap it once and every LLM call is logged:

from google import genai
client = agentwatch.instrument_google_genai_client(genai.Client(api_key="..."))
# client.models.generate_content(...) is now auto-logged inside an active run

# Also: instrument_openai(OpenAI()), instrument_anthropic(Anthropic())

Manual step logging (advanced)

with agentwatch.run("my-agent") as run:
    run.log_llm(model="gpt-4o-mini", input_tokens=120, output_tokens=40, output="Hello!")
    run.log_tool("search", input_data={"q": "hello"}, output_data={"results": []})

Framework-agnostic API

  • agentwatch.run(...) — context manager
  • run.log_llm(...) — LLM step with token/cost tracking
  • run.log_tool(...) — tool call step
  • agentwatch.track(...) — decorator
  • agentwatch.instrument_openai(client) — auto-log OpenAI calls

See the full docs at agentwatch.in.

Releasing a new version

PyPI never allows re-uploading the same version number.

  1. Bump version in pyproject.toml and agentwatch/__init__.py
  2. cd sdk && python -m build
  3. twine check dist/*
  4. Upload to TestPyPI first: twine upload --repository testpypi dist/*
  5. After verification, upload to PyPI: twine upload dist/*

See CONTRIBUTING.md for details.

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.1.17 Jul 20263

Package advisories

0
No matching advisories collected

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

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:0666878331cdca0c579991c0f7a606879b80d529b554c1f35b4e1efd8686ad82