A visual calorie tracking web application hosted on GitHub Pages, deeply integrated with the OpenClaw Agent Framework to provide a seamless end-to-end tracking experience via WhatsApp.
The frontend is not updated manually. Instead, it is driven autonomously by specialized AI subagents within the OpenClaw ecosystem.
Bri is a specialized agent responsible for managing the user's diet and wellness. Her core directives (BRI_SOUL.md) instruct her to:
- Intercept user messages regarding food intake.
- Visual & Textual Interpretation: Automatically estimate the caloric value of meals by processing natural language descriptions or directly analyzing uploaded photos of the user's food.
- Interactive Coaching: Engage in a back-and-forth dialogue with the user to clarify portion sizes or ingredients, ensuring accurate calorie calculations before logging.
- Persist the data directly into a local CSV file.
- Trigger the deployment and delivery pipeline automatically upon confirmation.
All confirmed nutritional data is written locally by Bri into a simple comma-separated values file (DIET_LOG.csv) on the host machine. This acts as the single source of truth for the user's daily caloric intake.
Once Bri adds an entry to the CSV, she executes a global bash script (sync-tracker.sh). This script handles the entire deployment and delivery flow:
- Data Compilation: It executes
update-data.jsto parse today's entries fromDIET_LOG.csvand compile them into the structureddocs/data.jsonformat expected by this "FUEL MANIFEST" frontend. - Deployment: It automatically commits and pushes the new
data.jsonto this GitHub repository, triggering a live update on GitHub Pages. - Capture: To avoid deployment delays, it spins up a temporary local HTTP server, uses
shot-scraperto take an instant, high-resolution screenshot of the updated frontend. - Delivery: It uses the
openclaw message sendCLI to securely push the fresh screenshot directly back to the user's WhatsApp group.
Here is how the automated workflow executes in real-time, completely hands-free from the user's perspective:
- Input: The user sends a casual WhatsApp message: "I ate a big slice of pizza for dinner."
- Routing: The system identifies this as a diet task and routes it to
Bri. - Estimation: Bri processes the natural language, estimates the slice at roughly 300-400 calories, and confirms the addition with the user.
- Logging: Bri executes a bash command to append
2026-02-25,Big slice of pizza,350toDIET_LOG.csv. - Syncing: Bri instantly executes
/home/clawbot/workspaces/global/sync-tracker.sh. - Delivery: The script pushes the JSON data to GitHub and instantly delivers a
🟩🟩🟩⬜⬜stylized screenshot of the updated FUEL MANIFEST UI back to the WhatsApp chat.
- User: [Sends a photo of a plated meal] "I ate these"
- Bri: Interprets the photo as a full plate of chicken curry and rice. Engages the user to confirm portion size, estimates at 700 calories, and logs it. Script triggered. Output visual updated instantly with new progress blocks.
- User: "I ate a small apple."
- Bri: Estimated at 95 calories, logged to CSV, script triggered. Output visual: 707 / 1880 KCAL.
- Update the data locally:
node update-data.js
- Serve the frontend locally (for screenshot testing):
python3 -m http.server 8080 -d docs
- GitHub Pages Setup:
- Branch:
master - Source folder:
/docs
- Branch:
Tags: #openclaw #agent-framework #automation #wellness