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.8.0.tar.gz (92.3 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.8.0-py3-none-any.whl (116.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agilerl_arena-0.8.0.tar.gz
  • Upload date:
  • Size: 92.3 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.8.0.tar.gz
Algorithm Hash digest
SHA256 32efa9637f32a0e2d23480ea04d4c34bbcabc2692d66362b8d7a154426f376cb
MD5 61ec501b7f27d87d968a84d9f0cca844
BLAKE2b-256 a7483f6d919ce3c00b74e21c7a5277389393a7c28e507e86a3f06874996cd705

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agilerl_arena-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 116.8 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.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f53e7da5b1ce30953c00c29f797a875281c9a06cc4c456d81ef850386cd7dbe9
MD5 eabb3d14e3c885803743f1638c5592ce
BLAKE2b-256 9470395fa0bc432a9bc2a51c816da84df93a0ad892483e912f89f9ece3fe0bca

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

0.9.0

2 files

This release

0.8.0 This release

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