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
  • Lightweight manifest validation models for Arena job manifests

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

from agilerl.arena import ArenaClient, Agent

Installation

Install directly:

pip install agilerl-arena

Or install through core AgileRL extras:

pip install "agilerl[arena]"

Quickstart

1) Authenticate

Preferred for CI/automation:

export ARENA_API_KEY="arena_pat_..."

Or interactive login:

arena login

2) Validate an environment

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

3) Submit a training manifest

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

Python SDK example

from agilerl.arena import ArenaClient

client = ArenaClient()  # uses ARENA_API_KEY if set

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agilerl_arena-0.9.0.tar.gz (93.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agilerl_arena-0.9.0-py3-none-any.whl (119.2 kB view details)

Uploaded Python 3

File details

Details for the file agilerl_arena-0.9.0.tar.gz.

File metadata

  • Download URL: agilerl_arena-0.9.0.tar.gz
  • Upload date:
  • Size: 93.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

File hashes

Hashes for agilerl_arena-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e011bc86aeab961d6a5ff7069fe1507f16e0cdb28e7a95db702f9e1702dce413
MD5 bec8778f2117973f03c0f4c61f45501c
BLAKE2b-256 97e94afad7898d0426aff1b2300d3c5bfb6a5bd12c7f088e943055b3c69af43c

See more details on using hashes here.

File details

Details for the file agilerl_arena-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: agilerl_arena-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 119.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

File hashes

Hashes for agilerl_arena-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 321e976a17a4a246c9e4b67e1f4f5df2e1e89249bc132882b28257b245970a38
MD5 201b321cea27b255801e75520e77a612
BLAKE2b-256 a21903cc4726252f1dbaf836acc6e261df51ef8306140e68373350598fa614ae

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

This release

0.9.0 This release

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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