Agent
Agent is the conversational orchestration service. It receives messages from channels such as WhatsApp, interprets the user’s intent and calls Platform to perform business actions.Responsibilities
Agent owns:- Channel webhooks.
- Message normalization.
- LLM calls.
- Intent detection.
- Clarification loops.
- Short-lived conversation state.
- Reply formatting.
Channel-agnostic design
Agent should not put business logic inside WhatsApp handlers. WhatsApp-specific code should only receive, validate and map messages into channel-neutral models. The core orchestration should work for future channels such as Telegram or web chat.LLM-agnostic design
Agent should be able to use different LLM providers through adapters. The core should depend on a provider interface, not on Gemini, OpenAI or Claude directly.Redis usage
Redis stores short-lived conversation state:- Pending clarifications.
- Last interaction context.
- Temporary user context cache.
Platform integration
Agent must use Platform internal APIs for business actions:- Resolve channel identifier to user.
- Fetch user context.
- Register meal entries.
- Register workouts.
- Fetch nutrition summaries.
