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.2.0.tar.gz (88.5 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.2.0-py3-none-any.whl (113.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agilerl_arena-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a2904ac9ce7edf9c5e131457763d8c2debf31ddc3e818aed8774e1839e96df5a
MD5 7d8f9c5c5880863fa7abc04620e5a28e
BLAKE2b-256 1d5b17126551c3007c050dd09d72a0dc67838d5fe3c227534e98a8e880b381bb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for agilerl_arena-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6eaedf6a8c5b932b920d9e88b585cd43ad96da4e740d6ce38f61c2282058e749
MD5 a1477ea588397a6048947e03eca90971
BLAKE2b-256 b20ea3b6fd587967869de6b8df946720367e79cea726bc7609f9b9172a265e07

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

0.9.0

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

This release

0.2.0 This release

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