Skip to main content

agilerl-arena

agilerl-arena is the standalone Arena SDK + CLI package for AgileRL.

It provides:

  • Python client for Arena workflows (auth, environment validation, experiment submission, deployment, inference)
  • arena CLI for scripting and CI usage
  • The training manifest schema (agilerl.arena.models): the Pydantic models every runtime trains from, plus arena manifest validate and arena manifest schema

This package is distributed independently from core agilerl, but exposes modules through the shared namespace:

from agilerl.arena import ArenaClient, Agent
from agilerl.arena.models import TrainingManifest

Core agilerl re-exports those models and adds only what a local run needs (environment construction, a buildable replay buffer).

Installation

Install the SDK and CLI on their own (no torch):

pip install agilerl-arena

Core agilerl depends on this package, so pip install agilerl includes it.

Quickstart

1) Authenticate

Preferred for CI/automation:

export ARENA_API_KEY="arena_pat_..."

Or interactive login:

arena login

2) Validate a training manifest

arena manifest validate path/to/manifest.yaml
arena manifest schema

3) Validate an environment

arena env validate --source path/to/my_env.py --name my-env

4) Check GPU memory (LLM manifests)

arena memory estimate path/to/manifest.yaml --gpu "NVIDIA L4"

# Longest context one dedicated L4 serving GPU can hold:
arena memory solve max_model_len --inference --gpu "NVIDIA L4" \
    --model Qwen/Qwen2.5-7B-Instruct

estimate is a pre-submission gate (exit 0 fits, 3 over budget, 2 usage error). solve holds every other input fixed and returns the largest value of one field. Install agilerl-arena[hub] unless you pass --config path/to/config.json. See agilerl/arena/memory/README.md.

5) Submit a training manifest

arena experiments submit path/to/manifest.yaml --project my-project

Python SDK example

from agilerl.arena import ArenaClient
from agilerl.arena.models import TrainingManifest

client = ArenaClient()  # uses ARENA_API_KEY if set

TrainingManifest.get_validated("dqn.yaml")

client.validate_environment(
    source="acrobot.py",
    name="acrobot-env",
)

result = client.submit_experiment(
    manifest="dqn.yaml",
    resource_id="arena-medium",
    project="my-project",
)

print(result)

Inference example

Inference uses the same credential as the rest of the CLI: a personal access token from Profile then CLI API key, or the token arena login stores. Agent picks up ARENA_API_KEY when you pass no api_key.

from agilerl.arena import Agent

agent = Agent("https://<deployment-id>.inference.agilerl.com", api_key="arena_pat_...")
action, _ = agent.get_action(observation)

Chat sessions

LLM deployments keep chat history, and the CLI keeps track of which conversation you are in. The first prompt starts one and later prompts carry on from it:

arena agent run my-chat-model
arena agent generate --prompt "My name is Sam."
arena agent generate --prompt "What is my name?"

Start a fresh conversation with --new-session, or end the current one with arena agent sessions clear so the next prompt starts anew.

To move between conversations, arena agent sessions resume lists what is stored and lets you pick one with the arrow keys:

arena agent sessions list                  # what is stored, current one marked
arena agent sessions resume                # arrow keys, Enter to pick
arena agent sessions get <session-id>      # read a transcript
arena agent sessions delete <session-id>   # remove one for good

Who a session belongs to follows the deployment's memory scope, chosen on the first deploy with arena agent deploy <experiment> --memory-scope user|organization. It defaults to user and cannot be changed later.

Notes on packaging and imports

  • Distribution name: agilerl-arena
  • Python import namespace: agilerl.arena
  • CLI command: arena

agilerl-arena and agilerl intentionally share the agilerl.* namespace as separate packages.

Metadata

Release files for agilerl-arena 1.25.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agilerl-arena 1.25.0
File Size Uploaded
agilerl_arena-1.25.0.tar.gz 198.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agilerl-arena 1.25.0
File Interpreter ABI Platform
agilerl_arena-1.25.0-py3-none-any.whl Python 3 none any Details

Total release size: 448.1 kB

Release files / agilerl_arena-1.25.0.tar.gz

Download URL agilerl_arena-1.25.0.tar.gz
Size 198.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e1f312dbe2bd6f795bb830d260dc8abc6f3a4345e82276dd8fb148239511ec4e
BLAKE2b-256 checksum
How to use checksums
9b12f8d5d666d99e817c17995be433c3853eca8a1e40b5d797ba87c607b3549d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / agilerl_arena-1.25.0-py3-none-any.whl

Download URL agilerl_arena-1.25.0-py3-none-any.whl
Size 249.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe735220c6f6b60b3103f0ed3ada33995f91fbfb411569e27ed6ad3cf5b09f9e
BLAKE2b-256 checksum
How to use checksums
f2c7375ea3c3941fec90a1971b2fc00aaf42da2ef8dbfb66132a5bf244b90d50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.26.1

2 release files

1.26.0

2 release files

This release

1.25.0 This release

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page