Skip to main content

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.

Metadata

Release files for agentwatch-observe 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentwatch-observe 0.1.1
File Size Uploaded
agentwatch_observe-0.1.1.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentwatch-observe 0.1.1
File Interpreter ABI Platform
agentwatch_observe-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / agentwatch_observe-0.1.1.tar.gz

Download URL agentwatch_observe-0.1.1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
73ea955a70bdf5146bb7ad15e33146e7201518b8e3dcda5ab8cf06411dda45b8
BLAKE2b-256 checksum
How to use checksums
eb8bd0d1a2f88389148ce94d69d40ef668b28ca70dba270cd7016161552a981e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / agentwatch_observe-0.1.1-py3-none-any.whl

Download URL agentwatch_observe-0.1.1-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4347d4273c77377b763ffda572bc74ee2996d48fc2b22f6cc752cd542baa93b6
BLAKE2b-256 checksum
How to use checksums
c1e8d1d90417893a0083ff144ad672ca759cfb842eabc000a77c5e71739c3f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page