# Karotte

> Open-source Python framework for building robust reinforcement learning environments to train aligned AI.

Karotte is an open-source framework from Preference Model for building RL environments to train aligned AI. It is installed as a Python tool with uv and runs tasks against a model, writing a transcript of each run. The project is released under the MIT license.

## What It Is

Karotte is a framework for creating and running RL environments. Users scaffold an environment from a template, define tasks and steps, and run them against a model. The repository describes it as a framework for building robust RL environments to train aligned AI.

## How a Run Works

The quick start creates an environment from the default template with `karotte create-env`, syncs dependencies with uv, and prepares data with a setup script. `karotte run` then builds the image, runs the chosen task against a specified model (the example uses an Anthropic model via an API key), and writes the transcript to `out/transcript.json`. `karotte dashboard out/` displays the transcript.

## Runtimes and Setup

Karotte requires Python 3.12+ and uv. Runs go into a VM by default: Apple `container` on macOS and Firecracker on Linux, with docker or podman also supported. Images built from the templates are based on Amazon Linux 2023. The `language-toolchains` template installs additional language toolchains for the languages a user enables.

## Licensing Notes

The framework is MIT licensed, and the bundled templates are MIT No Attribution, so environments created from them need no license notice. Built images contain third-party software under its own licenses, and anyone distributing a built image is responsible for complying with them.

## Features
- Create environments from templates with karotte create-env
- Define tasks and steps
- Run tasks against a chosen model with karotte run
- Transcript output to out/transcript.json
- Dashboard for viewing transcripts
- VM-based isolated runs (Apple container, Firecracker, docker, podman)
- language-toolchains template for multiple languages

## Integrations
Anthropic, Docker, Podman, Firecracker, Apple container, uv

## Platforms
MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Links
- Website: https://github.com/preferencemodel/karotte
- Documentation: https://karotte.dev
- Repository: https://github.com/preferencemodel/karotte
- EveryDev.ai: https://www.everydev.ai/tools/karotte
