agentwatch
Instrumentation SDK for AI agents — turn agent behavior into OpenTelemetry GenAI spans and validated, redacted execution records. Part of agentwatch.
Installation
pip install agentsec-agentwatch
Optional extras:
pip install "agentsec-agentwatch[langgraph]" # LangGraph adapter
pip install "agentsec-agentwatch[otlp]" # OTLP export
pip install "agentsec-agentwatch[signing]" # cryptographic signing helpers
Requires Python 3.10+.
Quickstart
Trace a plain Python agent — no framework required:
from agentwatch.raw import trace_agent
from agentwatch.spans import plan_span, execute_tool_span
@trace_agent("support-bot", agent_version="v0.1.0", model="gpt-4o", provider="openai")
def answer(request: str) -> str:
with plan_span("decide next action"):
...
with execute_tool_span("search", arguments={"q": request}):
...
return "done"
Or drive the run context explicitly:
from agentwatch.config import default_config
from agentwatch.tracer import configure_tracing
from agentwatch.context import RunContext
from agentwatch.instrument import invoke_agent
configure_tracing(default_config()) # once at startup
with invoke_agent(RunContext(agent_name="request-triage")):
...
LangGraph:
from agentwatch.langgraph import trace_graph
graph = trace_graph(compiled_graph, agent_name="planner")
Privacy
Records are redacted by default. Four privacy modes are available per span/tool call:
| Mode | What is stored |
|---|---|
truncated (default) |
Content-safe truncated values |
metadata-only |
Names, timings, and counts; no content |
hashed |
One-way digests of content |
full |
Raw content (opt-in) |
Record, replay, verify
The same package installs the CLI:
agentsec-agentwatch init # install Claude Code hooks + start the local daemon
agentsec-agentwatch sessions # list recorded sessions
agentsec-agentwatch replay <id> # reconstruct a session's action timeline
agentsec-agentwatch verify-store # verify the hash chain
Records are written to a local-first, hash-chained JSONL store; OTLP export is opt-in and gated on a redaction self-test.
Documentation
License
Apache-2.0 — see LICENSE.
Metadata
Release files for agentsec-agentwatch 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentsec_agentwatch-0.3.0.tar.gz | 741.7 kB | Without provenance | Details for agentsec_agentwatch-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentsec_agentwatch-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for agentsec_agentwatch-0.3.0-py3-none-any.whl |
Total release size: 1.3 MB
Release files / agentsec_agentwatch-0.3.0.tar.gz
| Download URL | agentsec_agentwatch-0.3.0.tar.gz |
|---|---|
| Size | 741.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e18e99b82cc495640652b3cd940caecd0b2e4f5e71d88c0eaea615828fcd1b87
|
|
BLAKE2b-256 checksum How to use checksums |
ac1307f5b61eef6977fd1ef9115cb639a0577128f74fc61184d0ec4db54a65c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / agentsec_agentwatch-0.3.0-py3-none-any.whl
| Download URL | agentsec_agentwatch-0.3.0-py3-none-any.whl |
|---|---|
| Size | 534.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8ec9e08b0338ad3e3e5e1c6631648c3f529be2e2b00121d4bfb12d805330b4c
|
|
BLAKE2b-256 checksum How to use checksums |
4f633e17b4934e5503c6f07afc436f4514c9d04ae37175241c75f784bdf33bd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Security for agentsec-agentwatch 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.