Install
fetch). Works in browsers and edge runtimes with fetch available.
Quickstart
Constructor options
| Option | Default | Description |
|---|---|---|
apiKey | $HISTEERIA_API_KEY | Workspace API key |
baseUrl | https://api.histeeria.com | API base URL |
timeoutMs | 5000 | HTTP timeout |
enabled | true | Disable for local dev |
debug | false | Log transport errors |
observe() parameters
| Parameter | Type | Description |
|---|---|---|
input | unknown | Prompt, messages, or structured input |
output | string | Agent response |
agentId | string | Agent identifier |
sessionId | string | Conversation / run ID |
domain | string | Evaluation context |
metadata | object | Custom tags and flags |
inputTokens | number | Optional token count |
outputTokens | number | Optional token count |
Serverless
Alwaysawait h.flush() before the handler returns — otherwise the background queue may not drain.

