Karotte is an open-source framework for building robust RL environments, made by Preference Model.
Learn about the why and what:
Documentation: karotte.dev
Karotte needs Python 3.12+ and uv. Runs go into a local
VM by default: Apple container on macOS, Firecracker on Linux.
--runtime modal runs them in a VM on Modal.
Local docker or podman work too.
See Installation
and Runtimes for what each needs.
uv tool install karotte
Create an environment from the default template and run its example task:
karotte create-env my_env
cd my_env
uv sync --extra dev
uv run setup_data.py
export ANTHROPIC_API_KEY=...
uv run karotte run --task example-task --model anthropic/claude-opus-5-5
karotte run builds the image, runs the task, and writes the transcript to
out/transcript.json. karotte dashboard out/ shows it. The
quick start explains each
step, and Writing tasks shows how
to add your own.
just lint
just test
just test-template default
Every merge to main is released. See
Developing Karotte.
Karotte is under the MIT license. The templates in
src/karotte/templates/ are under MIT No Attribution
(MIT-0), so environments created from them need no license notice.
Images built from the templates contain third-party software under its own
licenses. They are based on Amazon Linux 2023. The language-toolchains
template installs GPL and LGPL software (gcc, GnuCOBOL, GNU Prolog, Free Pascal,
the libraries bundled with Julia, and others), Amazon Corretto (GPL-2.0 with the
Classpath Exception) and Clojure (EPL-1.0) for the languages you enable. Mojo,
off by default, has its own license terms; check them for the version you
enable. If you distribute a built image, you're responsible for complying with
the licenses of the software in it.