whatisgithub

What is psycho?

pixelpapillon/psycho — explained in plain English

Analysis updated 2026-05-18

11PythonAudience · developerComplexity · 5/5Setup · hard

In one sentence

A FastAPI backend for a campus mental health chatbot that streams answers, detects risky messages, and alerts staff through email and Excel logs.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Deploy a chat assistant for students that routes conversations to counseling support when needed.

USE CASE 2

Detect high-risk messages automatically and alert counselors by email.

USE CASE 3

Search a mental health knowledge base using combined vector and keyword retrieval.

USE CASE 4

Run a locally fine-tuned language model instead of relying on a cloud AI provider.

What is it built with?

PythonFastAPILangGraphMySQLRedisChromaOllama

How does it compare?

pixelpapillon/psycho2arons/llm-cliabe238/claude-video-plus
Stars111111
LanguagePythonPythonPython
Setup difficultyhardeasyeasy
Complexity5/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Needs MySQL, Redis, and either an OpenAI API key or a local Ollama model to run fully.

So what is it?

Psycho Python is a backend system for a campus mental health support chatbot, built with FastAPI. Students log in and chat with the system, and their messages stream back word by word rather than appearing all at once. Students and administrators are kept separate through basic login roles, and administrators get access to reports that students never see. Behind the scenes, each message passes through a set of specialized agents built with LangGraph, a framework for coordinating multiple AI steps. A supervisor first decides whether the message is ordinary conversation, a request for counseling, or a sign of risk, and only counseling or risk cases trigger a search through a knowledge base. That search combines a vector database called Chroma with a keyword-based search method, then reranks the combined results locally. If LangGraph, Chroma, or the OpenAI embedding service is unavailable, the system automatically falls back to simpler keyword search so a demo does not break. Messages flagged as high risk are checked against a dictionary of risk terms as well as evaluated by the language model itself. When risk is confirmed, the system writes a report recording emotional tags, a risk score, and a summary, saves it to a MySQL database, and can send an email alert and log the case to an Excel file, all handled through background jobs so the student's chat is not delayed. Short-term conversation memory is kept in Redis so recent context does not need to be reloaded from the database every time. The project can run against a local, fine-tuned language model served through Ollama, or against any OpenAI-compatible API, and it ships with Docker Compose configuration to start MySQL, Redis, and the application together. It also includes scripts for evaluating the retrieval system using standard measures such as Recall, Precision, and NDCG. The README is written primarily in Chinese and documents extensive environment variables for configuring the knowledge base, database connections, and alerting behavior.

Copy-paste prompts

Prompt 1
Walk me through how the LangGraph agent loop in psycho routes a student message between agents.
Prompt 2
Help me configure the .env file for MySQL, Redis, and OpenAI embeddings in this project.
Prompt 3
Explain how the risk detection and email alert pipeline works in psycho.
Prompt 4
Show me how to set up Docker Compose to run psycho locally.

Frequently asked questions

What is psycho?

A FastAPI backend for a campus mental health chatbot that streams answers, detects risky messages, and alerts staff through email and Excel logs.

What language is psycho written in?

Mainly Python. The stack also includes Python, FastAPI, LangGraph.

How hard is psycho to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is psycho for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.