Histeeria SDK — observe and score your AI agent's judgement. Zero latency, zero dependencies.
Project description
Histeeria — Python SDK
Observe and score your AI agent's judgement. Wrap any LLM call, send the decision, and Histeeria evaluates it asynchronously.
- Zero latency — every send is async, fire and forget.
- Zero dependencies — standard library only.
- Failure silent — if the API is down, your agent keeps running.
Install
pip install histeeria
Quickstart
from histeeria import Histeeria
h = Histeeria(api_key="hst_live_xxxx") # or set HISTEERIA_API_KEY
response = your_llm_call(messages)
h.observe(
input=messages, # what went into the agent
output=response, # what came out
agent_id="agent_001", # which agent
session_id="sess_abc", # conversation/session id
domain="customer_support", # evaluation context
)
That's it. observe() returns immediately and the decision is delivered in the
background.
Configuration
| Argument | Env var | Default |
|---|---|---|
api_key |
HISTEERIA_API_KEY |
— |
base_url |
HISTEERIA_BASE_URL |
https://api.histeeria.com |
timeout |
— | 5.0 seconds |
max_queue_size |
— | 10000 |
enabled |
— | True |
debug |
— | False |
Advanced usage
h.observe(
input=messages,
output=response,
agent_id="agent_001",
session_id="sess_abc",
domain="customer_support",
input_tokens=1240,
output_tokens=340,
metadata={
"user_id": "usr_123",
"channel": "web",
"escalated": False,
"resolved": True,
"tags": ["billing", "refund"],
},
)
Multi-step agents (tracing)
with h.trace(agent_id="agent_001", session_id="sess_abc", domain="general") as trace:
step1 = your_llm_call(messages)
trace.step("research", input=messages, output=step1)
step2 = your_llm_call(step1 + followup)
trace.step("response", input=step1, output=step2)
trace.complete(final_output=step2, resolved=True)
A trace emits a single decision containing all steps in its metadata.
Flushing and shutdown
The client flushes automatically at interpreter exit. To flush explicitly (e.g. in short-lived scripts or serverless functions):
h.flush(timeout=3) # wait up to 3s for pending sends
h.close() # flush + stop the background sender
You can also use it as a context manager:
with Histeeria(api_key="hst_live_xxxx") as h:
h.observe(input=messages, output=response)
# flushed on exit
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 histeeria-0.1.0.tar.gz.
File metadata
- Download URL: histeeria-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4aae8e22646bf640c4730a6e0ebb10f39b415a1c5712951e19d8c889a59697
|
|
| MD5 |
aae6c2d5e1787654336307d33087f469
|
|
| BLAKE2b-256 |
32ce9b8048041033b1c32aa20d92b97c8f91e67ff8b9e804f01e39582f5edf5d
|
Provenance
The following attestation bundles were made for histeeria-0.1.0.tar.gz:
Publisher:
release.yml on histeeria/histeeria-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
histeeria-0.1.0.tar.gz -
Subject digest:
9c4aae8e22646bf640c4730a6e0ebb10f39b415a1c5712951e19d8c889a59697 - Sigstore transparency entry: 1954265092
- Sigstore integration time:
-
Permalink:
histeeria/histeeria-sdk@35762cd9369715461573a1323d334ff7e41e30fc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/histeeria
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@35762cd9369715461573a1323d334ff7e41e30fc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file histeeria-0.1.0-py3-none-any.whl.
File metadata
- Download URL: histeeria-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86aa45b6f6d36c496591192543d6d060a37b3ce01cdf43292bc2e0ca65626f9d
|
|
| MD5 |
169834d0feb4b904747380518e04d8ef
|
|
| BLAKE2b-256 |
56cc7d441648e4da7906e5342c136d25329cc28d21a92ea21d0fc8ea6d076278
|
Provenance
The following attestation bundles were made for histeeria-0.1.0-py3-none-any.whl:
Publisher:
release.yml on histeeria/histeeria-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
histeeria-0.1.0-py3-none-any.whl -
Subject digest:
86aa45b6f6d36c496591192543d6d060a37b3ce01cdf43292bc2e0ca65626f9d - Sigstore transparency entry: 1954265315
- Sigstore integration time:
-
Permalink:
histeeria/histeeria-sdk@35762cd9369715461573a1323d334ff7e41e30fc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/histeeria
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@35762cd9369715461573a1323d334ff7e41e30fc -
Trigger Event:
workflow_dispatch
-
Statement type: