Streaming
Tokens as they're generated, with the analysis up front.
stream() returns server-sent events: a metadata event with the user's state, safety decision and timing before the first token, then the tokens, then done. If a gate blocks, the stream says so and ends.
POST /api/sdk/process/stream
data: {"type":"metadata","data":{"user":{"mood":0.31},
"safety":{"action":"PROCEED"},"timing":{"delay_ms":4200}}}
data: {"type":"token","data":{"content":"That"}}
data: {"type":"token","data":{"content":" sounds"}}
data: {"type":"token","data":{"content":" hard."}}
data: [DONE]Stream a reply
for event in client.stream("user_42", "Walk me through it"):
if event["type"] == "metadata": # arrives before any text
print("mood:", event["data"]["user"]["mood"])
elif event["type"] == "token":
print(event["data"]["content"], end="", flush=True)
elif event["type"] == "blocked":
print("\n[blocked]", event["data"]["message"])
breakWhat comes down the stream
- metadata: state, safety, timing and style before the first token
- token: the next piece of the reply
- blocked: a gate stopped the reply
- error and done, so you can close cleanly
Streaming questions
Something else? Ask us.
Works well with
Model adapters
Humane talks to models through four adapters: OpenAI-compatible, Anthropic, Amazon Bedrock and Replicate. Change providers without touching the behavioural layer.
ExploreTiming engine
Humane recommends how long to wait before each reply, based on the user's mood, energy, the intensity of their message and the pace of the conversation. Every delay is broken into labelled contributors, so you can see and chart why.
ExploreTelegram and WhatsApp
Register a Telegram bot or a WhatsApp Business number and Humane receives messages, runs them through the full pipeline and delivers the replies. Inbound webhooks are verified, and outbound replies are split, paced and tracked.
ExploreEvery AI should know who it's talking to.
The safety and human-oversight layer for emotional AI: user state across sessions, risk alerts, safety gates and human takeover, with every decision explained.
