Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agops_sdk-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agops_sdk-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

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

Hashes for agops_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b048d858628c4f2dc498fccec116de5e29c52c980e4e00ace1dae212ad7d109
MD5 6fb1f9b6d6bead7fe3bbb24d15725756
BLAKE2b-256 afef5700beab4330fda8dc689ec3e63fc750d5a823cbdc5ff4dd037c3cf7ebf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agops_sdk-0.1.0.tar.gz:

Publisher: release.yml on jwadhwa2259/ag-obs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for agops_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d4b1266a9f5f13c49f392a87e99ba97a85e146493dfba06ca0ad14f718ee3cc
MD5 56088ea5e9b63c5cce6d37b6fba147ac
BLAKE2b-256 07af819e5dcf18b0c2a6993dd946fb2466be52c2a5d4f635f1ffc39dc12ea507

See more details on using hashes here.

Provenance

The following attestation bundles were made for agops_sdk-0.1.0-py3-none-any.whl:

Publisher: release.yml on jwadhwa2259/ag-obs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page