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
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 sthg_agent_observatory_sdk-0.1.0.tar.gz.
File metadata
- Download URL: sthg_agent_observatory_sdk-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7159ae74cca88698dd434e1281fbfb0940963bebfd7ca1e42ed608234c23321
|
|
| MD5 |
08e7b49bca327ecff427bb6311e1e760
|
|
| BLAKE2b-256 |
ea82ef88f9bb16d41b2fe83ecda21630b53ddda47e382eec39ef34bdf838a59e
|
File details
Details for the file sthg_agent_observatory_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sthg_agent_observatory_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0e4dd1a8890afa5d15f6151ff95ca7e69f032e2bddc20a5b4ca864e2def7637
|
|
| MD5 |
0fd18cfd0de285359a83835455398369
|
|
| BLAKE2b-256 |
ab3cb6273a22f73a6650e0fad26b064d6a266eece66c6381f3c5886dabca706d
|