Skip to main content

Installation Methods

Choose the installation method that best suits your needs:

Verify Installation

After installation, verify everything is working:
1

Check service health

curl http://localhost:18080/health
Expected response:
{
  "status": "healthy",
  "version": "1.0.1",
  "services": {
    "database": "connected",
    "redis": "connected"
  }
}
2

List available providers

curl http://localhost:18080/api/v1/pulse/providers
Should return a list of available health providers.
3

Check logs

View application logs to ensure no errors:
# Docker deployment
docker-compose logs -f backend

# Direct installation
# Logs will be in the terminal where you ran main.py

Post-Installation Setup

To enable health device integrations, you need OAuth credentials from each provider.See the Configuration guide for detailed instructions on obtaining and setting up OAuth credentials for:
  • Garmin Connect
  • Whoop
  • Custom providers
To enable AI features, add at least one API key to config.localdb.yaml:
# ============ LLM API Keys (At least one required) ============
GOOGLE_API_KEY: ''      # For Gemini models
OPENAI_API_KEY: ''      # For GPT models
OPENROUTER_API_KEY: ''  # For Claude, DeepSeek, and other models

# ============ Agent Configuration ============
MCP_TOOL_DIRS:
  - mirobody/pub/tools
  - mirobody/pub/tools_health

MCP_RESOURCE_DIRS:
  - mirobody/pub/resources

AGENT_DIRS:
  - mirobody/pub/agents
Mirobody Health includes two agent types:
  • DeepAgent (LangChain-based): Best for complex tasks, file operations, multi-step planning
  • BaselineAgent (Native Gemini): Best for simple conversations, lightweight MCP integration
See Tools Overview for configuration details.
For production, set secure encryption keys:
DATABASE_DECRYPTION_KEY: 'your_32_char_encryption_key'
JWT_KEY: 'your_secure_jwt_secret'
Use strong, randomly generated keys in production. Never commit these to version control.
Configure S3-compatible storage for data backups:
S3_KEY: 'your_access_key'
S3_TOKEN: 'your_secret_key'
S3_REGION: 'us-east-1'
S3_BUCKET: 'your-bucket-name'

Directory Structure

After installation, your directory structure will look like this:
mirobody-health/
├── mirobody/                  # Main application package
│   ├── chat/                 # Chat and agent services
│   ├── mcp/                  # MCP protocol implementation
│   ├── pulse/                # Health data providers
│   │   ├── theta/           # OAuth providers (Garmin, Whoop, etc.)
│   │   ├── apple/           # Apple Health platform
│   │   ├── core/            # Core health data services
│   │   └── file_parser/     # File processing handlers
│   ├── pub/                  # Public tools and agents
│   │   ├── tools/           # General-purpose MCP tools
│   │   ├── tools_health/    # Health-specific MCP tools
│   │   ├── resources/       # MCP resources
│   │   └── agents/          # Agent implementations
│   ├── server/               # HTTP server
│   ├── user/                 # User authentication
│   └── utils/                # Utilities
├── database/                  # Database schemas and migrations
│   └── resource/             # SQL initialization files
├── image/                     # Logo and branding assets
├── compose.yaml              # Docker Compose configuration
├── config.yaml               # Base configuration (immutable)
├── config.localdb.yaml       # Your environment configuration
├── .env                      # Environment variables
├── main.py                   # Application entry point
├── requirements.txt          # Python dependencies
├── package.json              # Node.js dependencies
├── run.sh                    # Deployment script
└── README.md                 # Documentation

Troubleshooting Installation

Problem: Docker commands fail with permission errors.Solution:
# Linux: Add user to docker group
sudo usermod -aG docker $USER

# Log out and back in
newgrp docker
Problem: Port 18080 is already in use.Solution: Change the port in config.localdb.yaml:
HTTP_PORT: 18081  # Use any available port
Problem: Cannot connect to PostgreSQL.Solutions:
  1. Verify PostgreSQL is running:
    docker-compose ps postgres
    
  2. Check connection settings in config.localdb.yaml:
    PG_HOST: db  # 'db' for Docker, 'localhost' for local install
    PG_PORT: 5432
    PG_USER: holistic_user
    PG_DBNAME: holistic_db
    
  3. Check database logs:
    docker-compose logs postgres
    
Problem: Python 3.12 not available.Solutions:
brew install [email protected]
Problem: ModuleNotFoundError when running the application.Solution:
# Ensure all dependencies are installed
pip install -r requirements.txt

# Install in development mode
pip install -e .

Uninstallation

Remove all containers, volumes, and images:
# Stop and remove containers
docker-compose down

# Remove volumes (WARNING: This deletes all data)
docker-compose down -v

# Remove images
docker-compose down --rmi all

Next Steps