# agingai **Repository Path**: agingai-open/agingai ## Basic Information - **Project Name**: agingai - **Description**: AgingAI 主仓库 — 参考 Nature Medicine (2025) 论文方法构建的养老院场景老年人智能衰老评估平台(研究用途,非医疗器械) - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-26 - **Last Updated**: 2026-08-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AgingAI — AI-Based Aging Assessment System for Older Adults > An intelligent aging-assessment platform for nursing-home scenarios, inspired by the methods of a Nature Medicine (2025) paper: > **data collection → knowledge enhancement → multi-dimensional AI assessment → care-plan recommendation**, with a continuous model-training loop. ## Medical Disclaimer This project is a research-oriented technical exploration of AI-based aging assessment for older adults, published for **research purposes only**. It is **not a medical device** and has not obtained any medical certification or registration. Its outputs **must not be used for clinical diagnosis, treatment decisions, or any medical setting**. All demo data is synthetic. Use at your own risk. Full statements: [DISCLAIMER.en.md](DISCLAIMER.en.md) / [DISCLAIMER.zh.md](DISCLAIMER.zh.md). ## Architecture ``` nurse-web admin-web elderly-miniapp (Vue.js nurse) (Vue.js admin) (Mini Program + H5) │ │ │ └────────────────┼────────────────┘ │ HTTPS :8000 ▼ ┌──────────────────────────┐ │ medical-portal (:8000) │ │ BFF (API gw + auth) │ └──┬───┬───┬───┬───┬───┬───┘ │ │ │ │ │ │ ┌───────┘ │ │ │ │ └──────────┐ ▼ ▼ ▼ ▼ ▼ ▼ ┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ai-collect- │ │ai-evalua-│ │medical- │ │ai-train- │ │ai-data- │ │ai-recom- │ │ion :8001 │ │tion :8002│ │knowledge │ │ing :8004 │ │foundation│ │mendation │ │collection │ │assessment│ │-graph │ │finetune+ │ │:8005 │ │:8006 │ │voice/forms │ │6 dims │ │:8003 KG │ │calibr. │ │data base │ │care plan │ └─────┬──────┘ └────┬─────┘ └──────────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │ scales │ evaluations │ export │ storage │ read └──────────┬──┴─────────────────────┴────────────┴───────────────┘ ▼ ┌─────────────────────────────────────────────┐ │ ai-data-foundation (:8005) │ │ scales / assessments / nursing history (PG) │ └─────────────────────────────────────────────┘ ``` **Closed loop**: data collection → knowledge enhancement → multi-dimensional AI assessment → model training (continuous improvement) → user interaction. - 📦 **ai-data-foundation (:8005)** is the unified historical-data store: ai-collection and ai-evaluation write standardized records; ai-training exports training samples (see [ADR-001](./docs/decisions/ADR-001-历史数据存储与数据底座.md), Chinese). - 🎯 **ai-recommendation (:8006)** consumes assessment records: rules/LLM/DL → care plans (see [ADR-002](./docs/decisions/ADR-002-方案推荐模块独立.md), Chinese). - 🖥️ **Three frontends by role**: nurse-web, admin-web, elderly-miniapp; medical-portal is a pure BFF (API gateway + JWT auth + proxying, see [ADR-003](./docs/decisions/ADR-003-门户系统三端拆分与前后端分离.md), Chinese). ## Subprojects | Subproject | Port | Description | |------------|:---:|-------------| | [ai-collection](./ai-collection) | :8001 | AI collection — voice acquisition, standardization, text conversion, bulk import | | [ai-evaluation](./ai-evaluation) | :8002 | AI assessment — frailty / cognitive / nutrition / voice-gateway dimensions | | [medical-knowledge-graph](./medical-knowledge-graph) | :8003 | Medical knowledge graph — dual-layer architecture + RAG retrieval | | [ai-training](./ai-training) | :8004 | AI training — LoRA fine-tuning + XGBoost calibration + staged rollout | | [medical-portal](./medical-portal) | :8000 | **BFF** — API gateway + JWT auth + proxying (backend only) | | [nurse-web](./nurse-web) | — | **Nurse client** — care plans / medication / health records (Vue.js SPA) | | [admin-web](./admin-web) | — | **Admin console** — dashboards / statistics (Vue.js + ECharts) | | [elderly-miniapp](./elderly-miniapp) | — | **Elderly/family client** — health trends / care advice (WeChat Mini Program + responsive H5) | | [ai-data-foundation](./ai-data-foundation) | :8005 | **Data foundation** — unified storage of scale/assessment/nursing history (PostgreSQL+pgvector) | | [ai-recommendation](./ai-recommendation) | :8006 | **Recommendation** — assessment → care-plan mapping (rules first + LLM fallback + DL reserved) | > 🔊 **Optional third-party component**: the speech-assessment enhancement component speech_classifier is an **optional third-party component**. This project holds no redistribution license for it and does not ship it in this repository. To enable it, obtain it from upstream yourself and confirm its license: . When the component is not deployed, voice assessment automatically degrades to basic analysis mode; other assessment dimensions are unaffected. ## Tech Stack | Layer | Choice | |-------|--------| | Backend | Python 3.11+ / FastAPI / Uvicorn | | AI agents | LangGraph / LangChain | | Knowledge graph | NetworkX MultiDiGraph (dual layer) | | Vector retrieval | FAISS + sentence-transformers | | Base model | Qwen2.5-7B + LoRA fine-tuning | | Calibration | XGBoost + SHAP explainability | | Configuration | pydantic-settings + .env | | Frontend | Vue 3 + TypeScript (nurse-web / admin-web); Taro 4 + Vue 3 (elderly-miniapp) | | Spec-driven dev | OpenSpec (SDD) | ## Quick Start (Synthetic-Data Route) The repository contains no real personal data; demos and tests rely entirely on de-identified output of the [synthetic data generator](./ai-data-foundation/scripts/generate_demo_data.py). ### 1. Clone and initialize ```bash git clone --recursive https://gitee.com/agingai-open/agingai.git cd agingai ``` ### 2. Prepare the environment Requirements: Python 3.11+, Node 18+ (frontends only), Docker (PostgreSQL). ```bash # Each backend subrepo: venv + deps + .env (fill placeholder keys, e.g. your LLM API key) for r in ai-collection ai-evaluation medical-knowledge-graph ai-training \ medical-portal ai-data-foundation ai-recommendation; do (cd "$r" && python3.11 -m venv venv && ./venv/bin/pip install -r requirements.txt \ && cp .env.example .env) done # Database: PostgreSQL with pgvector (ai-data-foundation) (cd ai-data-foundation && docker compose up -d) ``` ### 3. Import synthetic data and start ```bash cd ai-data-foundation && source venv/bin/activate python scripts/generate_demo_data.py --seed 42 --format sql --out demo_data.sql psql "$DATABASE_URL" -f demo_data.sql # idempotent import (see subrepo README) cd .. # Start all 7 backend services (:8000-:8006) ./start.sh start # Integration tests (quick tier) ./run_tests.sh --quick ``` ### 4. Frontends (optional) ```bash cd nurse-web && npm install && npm run dev # or admin-web ``` ## License - **Code**: [Apache License 2.0](LICENSE) (same license in every subrepo). - **Content assets** (`ai-evaluation/prompts/`, `ai-recommendation/app/rules/`): CC BY-NC 4.0 — see the [CONTENT-LICENSE.md](./ai-evaluation/prompts/CONTENT-LICENSE.md) in each directory and [NOTICE.md](NOTICE.md). - speech_classifier is an optional third-party component and is outside this project's redistribution scope (see [NOTICE.md](NOTICE.md)). ## Contributing - Contributing guide: [CONTRIBUTING.en.md](CONTRIBUTING.en.md) / [CONTRIBUTING.md](CONTRIBUTING.md) - Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - Security reports: [SECURITY.md](SECURITY.md) — **never paste real patient data or any real personal information into issues, PRs, or screenshots** - Roadmap: [ROADMAP.md](ROADMAP.md) ## Further Documentation - [Architecture Decision Records (ADR)](./docs/decisions/) (Chinese) - [Standards & contracts overview](./docs/standards/00-规范契约总览.md) (Chinese) - [Testing overview](./docs/测试总览.md) (Chinese) - [OpenSpec specs](./openspec/specs/)