Skip to content

DXN1-termux/aegis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ AEGIS

Open-Source Hospital AI Operating System

MADE WITH ❀️ BY DXN1


AEGIS Banner


GitHub Stars GitHub Forks License Python FastAPI Termux PRs Welcome GitHub last commit


🌟 One Command to Start Saving Lives

curl -sL https://raw.githubusercontent.com/DXN1-termux/aegis/master/install.sh | bash && cd ~/aegis && bash run.sh

Open β†’ http://localhost:5000 πŸš€


✨ What Makes AEGIS Different?

AEGIS is the world's first fully open-source Hospital AI Operating System. It combines a Claude-perfect chat interface with 23+ clinical tools, BYOK multi-provider AI, drug interaction checking, patient management, and real-time OSINT β€” all in a single, beautiful, zero-config package.

πŸ€– Claude-Perfect AI Chat

Real conversations with GPT-4o, Claude Sonnet 4, Gemini 2.0 Flash, DeepSeek, Grok β€” or all five at once. Bring Your Own Keys (BYOK) β€” zero data leaves your network.

Provider Best Model Speed Quality
πŸ”΅ OpenAI GPT-4o ⚑⚑⚑ ⭐⭐⭐⭐⭐
🟀 Anthropic Claude Sonnet 4 ⚑⚑⚑ ⭐⭐⭐⭐⭐
πŸ”΄ Google Gemini 2.0 Flash ⚑⚑⚑⚑⚑ ⭐⭐⭐⭐
🟒 DeepSeek DeepSeek Chat ⚑⚑⚑⚑ ⭐⭐⭐⭐
⚫ xAI Grok Beta ⚑⚑⚑ ⭐⭐⭐⭐

πŸ”§ 23+ Clinical Tools (and growing every heartbeat)

Category Tools
πŸ’Š Drug Safety Interaction checker, dosage calculator, pregnancy category lookup
πŸ“ Calculators BMI, eGFR, CHA2DS2-VASc, CURB-65, body surface area
πŸ”¬ Lab Analysis Complete blood count interpretation, metabolic panel, ABG analysis
❀️ Vitals Heart rate, blood pressure, temperature, respiratory rate interpretation
🧬 Diagnostics Differential diagnosis generator, symptom checker
🌍 OSINT Drug recalls, outbreak tracking, clinical trials, supply chain monitoring
πŸ—ΊοΈ Navigation Move between sections via natural language ("Go to patients")
πŸ” System File search, grep, calculator, web search

🎨 Claude-Inspired Interface

  • Dark clinical theme with subtle grid background
  • Mobile sidebar β€” swipe + Cmd+B to toggle
  • Responsive β€” phones, tablets, desktops all look premium
  • OS auto-detection β€” Android, iOS, Termux, Desktop, Linux
  • Smooth animations β€” every transition feels buttery
  • PWA ready β€” install as app on your phone

πŸ”„ Self-Improving: Heartbeat Engine

AEGIS improves itself every 5 minutes:

  • πŸ€– Runs clinical tests automatically
  • πŸ’Š Expands drug database with new interactions
  • πŸ› Auto-fixes dependency issues
  • πŸ“Š Generates improvement changelogs
  • πŸš€ Auto-pushes updates to GitHub
  • πŸ₯ Self-heals if server crashes

πŸš€ Quick Start

Option 1: One-Click (Recommended)

curl -sL https://raw.githubusercontent.com/DXN1-termux/aegis/master/install.sh | bash
cd ~/aegis && bash run.sh

Option 2: Clone & Run

git clone https://github.com/DXN1-termux/aegis.git
cd aegis
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 -m uvicorn backend.app.main:app --host 0.0.0.0 --port 5000 --reload

Option 3: Docker

docker pull ghcr.io/DXN1-termux/aegis:latest
docker run -p 5000:5000 ghcr.io/DXN1-termux/aegis:latest

πŸ“± Termux (Android) Setup

pkg update && pkg upgrade -y
pkg install python git curl -y
curl -sL https://raw.githubusercontent.com/DXN1-termux/aegis/master/install.sh | bash
cd ~/aegis && bash run.sh
# Share with: termux-open-url http://localhost:5000

πŸ— Architecture

aegis/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ main.py           # FastAPI server πŸš€
β”‚   β”‚   β”œβ”€β”€ chat.py           # Multi-provider AI engine πŸ€–
β”‚   β”‚   β”œβ”€β”€ config.py         # 5-tier config fallback βš™οΈ
β”‚   β”‚   β”œβ”€β”€ database.py       # SQLite + 3-tier fallback πŸ’Ύ
β”‚   β”‚   β”œβ”€β”€ crypto.py         # Encrypted key storage πŸ”’
β”‚   β”‚   β”œβ”€β”€ auto_improve.py   # Heartbeat improvement ❀️
β”‚   β”‚   β”œβ”€β”€ chat_tools/       # 23 clinical tools πŸ”§
β”‚   β”‚   β”œβ”€β”€ routes/           # 16 API + WebSocket πŸ“‘
β”‚   β”‚   β”œβ”€β”€ plugins/          # Plugin system πŸ”Œ
β”‚   β”‚   β”œβ”€β”€ osint/            # OSINT modules 🌍
β”‚   β”‚   β”œβ”€β”€ safety/           # Safety protocols πŸ›‘οΈ
β”‚   β”‚   └── surgery/          # Surgical checklists πŸ₯
β”‚   β”œβ”€β”€ tests/                # 60+ tests βœ…
β”‚   └── seed_data/            # WHO medicines πŸ₯
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ index.html            # Claude SPA 🎨
β”‚   β”œβ”€β”€ css/                  # Premium theme system ✨
β”‚   β”œβ”€β”€ js/                   # Interactive modules πŸ”₯
β”‚   └── dashboard/ etc.       # Module pages πŸ“Š
β”œβ”€β”€ assets/                   # SVGs & banners πŸ–ΌοΈ
β”œβ”€β”€ install.sh                # One-click installer πŸ“¦
β”œβ”€β”€ run.sh                    # Auto-port launcher πŸš€
β”œβ”€β”€ heartbeat.sh              # Every 5-min improvement ❀️
β”œβ”€β”€ Dockerfile                # 🐳 Docker
└── docker-compose.yml        # Multi-service setup

πŸ“‘ API Reference

Chat

POST /api/chat
Content-Type: application/json
{
  "message": "Check warfarin and aspirin interaction",
  "provider": "anthropic"
}

WebSocket Real-Time

const ws = new WebSocket("ws://localhost:5000/ws/chat");
ws.send(JSON.stringify({
  type: "chat",
  message: "Analyze this patient case...",
  provider: "openai"
}));
ws.onmessage = (e) => console.log(JSON.parse(e.data).content);

Health

GET /api/health
β†’ {"status":"ok","version":"2.0.0","service":"AEGIS"}

All Endpoints

Method Path Description
GET /api/health System health
POST /api/chat AI chat message
GET /api/modules Available modules
GET /api/patients Patient records
GET /api/drugs Drug database
POST /api/keys Save API key
POST /api/heartbeat/improve Trigger improvement
WS /ws/chat Real-time streaming

πŸ’¬ Examples

import requests
r = requests.post("http://localhost:5000/api/chat", json={
    "message": "What's the amoxicillin dosage for a 5-year-old?",
    "provider": "openai"
})
print(r.json()["content"])
# Terminal chat
curl -X POST http://localhost:5000/api/chat \
  -H "Content-Type: application/json" \
  -d '{"message":"Calculate BMI for 175cm, 80kg"}'

🀝 Contributing

AEGIS needs YOU to become the greatest healthcare AI platform in existence.

How to Help

  • ⭐ Star the repo β€” visibility saves lives
  • πŸ› Report bugs β€” every fix helps a hospital
  • πŸ’‘ Suggest features β€” what would save more lives?
  • πŸ”§ Submit PRs β€” code changes welcome
  • 🌍 Translate β€” Russian, Spanish, Arabic, French
  • πŸ₯ Test in real hospitals β€” real-world feedback

πŸ“„ License

MIT License β€” see LICENSE


❀️ Made With Love

Built by DXN1 β€” a developer who believes healthcare AI should be free and open to everyone.

"Every hospital, clinic, and rural health center deserves world-class AI β€” regardless of budget or location."

Support

  • 🌟 Star this repo ⭐ β€” it literally helps patients
  • πŸ”— Share with every doctor you know
  • 🐦 Follow for updates
  • πŸ’¬ Join the community discussions

AEGIS β€” Saving Lives, One Commit at a Time



πŸ› Report Bug Β· πŸ’¬ Join Discussion Β· πŸ’‘ Request Feature

About

πŸ₯ AEGIS β€” Hospital Safety Operating System. 10 evidence-based clinical modules (VTE, Sepsis, Falls, Braden, WHO Surgery Checklist, Partograph, ARDS, Cancer Staging, Pain Ladder, Outbreak). Open source, MIT licensed, deployable in 30 seconds. Built to save lives.

Topics

Resources

License

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors