SDK for AgentWatch — observability for multi-agent AI systems
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentwatch_sdk-0.1.0.tar.gz.
File metadata
- Download URL: agentwatch_sdk-0.1.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e3c691604b9926a3d1d21213a3c3c8f1f650495d3cbdce369aa1314ea089f4
|
|
| MD5 |
f6ddc8b27b56b043bd5d520cbbf0ef15
|
|
| BLAKE2b-256 |
de2fe7d48891670c72a384599ce229e2a466801d586a98c45cfae9739ac3a34e
|
File details
Details for the file agentwatch_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentwatch_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4177f5670cf0fadec1e63e54360362c0c2dba94e285696818a1f19bf1af756ce
|
|
| MD5 |
3ebb95f20afbce7bbb3ae9cabf3c02ba
|
|
| BLAKE2b-256 |
f65a2a5d4f419954e93138d2ddbf7d85efe4b1fc04b21575e2cd2149802eb45f
|