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
Metadata
Release files for agops-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 | Provenance | |
|---|---|---|---|---|
| agops_sdk-0.1.0.tar.gz | 11.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agops_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.0 kB
Release files / agops_sdk-0.1.0.tar.gz
| Download URL | agops_sdk-0.1.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b048d858628c4f2dc498fccec116de5e29c52c980e4e00ace1dae212ad7d109
|
|
BLAKE2b-256 checksum How to use checksums |
afef5700beab4330fda8dc689ec3e63fc750d5a823cbdc5ff4dd037c3cf7ebf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logRelease files / agops_sdk-0.1.0-py3-none-any.whl
| Download URL | agops_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d4b1266a9f5f13c49f392a87e99ba97a85e146493dfba06ca0ad14f718ee3cc
|
|
BLAKE2b-256 checksum How to use checksums |
07af819e5dcf18b0c2a6993dd946fb2466be52c2a5d4f635f1ffc39dc12ea507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logSecurity for agops-sdk 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agops_sdk-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logA 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.