thetahealth/ironm
Sobre
The AI fitness coach that sees all your data: training, food and sleep. Camera form check, workout plans built for you, and every change asks you first. Open source, powered by Mirobody. 看得到你全部数据的 AI 健身教练:练、吃、睡一起看,一起安排。
IA e aprendizado de máquinaCrescimento medido de estrelas
- em 24 h
- +24
- em 7 dias
- +235
- em 15 dias
- +235
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
IronM
The AI fitness coach that sees all your data
You slept 5 hours, your knee has an old injury, and you only packed one pair of dumbbells for the trip. It knows, and tells you how to train and how much to eat today.
Open source · Use it online or run it yourself · Uses your own LLM
🧪 Evaluated with mirobody-env, which builds environments to test the agent thoroughly
👉 Try it now: https://ironm.mirobody.ai (no install, works in a phone browser)
English · 简体中文
Features · Screenshots · Try it · FAQ

- 📷 It watches you train through your camera: the moment a squat rep is too shallow, it tells you out loud
- 🧠 A plan that's only yours: it remembers your injuries, equipment, sleep and every set you've done, and works out the weight for your next one
- ✋ Every change asks you first: plan tweaks and calorie changes are suggestions; nothing takes effect until you confirm, and you can always undo
- 🔓 Open source and free: bring your own LLM, and keep all your data on your own machine if you like
Note: the app itself is in Chinese for now: the interface, the coach's replies and the built-in content. This README and the code are in English and Chinese.
😴 I only slept 5 hours last night. Should I still train today?
🐧 IronM: Train today, but at about 70%. Don't push through. You slept 5 hours last night, and your last 3 nights average 6.5 hours, 2.2 hours less than your usual 7.2. Your resting heart rate is 62 bpm, the same as usual, so there's no need to skip. Just take it easier.
To answer that, it used your last few nights of sleep, how long you usually sleep, your resting heart rate, and which workout is on today's plan. A training app can't see your sleep, your watch doesn't know what you're training today, and a general-purpose AI needs you to explain everything from scratch every time. IronM sees all three, and after answering it also scales today's workout down to 70%.
🤔 How IronM came about
Training well takes more than training. Slept badly? Train lighter today. Trained hard? Your protein needs to keep up. Weight not moving on a cut? First look at how much you've trained and eaten over the past few weeks, rather than just eating even less.
But the data is scattered. The training app counts sets, the diet app counts calories, the watch tracks sleep, and your lab reports sit in your photo album. Each tool only sees its own slice. Ask an AI coach and it doesn't know you slept 5 hours last night, so all it can give you is advice that would fit anyone.
Mirobody brought the data together first. Mirobody is an open-source, self-hosted AI health data engine: lab reports, Apple Health and wearable data become one standardized health record, with every number traced to its source and readable by AI.
So we built IronM on it. A fitness coach that sees your training, food, sleep, heart rate and lab results, and remembers your injuries, equipment and schedule. Building a plan, adjusting today's load, setting next session's weights, changing calories: it looks at everything before deciding. Every change shows up first as a preview card. Nothing takes effect until you tap confirm, and you can undo it.
😴 Same bad night's sleep: what it does differently
| With a single-purpose app | With IronM | |
|---|---|---|
| 😴 Bad night's sleep | The training app pushes the plan as usual; the watch just says you slept less | Compares sleep and resting heart rate with your usual, then decides: train as planned, lighter, or rest |
| 🤒 Cold or fever | Check-in reminders keep coming | No training that day; once you're better, a week at about 70% before going back to your old weights |
| ⚖️ A week on a cut, weight hasn't moved | The diet app tells you to eat less | Looks at your 30-day weight trend and what you've trained and eaten; usually leaves calories alone and protects your strength training |
| 💪 Want to build muscle | Training and diet set their own goals | Training plan, calories, protein and diet portions all follow the same muscle-gain goal |
| 🧳 Business trip, one pair of dumbbells | The plan doesn't work, so you rebuild it when you're back | Swaps to a dumbbell version for those days, remembers your knee injury, and switches back automatically when the trip ends |
| 📅 Weekly review | Charts from three apps, viewed separately | Sessions, food, weight, sleep and heart rate side by side, then suggestions on whether to change the plan or calories |
💬 Ask it something, and here's the reply
Real conversations from a two-week simulation test. The model is DeepSeek and the user data is simulated. The replies were in Chinese and are translated here; the content is unchanged.
⚖️ I've trained for a week and my weight hasn't moved at all. Should I eat less?
🐧 IronM: No need to eat less. A single week won't show it, and your weight has been basically flat for 30 days, so leave calories alone for now. Over the last 30 days your first week averaged 66.0 kg and your last week 65.9 kg, a change within normal daily fluctuation. A single weigh-in is affected by water and glycogen, and swings of about 0.35% (about 0.3 kg) within a week are normal.
- Weigh yourself every morning on an empty stomach after the bathroom, for two weeks straight, and look at the weekly average rather than single days
- Do your three strength sessions this week as planned, with 105–132 g of protein a day and 20–25 g per meal, eating 1348 kcal
- If the weekly average still hasn't dropped after two weeks, then talk about cutting calories: change one thing at a time, and keep the deficit under about 500 kcal a day
🧳 I'm travelling Monday to Wednesday next week. The hotel gym only has one pair of dumbbells, 20 kg max.
🐧 IronM: You can train. For those three days, swap the machine exercises on Monday and Wednesday for dumbbell versions. I've created a preview of the temporary change, and it takes effect once you confirm. Your Monday and Wednesday box squats, cable rows, Romanian deadlifts and lat pulldowns all need machines, and the hotel only has dumbbells. You have a knee injury, so control the depth on squats and use light weights: stop when your thighs are about parallel, and stop if your knee hurts.
- Monday: dumbbell goblet squat (controlled depth, light weight, stop at about parallel, stop if your knee hurts), dumbbell bench press, one-arm dumbbell row, glute bridge, dead bug; sets and reps as planned
- Wednesday: dumbbell Romanian deadlift, dumbbell bent-over row, dumbbell shoulder press, goblet squat (same knee cautions), plank; sets and reps as planned
- Dumbbells go up to 20 kg: pick a weight that leaves 2–3 reps in the tank, squat a bit shallower, and stop if your left knee hurts
Back at your gym on Thursday, train as planned, starting from last session's weights.
Below is the preview of the temporary change. Tap "Confirm" to apply it. It switches back to your normal plan automatically on the end date, and you can also undo it early.
(A preview card for the temporary change follows the reply. It only takes effect once you confirm.)
✨ What it can do for you
🏋️ Training
- 📷 AI form check with your camera: 71 exercises, automatic rep counting, cues mid-rep; the video never leaves your phone
- 🎬 Train along with creators: upload a video where a fitness creator explains their workout and get a plan straight away: first the creator's original (each exercise tagged with the second it's mentioned and the exact words), then a copy IronM adapts to your equipment, injuries and time
- 📋 AI workout planner: built step by step from your level, goal, days, equipment, injuries and any health conditions found in your checkups, with the reason for each step; or pick one of 24 ready-made training plans by name
- 🎥 Workout video analysis: upload a clip of yourself training; it finds each rep's problems and the second they happen, and IronM tells you how to fix them. The video isn't uploaded
- 🌅 A daily check: decides how you train today from your sleep, heart rate and what you've told it
- 🧳 Temporary changes: travel, illness or a deload week, with start and end dates; your normal plan comes back automatically
- ⏱️ Workout logger: log set by set, tap a number to fill it in, rest timer between sets, a share card when you finish
- 📈 Weights and next-session targets: every exercise in your plan shows the weight to use this time. Ones you've done are worked out from your log, with each set from last time; new ones get a conservative starting weight from your sex, body weight, age and training level. After each session it sets next time's targets from your log
- 🏃 Cardio by calories: want to burn an extra N kcal a week? It works out from your body weight how long to walk, jog or cycle, and puts it in your plan
- 📖 Exercise library: 220 exercises browsed by body part, about half with images and animations, all with alternatives; 34 kinds of equipment browsed by what they train, recognised from a photo
🥗 Food
- 📸 Log a meal with a photo or a sentence: snap a photo or say "had a bowl of beef noodles for lunch", and log the same meal more than once if you ate twice. Calories come from the food database, not from a model's guess
- 👆 Tap a suggestion to use it: when IronM suggests a few meals, each has a "log this" button that logs exactly what was suggested, calories included; suggested exercise swaps have a "swap to this" button
- 🍱 Diet plan library: 16 full-day diet plans you can apply in one tap. Portions scale to your calorie target automatically, and you can undo
- 🧮 Built around you: say "I mostly eat takeout and don't eat pork", and IronM picks four meals a day from the recipes while the system sets the portions. Daily calories land within 8% of your target, protein is covered, and nothing you avoid is included. Nothing changes until you confirm
- 🎯 Follows your goal: switch from fat loss to muscle gain and IronM checks whether your diet plan still fits the new goal; if not, it offers a card to switch plans
- 🥚 Foods and recipes: 159 foods, 81 recipes (home cooking, packed lunches, takeout and canteen, vegetarian, weight gain), 12 common takeout and canteen meals; each shows how much of its calories come from protein, carbs and fat, so you can see at a glance whether it's high-protein
- 🍔 Chain restaurant menus: every regular McDonald's item with the nutrition data from its official site; search and log it directly instead of letting a model guess
- ✏️ Your own entries: your own foods (copied from the label), exercises and plans, each with an optional photo; usable for logging meals, workouts and planning
- 🔥 Calorie target: based on your basal metabolic rate. IronM suggests changes from your records and nothing changes until you confirm, with hard limits in code: never below your BMR, at most 300 kcal per change, at most 500 kcal in total
What's in the plan libraries
Training plans: beginner full body, upper/lower, push/pull/legs, bro split, dumbbells at home, kettlebell, bodyweight progressions, glutes and legs, big three, strength plus running, coming back after a break, hotel workouts, 60+…
Diet plans: balanced home cooking, high-protein fat loss, fat loss on takeout and canteen food, fat loss with packed lunches, muscle gain with home cooking, muscle gain with packed lunches, muscle gain on takeout and canteen food, maintenance, weight gain for skinny people, high-protein vegetarian, Mediterranean, DASH for blood pressure, blood sugar control, lacto-ovo vegetarian, high protein for 60+, time-restricted eating
❤️ Health data
- 🧪 Lab report reading: lab results and checkup reports read from a photo (via mirobody)
- 🩸 Checkups feed your training and diet: blood count, liver and kidney function, lipids, uric acid, blood sugar and more. It first works out what each result means for you, then applies it when planning workouts and meals, e.g. high uric acid steers away from high-purine food and sugary drinks; borderline results waiting for a retest only get a heads-up and don't change your plan
- ⌚ Watches and Apple Health: import your data; every metric is compared with your own usual
- 😴 Today's sleep and heart rate: see today's numbers on Home, tap for the last week or month, and log them yourself if nothing synced
🧩 Also
- 🔔 Messages: in the bell at the top, IronM tells you what it changed and why, like a chat. Reply "OK" or "Not now" to suggestions waiting for you, undo changes that already took effect, open any message to see why it did that, and search by keyword or date
- 🎙️ Ask by voice: tap the mic next to the input box and speak; the text fills in and you can edit it before sending. Speech is transcribed on the server with a self-hosted model: free, and the recording is deleted right after
- 🏅 Badges: lightest week, squatting 1.5× your body weight, 8 weeks in a row… It only rewards what you've done and never nags
- 🧠 Long-term memory: remembers your injuries, equipment, schedule and preferences, plus what it suggested and what it promised to follow up on, even across conversations. If it gets something wrong, delete it under "Me"
- 🌦️ Weather: when you ask whether to train outdoors, what to wear or how much to drink, it checks the weather in your city first
- 📚 Sources: an evidence base of 125 entries: Chinese dietary guidelines, China's National Health Commission guidance, ACSM, ISSN, NEJM randomised trials… Ask why and it tells you the source
- 🛡️ Safety floor: emergencies, critical values, pregnancy, high blood pressure and injuries are handled by hard-coded rules
- 📦 Your data, your call: export everything or delete your account at any time
📱 What's on each page
Five tabs at the bottom: Home, IronM, Library, Records, Me. The mobile app in progress uses the same layout.
| Page | What's there |
|---|---|
| 🏠 Home | What to train today (with the weather), a body map lighting up the muscles today's workout hits, exercises with images in a swipeable row; whether it was adjusted, start a workout, quick check-in; today's food and body data side by side; a card for each day this week; leaderboard trends in the top bar |
| 🐧 IronM | Chat by typing or voice; preview cards for plan changes, meals and goal changes; weekly report; send photos and workout videos |
| 🔔 Messages | IronM explains what it changed and why, message by message; suggestions waiting for you at the bottom, answered with "OK" or "Not now"; open one to see why; search by keyword or date |
| 📖 Library | Exercises by body part; equipment by what it trains, or recognised from a photo; foods, recipes and chain menus each with a protein/carbs/fat bar; training plans showing how many sessions a week and the order they rotate (train along with creators at the top); diet plans with a day's four meals; your own entries at the bottom of each page |
| 📊 Records | How much you trained this week / this month / all time, one row per body part; a muscle map by week and by day; recent sessions and check-in photos; weekly report; body data trends; badge wall |
| 👤 Me | Profile and goal, equipment and place, city and weather, body data, things it remembers, data import, model settings, account and privacy |
| 📋 Training plan | The week as swipeable photo cards; for the chosen day, each exercise shows this time's weight and last time's sets, tap one for details or to swap it; reorder, ask IronM to change it, next-session targets |
| ⏱️ Workout | Set-by-set logging, rest timer, add a set, stopwatch; camera form check |
| 🍱 Food log | Today's calorie balance and how the target is calculated; log each meal as planned or what you actually ate; diet plan |
📸 Screenshots
![]() Home Today's workout, with the weight to use |
![]() Training plan The weight to use for every exercise |
![]() Workout logger Camera form check, tap a number to fill it in |
![]() Messages Suggestions take effect only when you confirm |
🚀 Quick start
🌐 Use it online (nothing to install)
- Open https://ironm.mirobody.ai on your phone or computer
- Sign up with your email (you'll get a verification code), then enter your height, date of birth and weight
- Under "Me → Model and API", enter your own LLM API key. DeepSeek, Qwen, Zhipu, Doubao, Kimi and OpenAI all work, as does anything with an OpenAI-compatible API; a few yuan of DeepSeek credit lasts a long time. Without a key you can still log workouts and meals and browse the libraries; you just can't ask IronM
- Tell it: "I want to start training, three times a week, at the gym."
This is a test deployment: it gets updated often and may have rough edges. Keep your own notes of anything you can't afford to lose. On a phone, use "Add to Home Screen" to open it like an app.
🖥️ Run it yourself (optional)
If you'd rather keep all your data on your own computer, run your own copy. You need a computer and an LLM API key.
🐳 With Docker (Windows, macOS, Linux)
git clone https://github.com/thetahealth/ironm.git iron-m && cd iron-m
docker compose up -d
💻 Without Docker (macOS, Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh # skip if you already have uv; reopen the terminal afterwards
git lfs install
git clone https://github.com/thetahealth/ironm.git iron-m && cd iron-m
scripts/start.sh
The first run takes ten-plus minutes to set up the environment and download images and the speech model; after that it starts in seconds. Then:
- Open http://127.0.0.1:18090/iron/, sign up, and enter your height, date of birth and weight
- Under "Me → Model and API", enter your key
- Tell it: "I want to start training, three times a week, at the gym."
For port conflicts, slow downloads in mainland China, updating and uninstalling, see deploy/self-host.md (in Chinese).
🧠 How it works under the hood
IronM is a single agent: one AI answers every question. Depending on the topic, it first loads the guide for that kind of question (building plans, exercise coaching, nutrition, whether to train today, pain and injuries, reading data, logging and reviews, onboarding; 8 in all, plus one for training along with creators), then looks things up in the plan libraries, exercise library, food database, evidence base and your data. It also works when you're not around: every day it assesses how you should train, after each workout it sets next session's targets, once a week it reviews your progress, and after each chat it sorts out what to remember.
The split is simple: judgement goes to the AI; numbers and safety limits go to code. Calories, BMR, macros and how far you are from your usual are all calculated in code. Emergencies, critical values, special groups, injuries and the calorie floor are guarded by code. If a number in the AI's answer doesn't match its source, the answer is sent back to be rewritten. If the AI fails, IronM doesn't quietly fall back to rules that decide for you; it tells you plainly that something went wrong and that you can try again.
The backend is Python 3.13 + FastAPI + PostgreSQL (pgvector), running as a plugin on mirobody (vendor/mirobody is version 1.5.8, unmodified). The web app is plain JavaScript and loads nothing from external sites.
❓ FAQ
💰 Does it cost anything? IronM is free. Model costs go through your own account; with DeepSeek, a question costs about one fen (well under one US cent), and turning a creator's video into plans costs a few fen. Speech and video transcription run on a self-hosted model on the server, and the camera form check and workout video analysis run on your own phone, so they cost nothing.
📱 Can I use it on my phone? Yes: open https://ironm.mirobody.ai in your phone's browser; the pages are designed for phone screens. A native app is in progress (the code is in app/; it hasn't been released yet).
🔒 Where is my data? On the online version, it's stored in the test server's database, with sensitive content encrypted. If you run it yourself, it stays in a database on your own computer. Either way, only your questions and the photos you take are sent to the model provider you configured, and the weather lookup only sends coordinates rounded to about 1 km. Voice and videos are transcribed on the server and deleted right after; a video's text is only used to make the plans and is deleted once you choose (after 7 days at most).
🩺 Can it replace a coach or doctor? No. Treat it as advice only. If you have a chronic condition, are pregnant or are injured, check with a doctor before you start. If you get chest pain, dizziness or shortness of breath while exercising, stop and get medical help right away.
🛠️ Development
git lfs install && git lfs pull # vendor/mirobody contains two git-lfs files
cp .env.example .env # fill it in, then chmod 600 .env
make setup # Python environment
make pg-install pg-init # local PostgreSQL 18 + pgvector (needs micromamba)
make run # http://127.0.0.1:18090
For evaluation we use mirobody-env, which builds environments to test the agent thoroughly.
🙏 Acknowledgements
The health data foundation comes from mirobody. Exercise images come from wger and Everkinetic (CC BY-SA), food photos from Unsplash and Pexels, and leaderboard images from Wikimedia Commons. Authors and licences are recorded in ironm_agent/*_images.yaml and credited in the app. Images aren't stored in the repository; they're downloaded from that list at install time. Nutrition data draws on USDA FoodData Central. Speech and video transcription uses SenseVoice-Small from Alibaba Tongyi Lab (FunASR model licence), run with sherpa-onnx; audio is extracted from videos with PyAV (bundling FFmpeg libraries).
🤝 Contributing
Issues are welcome: tell us what works well, what feels awkward, or what you'd like to see. Pull requests are welcome too. For bigger changes, please open an issue first to discuss the direction.
Before you start, read CONTRIBUTING.md: how to run it, what to check before a pull request, and how to change the data files. Security problems go to SECURITY.md, not a public issue.
⭐ Star history
📄 License
If IronM helps you, a ⭐ would mean a lot
Explore projetos relacionados
Carregando…