Agent observability SDK for Ag-Ops — wrap your LLM clients, see what your agents do.
Project description
agops-sdk
Lightweight observability wrapper for Anthropic and OpenAI Python SDKs. Part of Ag-Ops.
Your API key never leaves your machine. The SDK intercepts each request/response and ships the session log asynchronously — fire-and-forget. SDK errors never break your app.
Install
pip install agops-sdk
With your LLM client of choice:
pip install "agops-sdk[anthropic]" # or [openai]
Quickstart
import agops_sdk
from anthropic import Anthropic
agops_sdk.configure(token="ag_...", project="my-project")
# or set AGOPS_TOKEN + AGOPS_PROJECT env vars
client = agops_sdk.wrap(Anthropic())
# Works exactly like the original client
response = client.messages.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Hello"}],
)
# Streaming works too
with client.messages.stream(...) as stream:
for text in stream.text_stream:
print(text)
OpenAI works the same way:
import agops_sdk
from openai import OpenAI
client = agops_sdk.wrap(OpenAI())
response = client.chat.completions.create(...)
What gets shipped
Each call ships a session payload containing: model, messages (user + assistant + tool), token counts, duration, timestamps, and errors. The full transcript appears in the Ag-Ops dashboard within seconds.
Delivery reliability
Failed shipments retry with exponential backoff (3 attempts: 1s, 2s, 4s). On repeated failure, sessions queue to disk at ~/.agops/queue/ and drain on the next successful call.
Configuration
| Env var | Purpose |
|---|---|
AGOPS_TOKEN |
Ag-Ops API token (get one from the dashboard). |
AGOPS_PROJECT |
Project slug — optional, shown in the dashboard feed. |
AGOPS_ENDPOINT |
Override the backend endpoint (default: hosted Ag-Ops). |
License
MIT
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 agops_sdk-0.1.0.tar.gz.
File metadata
- Download URL: agops_sdk-0.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b048d858628c4f2dc498fccec116de5e29c52c980e4e00ace1dae212ad7d109
|
|
| MD5 |
6fb1f9b6d6bead7fe3bbb24d15725756
|
|
| BLAKE2b-256 |
afef5700beab4330fda8dc689ec3e63fc750d5a823cbdc5ff4dd037c3cf7ebf9
|
Provenance
The following attestation bundles were made for agops_sdk-0.1.0.tar.gz:
Publisher:
release.yml on jwadhwa2259/ag-obs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agops_sdk-0.1.0.tar.gz -
Subject digest:
1b048d858628c4f2dc498fccec116de5e29c52c980e4e00ace1dae212ad7d109 - Sigstore transparency entry: 1353845355
- Sigstore integration time:
-
Permalink:
jwadhwa2259/ag-obs@b901bb81dd0137c2a2e4b90ea53fe7700b6899ee -
Branch / Tag:
refs/tags/sdk-py-v0.1.0 - Owner: https://github.com/jwadhwa2259
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b901bb81dd0137c2a2e4b90ea53fe7700b6899ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file agops_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agops_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d4b1266a9f5f13c49f392a87e99ba97a85e146493dfba06ca0ad14f718ee3cc
|
|
| MD5 |
56088ea5e9b63c5cce6d37b6fba147ac
|
|
| BLAKE2b-256 |
07af819e5dcf18b0c2a6993dd946fb2466be52c2a5d4f635f1ffc39dc12ea507
|
Provenance
The following attestation bundles were made for agops_sdk-0.1.0-py3-none-any.whl:
Publisher:
release.yml on jwadhwa2259/ag-obs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agops_sdk-0.1.0-py3-none-any.whl -
Subject digest:
2d4b1266a9f5f13c49f392a87e99ba97a85e146493dfba06ca0ad14f718ee3cc - Sigstore transparency entry: 1353845465
- Sigstore integration time:
-
Permalink:
jwadhwa2259/ag-obs@b901bb81dd0137c2a2e4b90ea53fe7700b6899ee -
Branch / Tag:
refs/tags/sdk-py-v0.1.0 - Owner: https://github.com/jwadhwa2259
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b901bb81dd0137c2a2e4b90ea53fe7700b6899ee -
Trigger Event:
push
-
Statement type: