Jhbate/ai updates

@nicolashery @kentquirk