DEV Community

Ujjwal Tripathi
Ujjwal Tripathi

Posted on • Originally published at microcosmworks.com

How We Built Raeda AI: A Multi-Agent AI Fitness Coach

Most fitness apps bolt AI onto a static workout database and call it personalization. Raeda AI was built to do something genuinely harder: simulate a real coaching relationship, where workout plans, meal plans, and progress tracking all adapt together, the way an actual trainer-nutritionist team would work with a client.

This is the story of how MicrocosmWorks built Raeda AI, a comprehensive fitness and nutrition platform powered by a multi-agent AI coaching system, from architecture decisions to the infrastructure choices that made it possible to run AI inference at scale without blowing up costs or response times.

The Brief: Coaching, Not Just Tracking

The client's vision wasn't another step counter with a meal log bolted on. They wanted a platform where AI agents could actually behave like specialists: one that understands workout programming, one that understands nutrition science, and one that coordinates between the two so recommendations never contradict each other. On top of that, the platform needed real trainer-trainee management features, real-time chat, and cross-device sync across web, iOS, and Android.

That's a meaningfully different problem than "add a chatbot to a fitness app." It meant the AI layer wasn't a feature, it was the product.

Designing a Multi-Agent System, Not a Single Model

The core architectural decision was to split coaching intelligence into multiple specialized AI agents rather than relying on one general-purpose model to handle everything. We built a fitness coach agent responsible for designing workout plans based on a user's goals and physical capabilities, a nutrition agent that builds meal plans around dietary restrictions and macronutrient targets, and a wellness agent that sits above both, coordinating recommendations so the workout plan and the meal plan stay aligned with each other.

This mattered more than it might sound. A generic LLM prompt can generate a workout plan or a meal plan in isolation reasonably well. What it struggles with is keeping both consistent over time as a user's data changes, week after week. Separating these responsibilities into distinct agents, each with its own prompt engineering and context, let us tune and evaluate them independently instead of debugging one tangled prompt trying to do everything at once.

To ground these agents in actual exercise science and nutrition data rather than letting them hallucinate plans, we built a retrieval layer using Pinecone as the vector database. Before generating a recommendation, the relevant agent retrieves evidence-based fitness and nutrition knowledge, which the LLM then uses as context. This retrieval-augmented approach is what keeps Raeda AI's recommendations from drifting into generic, unreliable advice, which is the single biggest trust risk in any AI coaching product.

Infrastructure: Built for Sub-Second AI at Scale

Multi-agent AI systems are notoriously slow if you don't architect for performance from day one. Every additional agent call adds latency, and fitness app users don't tolerate a ten-second wait for a workout suggestion.

We deployed Raeda AI on Amazon ECS with Fargate and EC2 instances, which gave us flexible scaling without managing raw servers for every traffic spike. Redis handles session caching and response pre-computation, so repeated or predictable queries don't trigger a full agent pipeline every time. The frontend runs on AWS Amplify, PostgreSQL handles structured user data, and Pinecone powers semantic search across the fitness and nutrition knowledge base.

Getting this cloud infrastructure right was the difference between a demo that looks good and a product that holds up under real usage. Together, this combination keeps AI response times under a second even during peak usage, while keeping infrastructure costs manageable rather than scaling linearly with every new user.

Personalization That Actually Accounts for Real Constraints

The meal planning engine was built to be constraint-based from the ground up, not a generic recipe generator with filters slapped on top. It takes a user's allergies, dietary preferences such as vegan, keto, or Mediterranean, caloric targets, and macronutrient ratios as direct inputs, then generates weekly meal plans complete with grocery lists, substitution options, and preparation instructions. Every plan is grounded in nutritional data retrieved from the vector database rather than generated from the model's general knowledge, and plans adjust automatically as the system collects feedback and progress data over time.

On the fitness side, Raeda AI's data integration layer ingests activity data from wearables and health apps, feeding real-time data back into the recommendation engine to refine workout intensity and caloric targets as a user's actual behavior, not just their stated goals, becomes clearer. We also integrated Twilio for SMS-based coaching nudges and reminders, since a coaching relationship that goes silent between sessions stops feeling like coaching at all.

Trainer-Trainee Features and Real-Time Communication

Beyond the AI layer, the platform needed to support real human coaching relationships too. We built trainer-trainee management features covering onboarding, progress tracking, and content assignment, alongside real-time chat and in-app notifications so trainers and trainees could communicate directly inside the platform rather than falling back to outside messaging apps. Offline support and secure, encrypted authentication rounded out the experience, since fitness tracking happens in gyms, parks, and other places where connectivity isn't guaranteed.

What This Build Took

Realistically, a platform with this level of AI sophistication, multiple coordinated agents, vector database retrieval, real-time infrastructure, and full cross-platform delivery, takes longer than a simple MVP. Development spanned roughly 14 to 20 weeks, covering the multi-agent AI system, vector database setup, AWS infrastructure, and mobile-responsive interfaces for web, iOS, and Android. At typical development rates, a platform at this scope generally falls in the $25,000 to $55,000 range, depending on the number of agents, the size of the knowledge base, and how many third-party integrations are involved.

That timeline matters as context for any founder evaluating their own AI product plans. A simple AI-assisted app can often ship in 8 weeks. A genuine multi-agent coaching system with retrieval-augmented generation and real-time infrastructure is a different category of build, and treating it like a quick MVP sprint is one of the fastest ways to end up with an AI product that feels impressive in a demo and falls apart in production.

Lessons for Founders Building AI Coaching Products

A few things from this build apply well beyond fitness apps:

  • Split AI responsibilities into specialized agents rather than asking one model to do everything. It makes the system easier to tune, debug, and improve over time.
  • Ground recommendations in retrieved, evidence-based data rather than relying purely on a model's general knowledge. This is what separates a trustworthy AI coach from one that quietly gives bad advice.
  • Get infrastructure right early. Caching strategy and how agent calls are orchestrated determine whether your AI feature feels instant or feels like a loading screen.

Raeda AI is live today at raeda-ai.com, running the full multi-agent coaching system described here in production.


MicrocosmWorks builds AI-powered fitness, wellness, and SaaS platforms for startups and enterprises. If you're building an AI coaching product or evaluating what a multi-agent system would take for your use case, get in touch for a free roadmap.

Top comments (0)