Histeeria integrates with any AI agent stack at the decision boundary — after your framework produces a response, call observe() or POST /v1/ingest. Supported ecosystems include OpenAI, Anthropic, LangChain, LlamaIndex, CrewAI, AutoGen, and fully custom agents.

Integration pattern

Every integration follows the same three steps:
  1. Run your agent normally (no Histeeria wrapper required)
  2. Call observe() with input, output, and identifiers
  3. Optionally flush() in serverless environments
from histeeria import Histeeria

h = Histeeria()

# Your existing code — unchanged
result = my_agent.run(user_input)

h.observe(input=user_input, output=result, agent_id="my-agent")

OpenAI

response = client.chat.completions.create(model="gpt-4o", messages=messages)
text = response.choices[0].message.content

h.observe(
    input=messages,
    output=text,
    agent_id="openai-support",
    input_tokens=response.usage.prompt_tokens,
    output_tokens=response.usage.completion_tokens,
    metadata={"provider": "openai", "model": "gpt-4o"},
)

Anthropic

message = client.messages.create(model="claude-sonnet-4-20250514", messages=messages, max_tokens=1024)
text = message.content[0].text

h.observe(
    input=messages,
    output=text,
    agent_id="claude-agent",
    input_tokens=message.usage.input_tokens,
    output_tokens=message.usage.output_tokens,
    metadata={"provider": "anthropic"},
)

LangChain

Wrap at chain or agent executor level:
result = chain.invoke({"input": question})
h.observe(
    input=question,
    output=result["output"],
    agent_id="langchain-rag",
    session_id=thread_id,
    metadata={"framework": "langchain"},
)
For multi-step chains, use Tracing.

LlamaIndex

Observe after query engine or agent workflow completion:
response = query_engine.query(user_question)
h.observe(input=str(user_question), output=str(response), agent_id="llamaindex-qa")

CrewAI & AutoGen

Multi-agent systems benefit from:
  • Distinct agent_id per crew member
  • Shared session_id per workflow run
  • Tracing for handoffs between agents

REST API (any language)

curl -X POST https://api.histeeria.com/v1/ingest \
  -H "Authorization: Bearer $HISTEERIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"hello","output":"hi","agent_id":"custom"}'
See Ingest API.

SDK packages

LanguageInstall
Pythonpip install histeeria
TypeScriptnpm install histeeria