Install and sign in

Install the arena command and the Python client, then sign in so they act as you in your organization.

Install

agilerl supports Python 3.10 to 3.13. From 3.0, agilerl is the Arena CLI and Python client. It no longer contains the open-source AgileRL reinforcement learning framework (agilerl 2.x), and installing it replaces that framework in the same environment.

Install the CLI with uv. uv tool install puts the arena command in its own environment, so it leaves an agilerl 2.x framework you have elsewhere alone:

uv tool install agilerl
arena --help

For the Python client inside a project, run uv add agilerl. That installs into the project’s environment, so in a project that uses the framework, keep it pinned to agilerl<3 and use the client from a separate project. If you don’t use uv, pip install -U agilerl in a new virtual environment still works.

Moving from agilerl-arena

agilerl replaces the agilerl-arena package. Both ship the arena command, so remove agilerl-arena before you install agilerl. If you installed it as a uv tool:

uv tool uninstall agilerl-arena && uv tool install agilerl

In a uv project:

uv remove agilerl-arena && uv add agilerl

If you installed it with pip, run this in the environment that has agilerl-arena. Uninstalling agilerl-arena removes the arena command; --force-reinstall puts it back even when agilerl is already installed. This replaces an agilerl 2.x framework in that environment.

pip uninstall -y agilerl-arena && pip install -U --force-reinstall agilerl

Then change Python imports from agilerl.arena to agilerl (from agilerl import ArenaClient).

Sign in

Sign in one of two ways:

  • arena login on a machine with a browser. Use this on your laptop.

  • ARENA_API_KEY where there is no browser: CI, scheduled jobs, remote machines and coding agents.

Sign in with the browser

arena login

The CLI opens a browser sign-in and saves the session in ~/.arena/credentials.json, so you sign in once per machine. One login is kept at a time: running arena login again replaces it, which is also how you switch user. arena logout clears it.

Run arena login again when a command fails with a sign-in error.

Sign in with an API key

Create a key in the web app under Settings → Profile management → CLI API key (steps in CLI API key), then export it wherever the CLI runs:

export ARENA_API_KEY='arena_pat_...'

The key acts as you, in the organization you have selected in the web app.

When ARENA_API_KEY is set, every command uses it, even after arena login. Unset it to go back to your browser session.

Sign in from Python

ArenaClient finds credentials the same way the CLI does: an api_key argument first, then ARENA_API_KEY, then the login saved by arena login.

from agilerl import ArenaClient

client = ArenaClient()                         # ARENA_API_KEY or the saved login
client = ArenaClient(api_key="arena_pat_...")  # an explicit key
client.login()                                 # browser sign-in, saved for later runs

The methods are listed in Python client.

Check you’re signed in

arena user profile

This prints your name and email. In Python, call client.get_current_user().

Upgrade

uv tool upgrade agilerl

With pip, run pip install -U agilerl instead.

When Arena needs a newer client than the one you have, the CLI offers to upgrade and then runs your command again. Set ARENA_AUTO_UPGRADE=1 to upgrade without the question, for example in CI. The automatic upgrade uses pip, which a uv tool environment doesn’t have, so if it fails there, run uv tool upgrade agilerl yourself.

Next

Each guide shows the CLI command next to the web app steps, and the command reference lists every command. To have a coding agent run them for you, see Using Arena from a coding agent.