Understand usersObserve

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_17
    steadynone
  • user_88
    ↓ todaycritical
  • user_05
    ↑ 1 weeknone
Illustration of the Observe view
Quickstart

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.

python
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 risk
Why start here

The 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
See how alerts reach a person
user_42 · session 47

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

HOLD

Operator alerted · reply held for review

Timing

base +800ms · low_mood +1500ms

Illustration of Humane’s response for one message

From API key to first alert

  1. 1

    Get a key

    Verify your email in the dashboard and create an hx_ API key.

  2. 2

    Call observe()

    Send each user turn, and your model's reply if you like, after it has been answered.

  3. 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 gates

Observe questions

Something else? Ask us.

Every 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.