AgentWatch SDK
Observability SDK for multi-agent AI systems. Captures agent interactions, LLM calls, and tool usage with zero-config framework detection.
Installation
pip install agentwatch-sdk
Install with framework support:
pip install agentwatch-sdk[openai-agents] # OpenAI Agents SDK
pip install agentwatch-sdk[langgraph] # LangGraph
pip install agentwatch-sdk[crewai] # CrewAI
pip install agentwatch-sdk[google-adk] # Google ADK
Quick Start
import agentwatch_sdk
agentwatch_sdk.init(
public_key="aw_pub_...",
secret_key="aw_sec_...",
endpoint="http://localhost:8080",
)
# Your agent code here — auto-instrumented for supported frameworks
agentwatch_sdk.shutdown()
Framework Examples
OpenAI Agents SDK (automatic, zero-config)
import agentwatch_sdk
from agents import Agent, Runner
agentwatch_sdk.init(public_key="...", secret_key="...", endpoint="http://localhost:8080")
agent = Agent(name="assistant", instructions="You are a helpful assistant.")
result = await Runner.run(agent, input="Hello!")
agentwatch_sdk.shutdown()
LangGraph (callback)
import agentwatch_sdk
agentwatch_sdk.init(public_key="...", secret_key="...", endpoint="http://localhost:8080")
engine = agentwatch_sdk.get_engine()
result = app.invoke(
{"input": "Hello!"},
config={"callbacks": [engine.langgraph_handler]},
)
agentwatch_sdk.shutdown()
CrewAI (per-crew)
import agentwatch_sdk
agentwatch_sdk.init(public_key="...", secret_key="...", endpoint="http://localhost:8080")
engine = agentwatch_sdk.get_engine()
engine.crewai_instrument(crew)
result = crew.kickoff()
agentwatch_sdk.shutdown()
Google ADK (per-runner)
import agentwatch_sdk
agentwatch_sdk.init(public_key="...", secret_key="...", endpoint="http://localhost:8080")
engine = agentwatch_sdk.get_engine()
engine.adk_instrument(runner)
async for event in runner.run_async(user_id="user1", session_id="s1", new_message=msg):
print(event)
agentwatch_sdk.shutdown()
Configuration
init() parameters
| Parameter | Env Variable | Default | Description |
|---|---|---|---|
public_key |
AGENTWATCH_PUBLIC_KEY |
— | API public key (aw_pub_...) |
secret_key |
AGENTWATCH_SECRET_KEY |
— | API secret key (aw_sec_...) |
endpoint |
AGENTWATCH_ENDPOINT |
http://localhost:8080 |
AgentWatch server URL |
flush_interval_ms |
— | 500 |
How often to flush buffered spans (ms) |
flush_batch_size |
— | 100 |
Max spans per flush batch |
Parameters passed to init() take precedence over environment variables.
API Reference
agentwatch_sdk.init(**kwargs)
Initialize the SDK and start background span export. Call this before running your agents. See Configuration for available parameters.
agentwatch_sdk.shutdown()
Flush any remaining buffered spans and stop the background exporter. Call this when your application exits.
agentwatch_sdk.get_engine()
Returns the internal AgentWatchEngine instance. Use this to access framework-specific adapters:
engine.langgraph_handler— LangGraph callback handlerengine.crewai_instrument(crew)— Instrument a CrewAI crewengine.adk_instrument(runner)— Instrument a Google ADK runner
Requirements
- Python >= 3.10
License
Apache-2.0. See LICENSE for the full text.
Release files for agentwatch-sdk 0.1.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 | |
|---|---|---|---|
| agentwatch_sdk-0.1.0.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentwatch_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.8 kB
Release files / agentwatch_sdk-0.1.0.tar.gz
| Download URL | agentwatch_sdk-0.1.0.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52e3c691604b9926a3d1d21213a3c3c8f1f650495d3cbdce369aa1314ea089f4
|
|
BLAKE2b-256 checksum How to use checksums |
de2fe7d48891670c72a384599ce229e2a466801d586a98c45cfae9739ac3a34e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / agentwatch_sdk-0.1.0-py3-none-any.whl
| Download URL | agentwatch_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4177f5670cf0fadec1e63e54360362c0c2dba94e285696818a1f19bf1af756ce
|
|
BLAKE2b-256 checksum How to use checksums |
f65a2a5d4f419954e93138d2ddbf7d85efe4b1fc04b21575e2cd2149802eb45f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|