Skip to main content

Prerequisites

Docker + Compose

Docker Desktop or docker + docker compose

Git

To clone the repository

Git LFS

Required to pull fhir_concept_graph.bin
Verify your setup:
docker --version
docker compose version
git --version
git lfs version
Install Git LFS via brew install git-lfs (macOS) or apt install git-lfs (Linux), then run git lfs install once.

One-command deploy

1

Clone the repository

git clone https://github.com/thetahealth/mirobody.git
cd mirobody
2

Run the deploy script

./deploy.sh
This script:
  • Generates a .env file with ENV=localdb and a fresh CONFIG_ENCRYPTION_KEY
  • Creates a default config.localdb.yaml
  • Builds the Docker image
  • Starts Postgres, Redis, and the Mirobody backend
When you see the backend log line Uvicorn running on http://0.0.0.0:18080, you’re good.
3

Add at least one LLM API key

Open config.localdb.yaml and fill in at least one of:
config.localdb.yaml
# Required for DeepAgent (the default agent)
OPENROUTER_API_KEY: 'sk-or-...'

# Optional alternatives
OPENAI_API_KEY: 'sk-...'
GOOGLE_API_KEY: '...'
ANTHROPIC_API_KEY: 'sk-ant-...'
OPENROUTER_API_KEY is required for the default DeepAgent. Get one at openrouter.ai/keys. Keys are auto-encrypted with your CONFIG_ENCRYPTION_KEY the first time Mirobody loads them.
Mirobody includes three agents:
  • DeepAgent — single-model tool orchestration, the default
  • MixAgent — two-phase fusion (orchestrator + responder) for cost/quality balance
  • BaseAgent — direct LLM chat, no tools
See Tools Overview for switching agents.
4

(Optional) Configure providers and OAuth

To connect wearables or sign in with Google/Apple, add the corresponding credentials in config.localdb.yaml:
# Wearables
GARMIN_CLIENT_ID: ''
GARMIN_CLIENT_SECRET: ''

WHOOP_CLIENT_ID: ''
WHOOP_CLIENT_SECRET: ''

# OAuth sign-in
GOOGLE_OAUTH_CLIENT_ID: ''
GOOGLE_OAUTH_CLIENT_SECRET: ''
Full reference: Configuration.
5

Open the web app

Visit http://localhost:18080 and sign in with a preset demo account:
demo1@mirobody.ai
777777
Other preset accounts (demo2@mirobody.ai, demo3@mirobody.ai) use the same password by default — see EMAIL_PREDEFINE_CODES in config.localdb.yaml.Once in, you can:
  • Upload files — lab reports, medical records, photos, audio (see File Processing)
  • Chat with the agent — ask anything about your data
  • Link providers — Garmin, Whoop, Oura, Renpho, Apple Health (see Using Providers)
6

(Optional) Use the hosted client instead

Prefer a polished web client over the local UI? Open https://mirobody.ai — it’s our official hosted frontend that talks to your local backend over your machine.
The hosted client is convenient, but data flow stays local: it connects directly to your local API. Set your backend URL in the client’s settings.

Verify the API

curl http://localhost:18080/health

Endpoints

Web app

Local UI, file upload, chat

MCP server (local)

For Claude Desktop / Cursor

Chat API

OpenAI-compatible chat endpoint

History API

Session history
For ChatGPT Apps and other remote integrations, set MCP_PUBLIC_URL=https://yourdomain.com to expose the MCP server publicly over HTTPS — see ChatGPT Apps.

Docker services

ServicePortDescription
mirobody18080FastAPI app, MCP server, chart renderer
pg5432PostgreSQL with pgvector
redis6379Cache and session store
View logs:
docker compose logs -f mirobody
docker compose logs -f pg
docker compose logs -f redis

Common commands

docker compose down
docker compose restart
docker compose down
docker compose build --no-cache
docker compose up -d
docker compose exec pg psql -U mirobody -d mirobody
docker compose exec redis redis-cli

Troubleshooting

Change HTTP_PORT in config.localdb.yaml:
HTTP_PORT: 18081
Then docker compose restart mirobody.
docker compose ps pg
docker compose logs pg
docker compose exec redis redis-cli ping
Should return PONG.
chmod +x deploy.sh
OPENROUTER_API_KEY is missing or invalid. Fill it in config.localdb.yaml and restart.

Next Steps

Configure providers

Set OAuth credentials for Garmin, Whoop, Oura, Renpho, and more

Explore the API

Pulse, Chat, and MCP endpoints

Understand the architecture

How data flows from devices through agents to your screen

Add a new provider

Hook in a new wearable or data source
For production deployment, see Production for security hardening and performance tuning.