Skip to main content

Psyche

Psyche is an LLM-based psychiatrist agent driven by a structured system prompt, designed for intake-style clinical interviews.

Overview

PropertyValue
Keypsyche
TypeLLM-based
FocusStructured intake-style interview

How It Works

  1. Prompt Loading: Loads a system prompt from data/prompts/therapist/psyche.yaml.
  2. Session Init: Initializes the conversation with that system prompt.
  3. Response Generation: Each generate_response() call appends the client message and asks the model for the next reply.

Usage

CLI

uv run python -m examples.simulate therapist=psyche

Python

from patienthub.therapists import get_therapist

therapist = get_therapist(agent_name="psyche", lang='en')

response = therapist.generate_response("I've been struggling with sleep and low mood.")
print(response.content)

Configuration

ParameterTypeDefaultDescription
agent_namestring"psyche"Therapist identifier
prompt_pathstringdata/prompts/therapist/psyche.yamlPath to prompt file
model_typestring"OPENAI"Model provider key
model_namestring"gpt-4o"Model identifier
temperaturefloat0.7Sampling temperature
max_tokensint8192Max response tokens
max_retriesint3API retry attempts
langstring"en"Language key for prompt loading

Use Cases

  • Intake-style interview simulations (psychiatrist role)
  • Prompt-driven therapist baseline
  • Evaluating client agents in a clinical assessment context