Adaptive experimentation service for the AugMed platform. Uses Thompson Sampling to dynamically adjust experimental arm assignments based on participant outcomes, enabling more efficient clinical experiments.
Built with FastAPI and uvicorn.
Deploy the full platform: This RL service is part of a multi-service platform. To deploy everything together (API + Frontend + RL + Database), see the One-Click Deploy Guide in the API repository.
The service reads configuration from environment variables with the AUGMED_RL_ prefix:
| Variable | Description |
|---|---|
AUGMED_RL_AUGMED_API_URL |
URL of the AugMed API (e.g., http://localhost:5000) |
AUGMED_RL_AUGMED_API_KEY |
API key for authenticating with the export API |
-
Clone the repository:
git clone <repository-url>
-
Build container:
task build
-
Spawn local service:
task up
-
Tear down local service:
task down
# Install dependencies
pip install -e .
# Run the service
uvicorn src.main:app --host 0.0.0.0 --port 8000
# Run tests
pytestdocker build -t augmed-rl .
docker run -p 8000:8000 \
-e AUGMED_RL_AUGMED_API_URL=http://host.docker.internal:5000 \
-e AUGMED_RL_AUGMED_API_KEY=your-api-key \
augmed-rl