Improve AI Quick Start

This guide covers setting up the Improve AI Trainer, Tracker, and SDKs to track decisions and rewards, and train updated models.

For a deeper treatment of the Improve AI concepts see the documents on Reinforcement Learning, Decisions, Ranking, Scoring and Multivariate Optimization.

Subscribe to a Trainer

  • To train unlimited decision models on up to 100,000 logged variants each, subscribe to the free trainer.
  • To train decision models on over 100,000 logged variants, subscribe to the pro trainer.

Deploy a Tracker

The Improve AI Tracker is a scalable stack of serverless components that runs on AWS under your full control.

The Tracker provides three primary functions:

  • An HTTPS endpoint for tracking variants and rewards from client SDKs.
  • A store of logged variants and rewards on AWS S3.
  • Scheduling and configuration for one or more trainers to train updated models.

For now we suggest installing the gym by making a private fork of the repo. We are also considering packaging the gym as an NPM package or a Serverless Framework Plugin. Please send suggestions for deployment packaging to [email protected]

Install the Serverless Framework

$ npm install -g serverless

Install NPM Dependencies

$ npm install

Configure Tracker and Model Training

$ nano config/config.yml

Edit the organization and project name. AWS resource names depend on these values and must be globally unique.

organization: acme
project: demo

Paste your trainer image url from your trainer subscription.

  free: # ⬅️ !!! Subscribe at and paste image url
  pro: # ⬅️ !!! Subscribe at and paste image url

Configure the models to train


Deploy the Tracker

Deploy the tracker to a new dev stage in us-east-1

$ serverless deploy --stage dev
Deploying improveai-acme-demo to stage dev (us-east-1)

✔ Service deployed to stack improveai-acme-demo-dev (111s)


The output of the deployment will list the track endpoint URL like The track endpoint URL may be used directly by the client SDKs to track decisions and rewards. Alternately, a CDN or proxy may be configured in front of the track endpoint URL for greater administrative control.

Model Training

The deployment will create a models S3 bucket in the form of improveai-{organization}-{project}-{stage}-models. After each round of training, updated models are automatically uploaded to the models bucket.

The models bucket is private by default. Make the /models/latest/ directory public to serve models directly from S3. Alternatively, a CDN may be configured in front of the models S3 bucket.

Model URLs follow the template of https://{modelsBucket}{modelName}.{mlmodel|xgb}.gz. The Android and Python SDKs use .xgb.gz models and the iOS SDK uses .mlmodel.gz models.

Note: Until some decisions have been tracked, model training will fail. This is expected behavior.

Integrate a Client Library

Integrate a client library to make decisions and assign rewards.

See their individual documentation to get started:

Recent Posts