Skip to main content

BioSage - AI-Powered Medical Diagnostic Assistant TUI with ARGUS Debate Framework

Project description

BioSage Terminal

AI-Powered Medical Diagnostic Assistant - Terminal User Interface

Overview

BioSage Terminal is a sophisticated TUI (Terminal User Interface) application for medical diagnostics powered by AI. It leverages the ARGUS debate-based reasoning framework to provide evidence-based diagnostic suggestions through multiple specialist AI agents.

Features

  • Full ARGUS Debate Framework Integration:

    • Moderator Agent: Orchestrates debate agenda and controls flow
    • Specialist Agents: Infectious Disease, Cardiology, Neurology, Oncology, Autoimmune, and Toxicology experts
    • Refuter Agent: Challenges weak evidence and generates rebuttals
    • Jury Agent: Renders final verdicts via Bayesian aggregation
    • CDAG: Conceptual Debate Graph tracks all propositions, evidence, and rebuttals
  • Evidence-Based Reasoning: Uses Bayesian posterior computation for calibrated confidence scores

  • Patient Management: Complete patient onboarding, vitals tracking, and case management

  • Persistent Storage: Local JSON-based storage for all patient data and cases

  • Beautiful TUI: Rich terminal interface with intuitive navigation using Textual framework

Installation

pip install biosage-terminal

# Install with preferred LLM provider
pip install biosage-terminal[gemini]   # Google Gemini (recommended)
pip install biosage-terminal[openai]   # OpenAI
pip install biosage-terminal[anthropic] # Anthropic Claude
pip install biosage-terminal[all-llms]  # All providers

Quick Start

After installation, simply run:

biosage

Or check your API configuration first:

biosage --check-api

Configuration

API keys and model names are configured via environment variables. BioSage auto-detects available providers in this order: Gemini > OpenAI > Anthropic > Groq > Mistral > Cohere > Ollama

Environment Variables

# API Keys
export GEMINI_API_KEY=your_key_here        # Google Gemini (recommended)
export OPENAI_API_KEY=your_key_here        # OpenAI
export ANTHROPIC_API_KEY=your_key_here     # Anthropic Claude
export GROQ_API_KEY=your_key_here          # Groq
export MISTRAL_API_KEY=your_key_here       # Mistral
export COHERE_API_KEY=your_key_here        # Cohere

# Optional: Custom model names
export GEMINI_MODEL=gemini-1.5-pro
export OPENAI_MODEL=gpt-4o
export ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
export GROQ_MODEL=llama-3.1-70b-versatile

# For local Ollama (no API key needed)
export OLLAMA_MODEL=llama3.1

# Data storage directory (default: ~/.biosage)
export BIOSAGE_DATA_DIR=/path/to/data

You can also create a .env file in your working directory.

Navigation

Key Action
d Dashboard
o Patient Onboarding (New Case)
r Run Diagnosis
s Specialist Grid
e Evidence Explorer
Tab Switch tabs / Next field
Enter Select / Confirm
Esc Back / Cancel
q Quit

Data Storage

All data is stored locally in ~/.biosage/:

  • patients/ - Patient records (JSON)
  • cases/ - Diagnostic cases with ARGUS debate results
  • evidence/ - Evidence and citations
  • reports/ - Generated reports
  • audit/ - Audit trail of all actions

ARGUS Debate Architecture

BioSage Terminal uses the full ARGUS multi-agent debate framework:

  1. Moderator creates debate agenda for the diagnosis
  2. Specialist Agents (6 domains) gather domain-specific evidence
  3. Refuter Agent challenges evidence and generates rebuttals
  4. CDAG (Conceptual Debate Graph) tracks:
    • Propositions (diagnosis hypotheses)
    • Evidence nodes (supporting/attacking)
    • Rebuttal nodes (challenges to evidence)
  5. Bayesian Propagation computes posterior probabilities
  6. Jury Agent renders final verdicts with:
    • Verdict label (supported/rejected/undecided)
    • Posterior confidence
    • Clinical reasoning

Development

git clone https://github.com/biosage/biosage-terminal
cd biosage-terminal
pip install -e .[dev]

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biosage_terminal-1.0.0.tar.gz (83.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biosage_terminal-1.0.0-py3-none-any.whl (95.9 kB view details)

Uploaded Python 3

File details

Details for the file biosage_terminal-1.0.0.tar.gz.

File metadata

  • Download URL: biosage_terminal-1.0.0.tar.gz
  • Upload date:
  • Size: 83.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for biosage_terminal-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b04e283803d83b27973bfe7b057443b14308f97a3e6f19f319aca1492f82f4a2
MD5 bb25ea016436502d43c031b3c4d98aa8
BLAKE2b-256 ef9bed223b11607c0b04e0487d9a975df4d8527129c12d07b15457eb0a435e6b

See more details on using hashes here.

File details

Details for the file biosage_terminal-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for biosage_terminal-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb71d4f8319acb3e8795d19df091472160f1125ec269cc707b763bc4b0df6a28
MD5 be6a9350169f4caeeaf218ca8b65421d
BLAKE2b-256 321eb94763e180b3aa8d390e8e85baa9d7cf0a238005f67f6157862c2263bf87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page