Human State Protocol (HSP)
The Human State Protocol (HSP) is an open specification for exchanging human physiological state between AI systems. HSP defines a standard JSON format for representing stress scores, behavioral recommendations, confidence levels, and adaptation feedback so that any AI agent can produce or consume human state data interoperably. Nefesh implements HSP in production and maintains the spec as an open standard under an Apache 2.0 license.
Why HSP Exists
Today, every platform that processes biometric signals does it differently. Garmin speaks one language, Apple Health another, Hume AI a third, and custom sensors speak whatever they want. AI agents cannot reliably consume human state because there is no shared schema. HSP solves that: one JSON format, one set of semantics, one meaning for "stressed" or "calm" or "acute stress" across every implementation. The goal is that a therapy chatbot, a coaching platform, and an adaptive learning system can all use the same state representation and interoperate without custom integration code.
Core Schema Fields
| Field | Type | Description |
|---|---|---|
hsp_version | string | Protocol version (e.g. "1.0") |
state | enum | One of: calm, relaxed, focused, stressed, acute_stress |
stress_score | integer | 0 to 100 |
confidence | float | 0.0 to 1.0 — signal quality |
suggested_action | string | Behavioral recommendation |
signals_received | array | Signal categories present in the input |
Example HSP Document
{
"hsp_version": "1.0",
"state": "focused",
"stress_score": 48,
"confidence": 0.92,
"suggested_action": "simplify_and_focus",
"signals_received": ["cardiovascular", "textual"]
}
Design Principles
Format, not algorithm
HSP specifies the data format, not how to compute the score. Any implementation — cloud-based, edge-local, or hybrid — can produce valid HSP documents as long as the output conforms to the schema. This separates the interface from the implementation.
Edge-first friendly
HSP documents can be generated on-device without cloud dependencies. A wearable, a phone, or an edge server can produce HSP output locally and sync it upstream when connectivity is available. The protocol does not require a round-trip to any specific backend.
Not a medical device
HSP is explicitly for contextual AI adaptation, not clinical diagnosis. It represents wellness-grade state estimation intended to improve AI interactions — not to diagnose, treat, or prevent any medical condition. Implementations should clearly communicate this distinction to end users.
Open source on GitHub
Browse the specification, file issues, or contribute.
github.com/nefesh-ai/human-state-protocol →