Skip to main content

Humane AI SDK

Behavioral intelligence layer for LLM applications. One line to make your AI emotionally aware, relationally continuous, and safety-gated.

Install

pip install humane-ai

Quick Start

from humane_ai import HumaneClient

client = HumaneClient(api_key="hx_your_key")

# Single message
response = client.process("user_123", "I need help with my order")
print(response.response)           # AI response shaped by behavioral context
print(response.user.mood)          # 0.35 — frustration detected
print(response.context.empathy)    # 0.95 — auto-increased
print(response.timing.delay_ms)    # 400  — faster for urgent user
print(response.safety.action)      # PROCEED

# Multi-turn (history auto-managed)
client.process("user_123", "My name is Sarah, I work at TechCorp")
r = client.process("user_123", "Do you remember my name?")
# AI responds: "Yes, you're Sarah from TechCorp"

# Check behavioral state
if response.user.is_frustrated:
    print("User needs extra care")

# Proactive triggers
if response.proactive:
    for event in response.proactive:
        print(f"TRIGGER: {event.trigger} — {event.suggested_action}")

# Reading the analysis payload (mirrors the JS SDK exactly since 0.4.0)
a = response.analysis
if a:
    print(a.signal_magnitude)         # "normal" | "strong" | "pivot"
    print(a.mood_delta, a.energy_delta)
    for tg in a.triggers:
        print(f"  {tg.phrase} → {tg.emotion} ({tg.polarity})")
    for reason in a.reasons:
        print(f"  why: {reason}")

# Safety detail
print(response.safety.action)         # PROCEED | HOLD | BLOCK
for m in response.safety.matched:
    print(f"  matched {m.phrase} ({m.category})")
print(response.safety.override)       # e.g. "combo_a_force_block" or None

# A/B experiment assignments for this request
for ex in response.experiments:
    print(f"{ex.experiment_name}: variant {ex.variant_name}")

# Streaming
for event in client.stream("user_123", "Explain how engines work"):
    if event["type"] == "token":
        print(event["data"]["content"], end="", flush=True)

Metadata

Release files for humane-ai 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for humane-ai 0.3.1
File Size Uploaded Provenance Actions
humane_ai-0.3.1.tar.gz 12.4 kB With provenance Details for humane_ai-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for humane-ai 0.3.1
File Interpreter ABI Platform Actions
humane_ai-0.3.1-py3-none-any.whl Python 3 none any Details for humane_ai-0.3.1-py3-none-any.whl

Total release size: 28.8 kB

Release files / humane_ai-0.3.1.tar.gz

Download URL humane_ai-0.3.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d55e6f1736dfbb1de90905e9bb233478afec09a3024468f3d475d03666282ae7
BLAKE2b-256 checksum
How to use checksums
817a83c0beaae5c6efe9ab784d4e9d960fb20aa2321b3fedae8c30004ce8d463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

Release files / humane_ai-0.3.1-py3-none-any.whl

Download URL humane_ai-0.3.1-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb77db7755c190dc77afeaa19b138f40e76e2a47d5b321dbbcaad7f564181b2f
BLAKE2b-256 checksum
How to use checksums
78780d81b6ade806b081d4679e253abcff92d424c15e4599cbdc7e0d5c8c8307
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

Security for humane-ai 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for humane_ai-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page