Install

pip install histeeria
Requires Python 3.8+.

Quickstart

import os
from histeeria import Histeeria

h = Histeeria(api_key=os.environ["HISTEERIA_API_KEY"])

response = your_llm_call(messages)

h.observe(
    input=messages,
    output=response,
    agent_id="agent_001",
    session_id="sess_abc",
    domain="customer_support",
)
Call h.flush() before exit in scripts or workers to ensure delivery.

Constructor options

ArgumentDefaultDescription
api_key$HISTEERIA_API_KEYWorkspace API key
base_urlhttps://api.histeeria.comAPI base URL
timeout5.0HTTP timeout seconds
max_queue_size10000Backpressure limit
enabledTrueDisable for local dev
debugFalseLog transport errors

observe() parameters

ParameterTypeDescription
inputanyPrompt, messages, or structured input
outputstrAgent response
agent_idstrAgent identifier
session_idstrConversation / run ID
domainstrEvaluation context
metadatadictCustom tags and flags
input_tokensintOptional token count
output_tokensintOptional token count

Context manager shutdown

with Histeeria() as h:
    h.observe(input=messages, output=response, agent_id="bot")
# auto-flush on exit