https://github.com/johnnixon6972/python-multi-agent
A Streamlit-based fitness app that leverages Langflow to provide personalized macro-nutritional recommendations and goal tracking. This tool enables users to manage profiles, set fitness goals, ask fitness-related questions, and store notes, all backed by an Astra database for secure data management.
https://github.com/johnnixon6972/python-multi-agent
astradb gpt-4o langflow multi-agent-system prompt-engineering prompt-injection python3 streamlit
Last synced: 5 months ago
JSON representation
A Streamlit-based fitness app that leverages Langflow to provide personalized macro-nutritional recommendations and goal tracking. This tool enables users to manage profiles, set fitness goals, ask fitness-related questions, and store notes, all backed by an Astra database for secure data management.
- Host: GitHub
- URL: https://github.com/johnnixon6972/python-multi-agent
- Owner: JohnNixon6972
- Created: 2024-10-26T20:49:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-30T00:09:07.000Z (over 1 year ago)
- Last Synced: 2025-06-25T15:08:46.345Z (12 months ago)
- Topics: astradb, gpt-4o, langflow, multi-agent-system, prompt-engineering, prompt-injection, python3, streamlit
- Language: Python
- Homepage: https://personal-health-advisor.streamlit.app
- Size: 442 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Personal Fitness Tool
A Streamlit-based personal fitness app that leverages Langflow to provide tailored macro-nutritional advice and guidance. This tool manages users' personal fitness profiles and goals, generates dietary recommendations using AI, and stores notes and profiles in an Astra database.
## Table of Contents
1. [Overview](#overview)
2. [Features](#features)
3. [Architecture](#architecture)
4. [Setup](#setup)
5. [Usage](#usage)
6. [Langflow Configuration](#langflow-configuration)
7. [Acknowledgments](#acknowledgments)
---
## Overview
The Personal Fitness Tool provides a centralized platform for users to manage fitness-related information and receive AI-powered recommendations. With Langflow, the AI model dynamically processes inputs like user goals and personal data, giving actionable suggestions on nutrition and training. This tool employs Astra’s NoSQL database to store user data securely and efficiently.
## Features
- **Macros Generation**: Utilize Langflow-powered AI to generate dietary macros based on users' fitness goals.
- **Notes Management**: Save, retrieve, and delete fitness notes.
- **Ask AI**: Use language models to answer custom user questions based on their stored fitness profile and notes.
## Architecture
The following architecture is set up for efficient communication between the Streamlit interface, Langflow’s model interactions, and the Astra database.

## Setup
### Prerequisites
- **Python 3.10+**
- **Streamlit** for UI (`pip install streamlit`)
- **Langflow** setup and environment variable for API (`LANGFLOW_TOKEN`)
- **Astra DB** credentials (`ASTRA_ENDPOINT` and `ASTRA_DB_APPLICATION_TOKEN` in `.env` file)
### Installation
1. Clone the repository:
```bash
git clone https://github.com/JohnNixon6972/Python-Multi-Agent
cd Python-Multi-Agent
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Set up environment variables by creating a `.env` file and adding the following:
```dotenv
LANGFLOW_TOKEN=
ASTRA_ENDPOINT=
ASTRA_DB_APPLICATION_TOKEN=
OPENAI_API_KEY=
```
4. Initialize the database collections using `db.py`.
5. Run the Streamlit app:
```bash
streamlit run main.py
```
## Usage
### Main Features
- **Personal Data**: Fill out your name, age, weight, height, gender, and activity level, then click "Save" to update your profile.
- **Goals**: Select and save personal fitness goals.
- **Macros**: Generate dietary macros using AI or input your values.
- **Notes**: Manage and store custom notes related to fitness.
- **Ask AI**: Input questions for the AI to provide customized responses.
## Langflow Configuration
Langflow orchestrates the interactions between different models to enable personalized user guidance. By configuring flows within Langflow, models can respond accurately based on user-specific data, such as profile and goals, enabling adaptive recommendations. The AI flow files for `Ask AI` and `Macros Generation` are customized and stored as JSON files within the Langflow console.