- Abstract
- Key Features
- System Architecture
- MILP Formulation
- Datasets
- Quick Start
- Results
- Repository Structure
- Citation
- License
- Contributing
- Contact
FinNutriAgent is an open agentic AI framework that jointly optimizes household meal planning and financial budgets under nutritional, cultural, and economic constraints. It combines:
- π’ Mixed-Integer Linear Programming (MILP) for provably optimal solutions
- π€ Multi-agent reasoning across budget, nutrition, and pricing domains
- π§ LLM orchestration for natural-language explanations and coordination
The system is evaluated on a synthetic dataset reflecting realistic conditions in Saudi Arabia, covering 100 households, 500 individuals, and 350 food items with market prices from three major retail chains.
Ali Akarma, "FinNutriAgent: Agentic AI for Household Nutrition and Budgeting", 2025.
π DOI: 10.5281/zenodo.19078004
| Feature | Description |
|---|---|
| πΈ Budget-aware planning | Derives weekly food budgets from household financial profiles |
| π¨βπ©βπ§βπ¦ Demographic nutrition modeling | Aggregates per-person requirements (age, gender, WHO guidelines) |
| πͺ Multi-store price tracking | Monitors prices across Carrefour, Lulu, and Panda |
| βοΈ MILP optimization | Guarantees cost-minimal, nutritionally complete meal plans |
| βͺοΈ Halal compliance | Filters food selections to Islamic dietary law |
| π₯¦ Dietary diversity | Binary selection variables enforce food variety |
| π Price shock resilience | Triggers re-optimization when market prices shift beyond threshold |
| π Reproducible pipeline | Fully deterministic, all data versioned on Zenodo |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LLM Orchestrator β
β (Coordinates agents Β· Generates explanations) β
ββββββββββ¬ββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββ
β β β
βββββββΌβββββββ ββββββββΌβββββββ ββββββββΌβββββββ
β Budget β β Nutrition β β Price β
β Agent β β Agent β β Agent β
β β β β β β
β financial β β nutrition_ β β food_prices β
β _data.csv β β req.csv β β .csv β
βββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ
β β β
βββββββββββββββββββΌββββββββββββββββββ
βββββββββββββββββ
β MILP Engine β
β (PuLP/CBC) β
β β
β food_ β
β composition β
βββββββββ¬ββββββββ
β
βββββββββΌββββββββ
β Weekly Meal β
β Plan β
βββββββββββββββββ
Three specialized agents feed into a central MILP engine, coordinated by an LLM orchestrator that synthesizes constraints and generates human-readable meal plan explanations.
The optimizer minimizes total weekly food cost while incentivizing dietary diversity:
Objective Function
Subject to
Variables & Parameters
| Symbol | Type | Description |
|---|---|---|
| Continuous | Grams of food |
|
| Binary | 1 if food |
|
| Parameter | Cost per gram of food |
|
| Parameter | Minimum weekly requirement for nutrient |
|
| Parameter | Household weekly food budget (SAR) | |
| Parameter | Diversity incentive weight | |
| Parameter | Minimum/maximum serving bounds (grams) |
| Dataset | Rows | Key Columns | Description |
|---|---|---|---|
financial_data.csv |
100 | user_id, income, fixed expenses, savings targets |
Household financial profiles |
food_composition.csv |
350 | food_id, nutrients, halal flag |
Nutrient content per food item |
food_prices.csv |
350 | food_id, Carrefour, Lulu, Panda prices |
Per-item prices across 3 stores |
nutrition_requirements.csv |
500 | person_id, age, gender, daily targets |
Per-person nutritional requirements |
π Full schema documentation:
docs/dataset_documentation.md
π Dataset card (Gebru et al., 2021):docs/data_card.md
No local setup required. Click below to launch the full demo:
# 1. Clone the repository
git clone https://github.com/aliakarma/FinNutriAgent.git
cd FinNutriAgent
# 2. Install in editable mode
pip install -e .
# 3. (Optional) Fully reproducible install with pinned lockfile
pip install -r requirements.lock.txtgit clone https://github.com/aliakarma/FinNutriAgent.git
cd FinNutriAgent
conda env create -f environment.yml
conda activate finnutriagentjupyter notebook example/demo_finagent.ipynbpython scripts/validate_data.pyfrom scripts.optimizer import run_optimization
result = run_optimization(
weekly_budget=912.50,
nutrient_targets={
"calories": 6696,
"protein": 158,
"vitamin_d": 60,
"iron": 44,
},
halal_only=True,
)
print(result["status"]) # Optimal
print(result["total_cost_sar"]) # e.g., 24.73
print(result["plan"]) # DataFrame with recommended foods + nutrient contributionspytest tests/ -vTo regenerate all core tables and figures from the paper:
python scripts/reproduce_results.pyOutputs: results/summary.csv, results/summary_stats.json, and a sample plan for household U017.
For a quick budget sensitivity evaluation:
python scripts/evaluate_budget.pyEvaluates household U017 at a fixed 500 SAR weekly budget and prints cost/utilization with selected foods.
Full results:
RESULTS.mdΒ· Full reproduction:example/demo_finagent.ipynb
The optimizer consistently finds feasible, cost-minimal halal meal plans across all 100 households, satisfying all four nutritional constraints while consuming only 3β7% of the available weekly food budget β demonstrating strong economic efficiency.
FinNutriAgent/
βββ README.md # This file
βββ LICENSE # MIT (code) / CC BY 4.0 (data & docs)
βββ requirements.txt # Python package dependencies
βββ requirements.lock.txt # Pinned lockfile for reproducibility
βββ environment.yml # Conda environment specification
βββ CITATION.cff # Machine-readable citation
βββ CONTRIBUTING.md # Contribution guidelines
βββ RESULTS.md # Summary of key experimental results
βββ .gitignore
β
βββ config/
β βββ config.yaml # Centralized configuration (paths, solver params)
β
βββ data/
β βββ README.md # Dataset overview
β βββ financial/
β β βββ financial_data.csv # 100 household financial profiles
β βββ composition/
β β βββ food_composition.csv # 350 food items: nutrients + halal label
β βββ prices/
β β βββ food_prices.csv # Per-item prices across 3 stores
β βββ nutrition/
β βββ nutrition_requirements.csv # 500 individual nutritional profiles
β
βββ docs/
β βββ data_card.md # Datasheet for Datasets (Gebru et al., 2021)
β βββ dataset_documentation.md # Field-level schema and relationships
β βββ system_overview.md # Architecture, MILP formulation, data flow
β
βββ scripts/
β βββ __init__.py
β βββ budget_agent.py # Household food budget computation
β βββ nutrition_agent.py # Nutritional target aggregation
β βββ price_agent.py # Price loading and volatility detection
β βββ optimizer.py # MILP optimization engine (PuLP/CBC)
β βββ reproduce_results.py # Full paper result reproduction
β βββ evaluate_budget.py # Budget sensitivity evaluation
β βββ validate_data.py # Data integrity validation
β
βββ tests/
β βββ test_budget_agent.py
β βββ test_nutrition_agent.py
β βββ test_price_agent.py
β βββ test_optimizer.py
β
βββ .github/
β βββ workflows/
β βββ ci.yml # GitHub Actions CI pipeline
β
βββ example/
βββ demo_finagent.ipynb # Full reproducible demo (Colab-ready)
If you use FinNutriAgent in your research, please cite:
@software{syedfinagent2026,
author = {Toqeer Ali Syed, Abdulaziz Alshahrani, Ali Akarma, Sohail Khan, Muhammad Nauman, It Ee Lee, Salman Jan and Ali Ullah},
title = {{FinNutriAgent: Agentic AI for Household Nutrition and Budget Optimization}},
year = {2026},
publisher = {Engineering, Technology & Applied Science Research},
doi = {},
url = {}
}Or use the machine-readable CITATION.cff.
| Component | License |
|---|---|
Code (scripts/, tests/, example/) |
|
Datasets (data/) |
|
Documentation (docs/) |
Contributions are warmly welcome! Please read CONTRIBUTING.md before submitting a pull request.
