Observe mode
Monitor the model you already run, with one call per turn.
observe() reads a turn your own model already produced and returns the user's state and a risk level. It needs no model configuration, generates nothing and never sits in front of your reply.
Users · live
- user_42↓ 3 weekselevated
- user_17steadynone
- user_88↓ todaycritical
- user_05↑ 1 weeknone
Send the turn, get the state back
Call observe() after your model has answered. Your reply goes out as normal; Humane updates the user's state and tells you how they are doing.
import os
from humane_ai import HumaneClient
client = HumaneClient(api_key=os.environ["HUMANE_API_KEY"])
# After your own model has replied, send the turn to Humane
r = client.observe(
user_id="user_42", # your stable id for this user
user_message="honestly I don't know why I keep trying",
assistant_message=reply, # optional: what your model said
)
print(r.user_state.mood) # 0.0 to 1.0, lower is lower mood
print(r.risk.level) # "none" | "elevated" | "critical"
print(r.risk.flags) # e.g. ["self_harm"]
print(r.alerts) # raised on elevated or critical riskThe first thing you can ship
Observe works the moment you have an API key. It analyses the user's message, blends the result into their stored state and runs a safety check. If you have configured a model, an extra LLM safety pass runs too, and the higher of the two risk readings wins.
- Returns mood, energy, trust and sentiment
- Risk level none, elevated or critical, with flags such as self_harm
- Fires the safety.flagged webhook on elevated or critical risk
- Stores the turn in the user's memory in the background
User state
- Mood0.28
- Trust0.71
- Energy0.34
- Familiarity0.82
Mood down 38% over 3 weeks
Risk
ELEVATED“don’t know why I keep trying” → hopelessness
Safety
HOLDOperator alerted · reply held for review
Timing
base +800ms · low_mood +1500ms
From API key to first alert
- 1
Get a key
Verify your email in the dashboard and create an hx_ API key.
- 2
Call observe()
Send each user turn, and your model's reply if you like, after it has been answered.
- 3
Subscribe to safety.flagged
Point a webhook at your on-call tool, Slack or Discord so a person hears about serious risk.
What observe() doesn't do
Observe mode never sees a reply before it is sent, so it can't hold or block one. To check replies with the gate stack, move to Guard with wrap() or process(). You can run both on the same users.
Safety gatesObserve questions
Something else? Ask us.
Works well with
User state across sessions
Humane keeps a running state for every end user, from mood and energy to trust and grudge, each with its own behaviour over time. Your model finally knows whether it is talking to someone on a good day or at the end of a bad week.
ExploreRisk alerts
Elevated or critical risk fires a signed safety.flagged webhook from both observe() and process(), whether or not a gate also acted. Send it to your own endpoint, Slack or Discord, and on to a human takeover.
ExploreWebhooks and events
Humane posts events to your endpoints as things happen: safety flags, holds and blocks, proactive triggers, takeovers, anomalies and more. Every delivery is signed with HMAC-SHA256, retried on failure and parked in a dead-letter queue if it keeps failing.
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.
