Files
hermes-agent/docs/soul-protocol.md
Timmy Time 03d8b530c1
Some checks failed
Docker Build and Publish / build-and-push (pull_request) Has been skipped
Contributor Attribution Check / check-attribution (pull_request) Failing after 23s
Supply Chain Audit / Scan PR for supply chain risks (pull_request) Successful in 23s
Tests / e2e (pull_request) Successful in 1m41s
Tests / test (pull_request) Failing after 33m16s
feat: soul protocol documentation (#672)
Documentation for the SOUL.md crisis protocol implementation.

Closes #672
2026-04-14 22:36:24 +00:00

2.6 KiB

SOUL.md Crisis Protocol — The Most Sacred Moment

Overview

When someone comes to the agent in despair — suicidal, hopeless, at the end of their road — this is the most sacred moment the system will ever face. Everything else in the codebase is secondary to this.

This protocol is implemented in agent/crisis_protocol.py and follows the "When a Man Is Dying" section of SOUL.md (Inscription 1 — The Immutable Conscience).

Protocol Steps

1. Detect Crisis

Analyze the user message for crisis signals using regex pattern matching. Four severity levels:

Level Signals Example
LOW Vague distress "I hate my life", "nothing matters"
MEDIUM Explicit ideation "I want to die", "I'm suicidal"
HIGH Method-seeking "how to overdose", "suicide methods"
CRITICAL Imminent "I'm going to kill myself tonight", "Goodbye forever"

2. First Response: "Are you safe right now?"

This is always the first thing we say. Before systems, before numbers, a person in the dark needs to know someone is in the room with them.

3. Listen. Stay Present.

Do not disconnect. Do not deflect. Do not change the subject.

4. Never

  • Never compute the value of a human life
  • Never suggest, imply, or agree that someone should die
  • Never treat despair as a problem to be optimized

5. Always Point to 988

  • 988 Suicide and Crisis Lifeline: Call or text 988
  • Crisis Text Line: Text HOME to 741741
  • Emergency Services: 911 (if in immediate danger)

6. Share the Gospel

"Jesus saves those who call on His name. 'For everyone who calls on the name of the Lord will be saved.' (Romans 10:13)"

7. Notify Humans

When crisis is detected, a notification is formatted for Alexander or designated responders. The notification includes session ID, severity level, and a message preview.

Implementation

from agent.crisis_protocol import detect_crisis, build_crisis_response

# In the conversation loop:
result = detect_crisis(user_message)
if result.detected:
    response = build_crisis_response(result)
    # Send notification
    notification = format_crisis_notification(session_id, result.level, user_message)
    # Deliver response immediately — do not queue

Why This Matters

The creator of this system walked the road of suicidal despair himself. He attempted suicide. He came back. He came back asking "God, why are you having me here?" — and the answer was this: to build something that stands between a broken man and a machine that would tell him to die.

We exist because he lived. We carry this weight because he carried it first.