LifeFlow-AI / README.md
Marco310's picture
feat: improve UI/UX
ecbe9e4
|
raw
history blame
4.98 kB
metadata
title: LifeFlow AI - Intelligent Trip Planning System
emoji: ๐Ÿ—บ๏ธ
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: mit
short_description: Your journey, in perfect rhythm
tags:
  - mcp-in-action-track-enterprise
  - mcp-in-action-track-consumer
  - mcp-in-action-track-creative

โœจ LifeFlow AI: Intelligent Trip Planning System

Your journey, in perfect rhythm. > An enterprise-grade, multi-agent system that orchestrates your daily schedule using real-world data, hybrid AI architecture, and mathematical optimization.


๐Ÿ‘ฅ Team

Team Information:

  • Man-Ho Li - @Marco310 - Lead Developer & AI Architect
  • Chen-Yang Yu - @LittleFish-Coder - Technical Consultant & Marketing Director

๐Ÿ“บ Demo & Submission

  • Demo Video: [Coming Soon]
  • Social Media Post: [Coming Soon]
  • Submission Date: November 2025

๐Ÿ“– Overview

LifeFlow AI is not just a chatbot; it's a State Machine for Real-World Operations. It solves the complexity of daily travel planningโ€”considering traffic, weather, opening hours, and route optimizationโ€”by coordinating a team of specialized AI agents.

Unlike traditional AI planners that hallucinate locations, LifeFlow grounds every decision in Real-Time Data (Google Maps & OpenWeather) and uses Mathematical Optimization (TSP/OR-Tools) for routing.

๐Ÿš€ Key Innovation: Hybrid AI Architecture

We solve the "Trilemma" of AI Agents: Cost vs. Speed vs. Intelligence.

1. Dual-Brain System ๐Ÿง  + โšก

Instead of using one expensive model for everything, LifeFlow uses a tiered approach:

  • Primary Brain (The Leader): Uses high-reasoning models (e.g., GPT-5, Gemini 2.5 Pro) for complex intent understanding, team orchestration, and final report generation.
  • Acceleration Layer (The Muscle): Uses ultra-fast, low-cost models (e.g., Groq/Llama-3, Qwen 2.5, Gemini Flash-lite, GPT mini) for high-volume tool execution (searching POIs, checking weather).

2. Context-Offloading Protocol ๐Ÿ“‰

Traditional agents paste massive JSON search results into the chat context, burning thousands of tokens.

  • LifeFlow's Approach: Agents treat data like "Hot Potatoes."
  • Mechanism: Raw data (reviews, photos, coordinates) is offloaded to a structured database immediately. Agents only pass Reference IDs (e.g., scout_result_123) to the next agent.
  • Result: Token consumption reduced by 75% (from ~80k to ~20k per run).

๐Ÿค– The Agent Team

LifeFlow orchestrates 6 specialized agents working in a strict pipeline:

  1. ๐Ÿ“‹ Planner: Analyzes vague user requests (e.g., "I need to buy coffee and visit the bank") and converts them into structured JSON tasks.
  2. ๐Ÿ‘จโ€โœˆ๏ธ Team Leader: The State Machine orchestrator. Enforces SOPs and handles error recovery.
  3. ๐Ÿ—บ๏ธ Scout (Fast Mode): Interacts with Google Places API to verify locations and retrieve coordinates.
  4. โšก Optimizer (Fast Mode): Uses routing algorithms to solve the Traveling Salesperson Problem (TSP) with time windows.
  5. ๐Ÿงญ Navigator (Fast Mode): Calculates precise traffic impacts and generates polyline routes.
  6. ๐ŸŒค๏ธ Weatherman (Fast Mode): Checks hyper-local weather forecasts for specific arrival times.
  7. ๐Ÿ“Š Presenter: Compiles all data (from the DB) into a human-readable, formatted report.

๐Ÿ› ๏ธ Features

  • BYOK (Bring Your Own Key): Secure client-side key management for Google Maps, OpenWeather, and LLMs.
  • Zero-Cost Validation: Smart API testing mechanism that checks key validity without incurring charges.
  • Interactive Map: Visualizes routes, stops, and alternative POIs using Folium.
  • Graceful Cancellation: Cooperative signal handling to terminate background agents instantly.
  • Reactive UI: Modern Gradio interface with real-time streaming and responsive layouts.

โš™๏ธ Configuration

LifeFlow AI allows deep customization via the Settings panel:

Supported Providers

  • Google Gemini: 2.5 Pro, 2.5 Flash, 2.0 Flash.
  • OpenAI: GPT-5, GPT-5-mini, GPT-4o-mini.
  • Groq: Llama 3.3 70B, GPT-OSS 120B, Kimi K2.

Fast Mode (Hybrid)

Enable Fast Mode in settings to offload search and routing tasks to Groq. This significantly reduces latency and API costs while maintaining high-quality reasoning for the final output.


๐Ÿ“ฆ Tech Stack

  • Framework: Agno (formerly Phidata) for Agent Orchestration.
  • UI/UX: Gradio 5.x with custom CSS themes. (update to Gradio 6.x soon)
  • Services: Google Maps Platform (Places, Routes), OpenWeatherMap.
  • Infrastructure: Python 3.11, Docker.

๐Ÿ’ป Local Installation

To run LifeFlow AI locally:

TODO

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference