Skip to main content

AI Agent observability SDK and XAgent adapter

Project description

sthg-agent-observatory-sdk

Python SDK for the AI Agent observability platform. It provides a lightweight XAgent adapter that keeps the original local trace writer behavior and asynchronously reports normalized events to the observability backend.

Install

pip install sthg-agent-observatory-sdk

XAgent Usage

import os

os.environ.setdefault("OBSERVABILITY_ENABLED", "true")
os.environ.setdefault("OBSERVABILITY_ENDPOINT", "http://127.0.0.1:8011")
os.environ.setdefault("OBSERVABILITY_API_KEY", "<app-api-key>")
os.environ.setdefault("OBSERVABILITY_PROJECT_KEY", "<project-key>")
os.environ.setdefault("OBSERVABILITY_APP_KEY", "<app-key>")
os.environ.setdefault("OBSERVABILITY_ENVIRONMENT", "dev")

from sthg_agent_observatory_sdk.xagent import install_xagent_observability

install_xagent_observability()

Environment Variables

Name Default Description
OBSERVABILITY_ENABLED false Enables collection and reporting.
OBSERVABILITY_ENDPOINT http://127.0.0.1:8011 Observability backend endpoint.
OBSERVABILITY_API_KEY empty App-level API key generated by the platform.
OBSERVABILITY_PROJECT_KEY worldmonitor Project key configured in the platform.
OBSERVABILITY_APP_KEY worldmonitor-xagent App key configured in the platform.
OBSERVABILITY_ENVIRONMENT dev App environment.
OBSERVABILITY_BATCH_SIZE 200 Flush after this many events.
OBSERVABILITY_FLUSH_INTERVAL_SECONDS 3 Flush interval when batch size is not reached.

License

Apache-2.0

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

sthg_agent_observatory_sdk-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

sthg_agent_observatory_sdk-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file sthg_agent_observatory_sdk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sthg_agent_observatory_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b7159ae74cca88698dd434e1281fbfb0940963bebfd7ca1e42ed608234c23321
MD5 08e7b49bca327ecff427bb6311e1e760
BLAKE2b-256 ea82ef88f9bb16d41b2fe83ecda21630b53ddda47e382eec39ef34bdf838a59e

See more details on using hashes here.

File details

Details for the file sthg_agent_observatory_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sthg_agent_observatory_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e4dd1a8890afa5d15f6151ff95ca7e69f032e2bddc20a5b4ca864e2def7637
MD5 0fd18cfd0de285359a83835455398369
BLAKE2b-256 ab3cb6273a22f73a6650e0fad26b064d6a266eece66c6381f3c5886dabca706d

See more details on using hashes here.

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