Skip to main content

Open-source observability SDK for AI agents — zero-instrumentation capture, OpenTelemetry-native

Project description

wardex-sdk

PyPI License

Open-source observability SDK for AI agents — zero-instrumentation capture, OpenTelemetry-native.

⚠️ Beta. PII masking is on by default (see below), but the SDK is still early: review the caveats below before sending sensitive data through it.

Install

pip install wardex-sdk

Quickstart

import wardex_sdk as wardex
from wardex_sdk import OtlpHttpTransport

wardex.init(
    transport=OtlpHttpTransport(endpoint="https://<your-collector>/v1/traces"),
    intercept=True,  # zero-instrumentation capture of LLM calls
)

# your app code — OpenAI/Anthropic calls are captured automatically

wardex.close()   # optional — spans auto-flush every 5s, on buffer threshold, and at exit

Status

Works today

  • Zero-instrumentation capture of LLM HTTP calls (OpenAI, Anthropic) over https, cleartext http, and h2c
  • gen_ai semantics: model, tokens, parameters, finish reasons, input/output messages
  • Transport metrics (TCP/TLS timing, TTFT), gRPC (grpclib), WebSocket (wss), MCP stdio
  • Export to any OpenTelemetry backend via OtlpHttpTransport
  • Manual span decorators: @workflow / @agent / @task / @tool / @span
  • PII masking on by default: emails, phone numbers, credit cards (Luhn-verified), US SSNs, IP addresses, bank routing numbers, IBANs, and API-key/token secrets are masked before anything leaves the process (pii_mode=PIIMode.OFF to disable, pii_disabled_categories={PIICategory.IP_ADDRESS} for per-category opt-out)
  • Background batching: automatic flush every 5s / on buffer threshold / at exit and on SIGINT/SIGTERM (chained; opt out with flush_on_signals=False)

Not yet (see Roadmap)

  • Framework adapters (LangGraph, Anthropic/OpenAI Agent SDKs)
  • Distributed context propagation (W3C traceparent)
  • Node/TS and Java SDKs

Notes

  • After os.fork() the worker respawns lazily in the child on first capture; spans buffered before the fork may be sent by both processes (duplicates are possible; a fork landing mid-export can also strand the child's pre-fork buffer — re-init in the child for a clean slate). Under uWSGI enable threads (--enable-threads).

Roadmap

  1. PII masking (pre-send safety) — shipped
  2. Batching & lifecycle (background worker, at-exit/periodic flush, concurrency) — shipped
  3. Framework adapters
  4. Distributed propagation (W3C)
  5. Node/TS and Java SDKs

PII masking caveats: before_send sees pre-masking data (masking runs inside the encoder), the Console transport prints raw (local debugging only), and non-UTF-8 binary payloads pass through unmasked.

License

Apache-2.0. See LICENSE and NOTICE.

"Wardex" is a trademark of Wardex Labs.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

wardex_sdk-0.1.0b4-cp310-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

wardex_sdk-0.1.0b4-cp310-abi3-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

wardex_sdk-0.1.0b4-cp310-abi3-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file wardex_sdk-0.1.0b4-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for wardex_sdk-0.1.0b4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8e312d5bda934589acd3c6f4ddbfd49dc1ce351a3b8b34e8c820a5378b19c07b
MD5 232c89e7b86f76ce905d6c7d0dc8aa94
BLAKE2b-256 58dc999e39aac984cce23e043d4a5778b39cbc91249404993a6982d45f0a02b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for wardex_sdk-0.1.0b4-cp310-abi3-win_amd64.whl:

Publisher: release-python.yml on wardex-labs/wardex-sdk

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

File details

Details for the file wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7676fe6b80f8e348c2f7286d09ed11fbceabb5a5d42079df2cdecca05f9bf8f6
MD5 92962d522841e0d256b3787b5ff26799
BLAKE2b-256 88e3c500a14ee769bc0684b443111329364339eafe4b13bc56fdb6c49bfdc3a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-python.yml on wardex-labs/wardex-sdk

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

File details

Details for the file wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c7ed55d6b7af4389a9f47d89670b0f7fcfa8037447ba25c4eb8d1dacc22c958e
MD5 9836e36b472f1da444c3582201c53d3a
BLAKE2b-256 c6703a02e891df9623fd92e43a27e8702cbf35b76173954d2a3ed06038e33961

See more details on using hashes here.

Provenance

The following attestation bundles were made for wardex_sdk-0.1.0b4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on wardex-labs/wardex-sdk

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

File details

Details for the file wardex_sdk-0.1.0b4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wardex_sdk-0.1.0b4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ca6ff0ec3e28485f5b7c4d3c8058a91a6efc43be6734b3472ddb9d7854cf6d1
MD5 9c1b2705db77c74e079738719ba06c73
BLAKE2b-256 31b01f6f38ce555f59d89d6fd281bbffe718b047079d3d6449c182efb6836830

See more details on using hashes here.

Provenance

The following attestation bundles were made for wardex_sdk-0.1.0b4-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on wardex-labs/wardex-sdk

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

File details

Details for the file wardex_sdk-0.1.0b4-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for wardex_sdk-0.1.0b4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b4a22c74d5fedb0beae623f8dd8f22a6af02db6b184519860f61ac8ff2fd57aa
MD5 c8ee7d7f42c63e018fcb6c1df787b8c0
BLAKE2b-256 5d8091b0fcc8ba94136f640e84a22eabd6e59ff01dfa9124b6b0cf66db2d59f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for wardex_sdk-0.1.0b4-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on wardex-labs/wardex-sdk

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