Skip to Main Content

TeamAlma

Built at Built with Opus 4.7: a Claude Code hackathon · Apr 21, 2026 · Remote

TeamAlma — Demo video

6:30am, Lima. María, 23, is awake before the rest of the world — alone, after another hard day she didn't tell anyone about. Her phone buzzes once on the nightstand. The teal glow of the screen lights the wall. "Did you eat breakfast yet? ☀️" That's Alma. She wasn't asked. She wasn't summoned. She noticed. This is the entire idea behind Alma — a proactive AI emotional companion for people living with depression and loneliness in Latin America. The radical bet: most people who need help never reach out, so the AI has to come to them. ──────────────── WHAT ALMA DOES ──────────────── • Sends unprompted check-ins at 08:30, 13:30, and 19:30 Lima time via Telegram (APScheduler running inside the agent process — no separate scheduler service) • Remembers everything across conversations: a comment from 3 days ago can shape today's response (FastMCP server, SQLite + fastembed semantic embeddings) • Routes intelligently between two Claude models: claude-haiku-4-5 for everyday turns, claude-opus-4-7 the moment a deterministic crisis scorer flags distress (>0.7) • Receives images through Telegram and responds to them with full multimodal context — a photo of an empty plate captioned "finally ate" gets a response that sees both • Available simultaneously on Telegram and web chat (nginx → FastAPI), unified user identity ──────────────── SAFETY BY DESIGN ──────────────── Crisis detection is deterministic by choice. A keyword-based scorer (0–1) — not an LLM — gates every proactive message. Score > 0.6: proactivity suppressed. Score > 0.7: escalate to Opus 4.7. The safety layer cannot hallucinate. This is an architectural principle: deterministic safety, LLM response quality. Two separate concerns, two separate systems. ──────────────── MEMORY ARCHITECTURE ──────────────── A dedicated FastMCP server exposes 5 tools to Alma's chain: get_memory_tool, search_memories_tool, upsert_memory_tool, build_context_tool, evaluate_crisis_risk_tool. The crisis tool is dual-purpose — used by the conversation chain in real time AND by the APScheduler before each proactive send. Same logic, two contexts, never out of sync. ──────────────── TECHNICAL SHAPE ──────────────── 8 GitHub repositories, 5 Docker services, full Docker Compose orchestration: • claude-hackathon-agent — FastAPI + AlmaChain (LangChain) + APScheduler • claude-hackathon-mcp — FastMCP memory server • claude-hackathon-telegram — bot polling, stores chat_id in Redis for proactivity delivery • claude-hackathon-web — HTML/JS + nginx reverse proxy • claude-hackathon-infra — Docker Compose orchestrator Redis manages shared state across services: alma:proactive:crisis_score:{uid}, alma:proactive:last:{uid}, alma:proactive:slot:{uid}:{date}:{slot}. ──────────────── WHY THIS MATTERS ──────────────── 1.6 psychiatrists per 100,000 people. That's the number for Latin America. The number that matters most is invisible: the people who would benefit from mental health support but will never seek it. They don't show up in any statistic because they don't exist in any system. Alma exists for them. Every existing mental health tool — every chatbot, every meditation app, every therapy platform — assumes the user takes the first step. That assumption is the gap. People in acute depression do not take first steps. The act of opening an app and asking for help requires energy that depression specifically takes away. So Alma takes the first step instead. For someone alone at 6:30am in Lima who hasn't told anyone they're struggling, Alma sends: "Did you eat breakfast yet? ☀️" A small thing. But it means: I see you. You are not invisible. Someone reached out before you had to. ──────────────── WHAT MAKES THIS REAL ──────────────── That message takes 0.4 seconds to deliver. The architecture behind it took 12 specialized Claude Code agents, 2 rounds of design debate, 8 GitHub repositories, deterministic crisis gating, dual-model routing between haiku-4-5 and opus-4-7, persistent semantic memory across SQLite + fastembed, and a $200 personal commitment to keep Opus 4.7 in the loop exactly where it matters most. Mental health support that scales without diluting the response cannot be built with shortcuts. It has to be wrestled with. I wrestled with it. Alma is the result. This is not a prototype. It is deployed, proactive, listening, and reaching out — right now, three times a day, to anyone who connects via Telegram or web. The ratio of psychiatrists per 100,000 doesn't change overnight. But the number of people who hear from someone at 6:30am can. That's the bet.

Team