Deploy and invoke an agent¶
Deploy a trained checkpoint as an agent, then send a test prompt from the Arena UI, the Arena CLI tab, or Python.
Prerequisites¶
A successful training run with at least one checkpoint (view results).
Permission to create deployments in your organization.
1. Open Agents¶
Click Agents in the sidebar to open the Agents page. This page is where you can view available agents and deployments, deploy from checkpoints, and open deployment details to interact with agents after they are deployed.
Agents in the sidebar.¶
The Agents list.¶
2. Deploy from checkpoint¶
From a checkpoint or experiment results, start Deploy and confirm resource settings.
Starting deploy from a checkpoint.¶
3. Deployment detail¶
After deploy completes, open the agent detail view with tabs for chat, code samples, or status.
A deployed agent ready to test.¶
4. Invoke¶
Use the chat or invoke panel to send a prompt and read the model response.
Sending a test message to the agent.¶
5. Arena CLI tab¶
For LLM deployments, open Deployment code and switch to the Arena CLI tab.
The Arena CLI snippet on a deployed LLM agent.¶
The command is arena agent generate with the deployment name from the Agents list.
From the terminal¶
Install the CLI and sign in (Authentication):
pip install "agilerl[arena]"
arena login
# or: export ARENA_API_KEY=arena_pat_…
arena agent generate my-agent --prompt "Your prompt here"
The command streams the completion to your terminal. See Commands.
Python¶
from agilerl.arena import ArenaClient
with ArenaClient() as client:
with client.open_inference_agent("my-agent") as agent:
result = agent.generate("Your prompt here")
if result.results:
print(result.results[0].completion)
ArenaClient() uses your arena login session, or ARENA_API_KEY when that variable is set.