whyops
Type-safe Python SDK for WhyOps AI agent observability.
Install
pip install whyops
Quick start
from whyops import WhyOps
sdk = WhyOps(
api_key="YOUR_WHYOPS_API_KEY",
agent_name="support-agent",
agent_metadata={
"systemPrompt": "You are a helpful support agent.",
"tools": [],
},
)
trace = sdk.trace("session-123")
trace.user_message_sync([
{"role": "user", "content": "Reset my password."}
])
trace.llm_response_sync(
"openai/gpt-4o-mini",
"openai",
"I can help with that.",
usage={"promptTokens": 42, "completionTokens": 16, "totalTokens": 58},
latency_ms=420,
finish_reason="stop",
)
Proxy mode
from openai import OpenAI
from whyops import WhyOps
sdk = WhyOps(
api_key="YOUR_WHYOPS_API_KEY",
agent_name="support-agent",
agent_metadata={"systemPrompt": "You are a helpful support agent.", "tools": []},
)
client = sdk.openai(OpenAI(api_key="YOUR_OPENAI_API_KEY"))
If proxy_base_url or analyse_base_url are omitted, the SDK uses WhyOps hosted defaults.
Build and publish
python3 -m build
python3 -m twine upload dist/*
Metadata
Release files for whyops 0.1.1
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 | Actions |
|---|---|---|---|---|
| whyops-0.1.1.tar.gz | 9.3 kB | Without provenance | Details for whyops-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whyops-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for whyops-0.1.1-py3-none-any.whl |
Total release size: 20.5 kB
Release files / whyops-0.1.1.tar.gz
| Download URL | whyops-0.1.1.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae9e6ae160d249ca4f0c456dae8c5237ee3674d5ba3210a8afbad858618c1c31
|
|
BLAKE2b-256 checksum How to use checksums |
ea0da82c88541e8c7de13e258a24f4da125b3c1fa9955e1d01391f07f6333c80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / whyops-0.1.1-py3-none-any.whl
| Download URL | whyops-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
610cff841d31281af0e1d2c03367e47f59fbfa25f5a1167ab793107d0ef643a0
|
|
BLAKE2b-256 checksum How to use checksums |
73190a83dcd19ba56e89dfbf46664b01234814fbd146fb1585fa0f432d4c423c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for whyops 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.