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

Uploaded Python 3

File details

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

File metadata

  • Download URL: agilerl_arena-0.3.0.tar.gz
  • Upload date:
  • Size: 88.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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.3.0.tar.gz
Algorithm Hash digest
SHA256 98b245536de1bb7f61202f4ad5f5a4563100e9879d0eeed03a87e1779f59d0e9
MD5 09ada3b6373b364bcf67911739cfaecf
BLAKE2b-256 490e42f933a4ff840e89f2b2b22df1d1b17840cc3aa4db79f262cbc6b8b31dcc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agilerl_arena-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 113.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2411b2e058fdfe4db848146a255e3944dbd2faa87ec9fbee32b99fda63c24c
MD5 7b52b68b57a7e23b9cfacf77fb75710b
BLAKE2b-256 82653e411e48a5345265a0c4943936c0599d6739490e01eaa5a4202644a94726

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

This release

0.3.0 This release

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