Skip to main content

Guided Exercises

OpenCouch includes 12 structured exercises spanning 6 therapeutic subtypes. Each exercise is a multi-turn state machine: the node owns the step transitions, the LLM generates response prose, and deterministic fallbacks keep exercises running even without an LLM.

How it works

  1. Dispatcher routes to guided_exercise when the user explicitly asks for a structured technique
  2. Keyword selector picks the exercise based on the user's message (e.g., "breathing" → box breathing, "stuck" → tiny action). Defaults to 5-4-3-2-1 grounding when no keyword matches
  3. Step-state classifier (regex, not LLM) evaluates each user response as complete / hold / stuck / exit
  4. Node advances or holds based on the classifier — the LLM never decides state transitions
  5. Exercise clears on natural completion or user-initiated exit

Completion modes

Steps use one of two modes for detecting completion:

ModeHow it worksUsed for
Item countCounts listed items (commas, "and"). Advances when count ≥ min_count_for_completionSensory listing, naming thoughts, identifying actions
User confirmationMatches bare confirmations ("ok", "done", "yes", "I did it")Breathing actions, visualization, body exercises

Priority ordering

The classifier checks patterns in this order — safety first:

  1. EXIT — "stop", "quit", "can we just talk" → exit immediately
  2. STUCK — "I can't", "this is stupid" → offer a simpler version
  3. COMPLETE — item count or confirmation met → advance or finish
  4. HOLD — everything else → encourage, don't advance

Exercise catalog

Click any exercise to see its steps and trigger keywords. Use the filter tabs to browse by subtype. To see exercises in context as multi-turn conversations, see Scenarios.

Grounding5 stepsItem count

5-4-3-2-1 Grounding

Sensory anchoring exercise. The user identifies items across five senses to return to the present moment. Steps are independent — order matters less than engagement.

Grounding4 stepsUser confirmation

Box Breathing

Structured 4-phase breathing cycle targeting somatic regulation. Each step is a single breathing action confirmed by the user. Complements 5-4-3-2-1 (sensory) with a respiratory channel.

Grounding / DBT4 stepsMixed

STOP Technique

DBT-informed distress tolerance skill. Each letter is a discrete step. S-T steps use confirmation mode (somatic); O-P steps use item count (cognitive).

Grounding (Somatic)5 stepsUser confirmation

Progressive Muscle Relaxation

Body-focused relaxation: tense and release 5 muscle groups. Each step is a simple "tense, hold, release, notice." Complements breathing (respiratory) and 5-4-3-2-1 (sensory) with a muscular channel.

Thought Work (CBT)4 stepsItem count

Simple Thought Record

Simplified 4-step CBT thought record. Sequential — each step depends on the prior. Exit is the only valid off-ramp. The user discovers the reframe rather than being told what the "correct" thought is.

Thought Work (CBT)4 stepsItem count

Behavioral Experiment

Tests beliefs in the real world. The thought record examines evidence in the mind; this tests it in reality. Step 3→4 may span hours (the user does something IRL between turns).

Behavioral Activation4 stepsItem count

Tiny Action Experiment

One small action framed as an experiment, not a commitment. Targets avoidance and low activation. The ask is intentionally tiny — "just to see what happens."

Acceptance / ACT5 stepsMixed

Leaves on a Stream

ACT defusion exercise. The user names a sticky thought, places it on an imagined leaf, watches it float, notices what remains, then identifies a values-aligned step. The exercise is about acting alongside the thought, not removing it.

Acceptance / ACT4 stepsItem count

Values Compass

ACT values clarification. Counterpart to defusion — Leaves on a Stream helps with letting go; Values Compass helps with moving toward. Together they cover the full ACT arc.

Self-Compassion3 stepsMixed

Self-Compassion Break

Kristin Neff's 3-component model. Very short by design — self-compassion exercises lose power when long. The user chooses their own kind words rather than following a script.

Emotion Regulation (DBT)4 stepsMixed

IMPROVE the Moment

Core DBT distress tolerance skill. Uses 4 of the 7 IMPROVE letters: Imagery, Meaning, One thing, Encouragement. For users in acute overwhelm who need help tolerating the current moment.

Emotion Regulation3 stepsItem count

Gratitude Inventory

Short positive-psychology exercise for building positive affect. Best for neutral-to-low-mood states or session closers. Not appropriate during acute distress.

Adding a new exercise

Define steps in guided_exercise.py, register in _EXERCISE_REGISTRY, add trigger keywords to _EXERCISE_SELECTORS, and add LLM guidance to knowledge/response_modes/guided_exercise.md. No dispatcher or graph changes needed. See Agent Graph for the full architecture.