All projects

AI

AI Health Coach

A personal multi-agent health coach that plans training and meals each week and checks in through messaging throughout the day.

AI

Overview

AI Health Coach is a personal coaching agent that works through messaging rather than a dedicated app. An orchestrator agent coordinates two specialist sub-agents, a personal trainer and a nutritionist, which share context so workouts and meals are planned together rather than in isolation. Each week starts with a planning session, followed by scheduled morning, midday and dinner check-ins and an evening recap. The recap feeds back into the plan, so the coach adapts to what actually happened that day instead of repeating a fixed program. Meal planning is designed for the whole family, not just one person. The backend is a NestJS API with a PostgreSQL database managed through Prisma, using the SubQ long-context model through its OpenAI-compatible API with tool calling. Daily jobs run on a scheduled cron, and a web search tool, scoped to the nutritionist, lets the coach look up recipes and food information while keeping token and API costs low.

What I learned

  1. 01

    Designing a multi-agent system with an orchestrator and specialist sub-agents sharing context

  2. 02

    Building scheduled, proactive AI interactions with cron jobs instead of only responding to requests

  3. 03

    Implementing custom tools for an LLM, including a web search tool with trimmed and cached results

  4. 04

    Managing LLM token and API costs by limiting tool access to the agents that need it

  5. 05

    Deploying a NestJS and Prisma backend to serverless hosting, handling connection pooling and time zones