Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Anima — Academic Stress & Burnout Companion

Anima — Devpost Submission


Inspiration

A teammate's PhD friend had been silently spiraling for months — skipping advisor meetings, sleeping four hours a night, convinced her research was worthless. She never asked for help. Not because she didn't want it, but because she didn't recognize what was happening to her had a name: burnout.

That story hit hard. We looked at the data and it confirmed what we feared — over 36% of PhD students have sought help for anxiety or depression, university counseling waitlists run 3–6 weeks, and generic wellness apps have zero understanding of what it means to fight with your advisor, fail a qualifying exam, or watch your funding dry up.

The insight that drove everything: academic mental health doesn't break all at once — it erodes slowly, across weeks, in patterns that are invisible unless someone is watching. We wanted to build that someone.


What it does

Anima is a multi-agent AI companion that detects burnout patterns in academics — undergrads, PhD students, and professors — and connects them to the right support before things reach a crisis point.

  • Daily check-ins — a 60-second mood and stressor snapshot via chat
  • Pattern detection — tracks signals across sessions, not just the current conversation
  • Explainable routing — a knowledge graph maps stressors to specific campus resources and shows why a suggestion is being made ("3 of your last 5 check-ins flagged sleep disruption + advisor tension")
  • Safe escalation — a hard-coded Safety Guard always surfaces 988 the moment crisis signals appear, before any other agent runs
  • Role-aware responses — the system adapts its tone and resources based on whether you're a burned-out first-year undergrad or a professor drowning in grant deadlines

How we built it

We built Anima on four layers working together:

Claude (claude-sonnet-4-6) powers the Companion and Resource Navigator agents — handling empathetic conversation, signal extraction, and resource recommendations with strict system prompt constraints (validate first, never diagnose, warm escalation only).

LangGraph orchestrates a deterministic state machine: Safety Guard → Triage → Companion / Resource Navigator → Memory update. The execution order is fixed — no agent can skip the safety check.

A Karpathy-style Knowledge Graph (NetworkX + JSON seed) stores stressors, behavioral signals, risk patterns, and campus resources as typed nodes with typed edges (TRIGGERS, INDICATES, ESCALATES_TO). When a user describes their situation, the graph traversal returns not just a resource but the reasoning path — making the system transparent.

Session Memory compresses the last 5 check-ins into a structured context block injected into every Claude call, giving the stateless LLM the cross-session awareness it needs to detect patterns over time.

The stack: Streamlit UI · FastAPI backend · LangGraph orchestration · A2A agent cards · sentence-transformers for local embeddings.


Challenges we ran into

Defining the crisis threshold without over-triggering. Too sensitive and the system cries wolf, eroding trust. Not sensitive enough and we miss someone who genuinely needs help. We landed on a hybrid: hard keywords always escalate, while softer signals are weighted by recency and frequency across sessions before triggering.

Keeping Claude from over-pathologizing. Without careful constraints, the LLM would escalate tone on mild signals — treating every tired student like they were in crisis. It made the experience feel alarmist. We solved it with explicit negative instructions in the system prompt and extensive prompt testing.

Stateless LLMs in a pattern-detection product. Claude has no memory between API calls, but pattern detection is our core value. We built a session memory module that compresses signal history into a structured summary injected at every turn — giving Claude temporal awareness without bloating the context window.

Building a knowledge graph in 48 hours that still feels credible. A production graph would need clinical validation and university partnerships. Our compromise: seed it carefully from published academic mental health literature (Evans et al., Levecque et al., U-DOC review) and design the schema to be pluggable — so real institutions can add their own nodes without changing the traversal logic.


Accomplishments that we're proud of

  • A safety-first architecture where crisis detection is a hard gate, not a feature toggle — no prompt injection or agent failure can bypass it
  • Explainability by design — users see the graph path behind every suggestion, which makes the system feel trustworthy rather than like a black box
  • Role-aware personalization that meaningfully differentiates the experience for an undergrad vs. a professor — not just a label swap but different stressors, different signals, different resources
  • A clean A2A agent card implementation with well-defined input/output contracts across all three agents
  • An end-to-end working demo — from check-in to burnout detection to resource suggestion — in under 10 seconds

What we learned

Safety design is a constraint, not a feature. We originally built the Safety Guard as one parallel agent among equals. We quickly learned that in mental health applications, safety must be a hard gate that runs before everything else — every time, with no exceptions.

Explainability builds trust more than accuracy does. A technically correct recommendation that users can't understand or verify feels unsafe. The knowledge graph path wasn't just a demo flourish — it was what made testers feel the system was on their side.

The A2A protocol forces good architecture. Writing agent cards before writing agent code forced us to define contracts upfront and caught several design problems early.

Context collapses fast in long conversations. Managing what Claude "knows" about a user's history required more engineering care than we expected — summarization strategy, recency weighting, and signal deduplication all matter.


What's next for Anima

The prototype works. The harder problem is making it something universities would actually deploy.

  • IRB-approved pilot at a research university with opt-in longitudinal tracking
  • Clinician-validated knowledge graph built with university counseling staff as domain experts
  • Persistent memory backed by encrypted Redis — so patterns survive across weeks, not just a single session
  • Lower-friction check-ins — voice, emoji, or a 10-second Likert scale on days when typing feels like too much
  • Aggregate institutional dashboard (privacy-preserving, no individual data) so counseling centers can see which departments are trending toward burnout before the waitlist explodes

The math is simple: if Anima helps even a fraction of the PhD students who silently consider dropping out get the right support at the right time — the downstream impact on their careers, their research, and their lives is enormous. That's worth building.

Built With

  • a2a-sdk
  • claude-api-(claude-sonnet-4-6)
  • fastapi
  • langgraph
  • neo4j-(prod)
  • networkx
  • python
  • redis
  • sentence-transformers
  • streamlit
Share this project:

Updates