Stress Model¶
Identity OS uses a 4-level stress model that automatically tightens behavioral constraints when your agent encounters problems.
The 4 Stress Levels¶
| Level | Color | What Happens |
|---|---|---|
| LOW | Green | Normal operations. All actions allowed, full behavioral freedom. |
| MED | Yellow | Caution. Conservative actions preferred, learning rate decreases. |
| HIGH | Red | Critical. Action vocabulary severely restricted. Only safe actions allowed. |
| OVER | Black | Shutdown. System enters deferred decision mode. Minimal actions only. |
What Triggers Stress¶
Stress rises automatically based on observable signals from your agent's environment. You don't need to calculate or send stress manually — the engine detects it from the pattern of observations you send.
What Changes Under Stress¶
As stress rises, the ExecutionContract becomes more restrictive:
- Allowed actions narrow — risky actions are removed
- Decision style shifts — slower tempo, lower risk tolerance
- Energy depletes faster — stress increases per-cycle cost
- Recovery profile activates — the contract signals what the agent needs to recover
Sending Stress Signals¶
You can also explicitly signal stress:
result = client.engine.process(
instance_id=instance.id,
mode_target=Mode.STRESS_RESPONSE,
signal_strength=0.9 # High stress signal
)
# Contract will reflect tightened constraints
print(result.contract.current_stress_level) # "HIGH" or "OVER"
print(result.contract.allowed_actions) # Restricted set
Recovery¶
When stress signals stop, the system gradually recovers:
- Stress level decreases over subsequent calm cycles
- Action vocabulary expands back
- Energy begins recovering
- Decision style returns to normal
The recovery is gradual, not instant — preventing oscillation between states.