/agentbox:abx-reinforcement-learningfrom agentbox
Sets up and runs reinforcement learning rollouts on AgentBox using the E2B SDK. Handles pool sizing, template selection, and sandbox creation for RL training environments.
Ships in agentbox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
It is the only number that decides the whole shape of the answer, it is never in the question, and guessing it wastes the conversation: a pool sized for 8 when they wanted 200 looks like it worked right up until the run stalls.
Ask for peak concurrent sandboxes, not total episodes. People usually know the second and have to be walked to the first: 10,000 episodes at 64 in flight needs 64.
Two more defaults worth stating rather than deciding silently:
maxReplicas at their peak. A fixed pool
holds capacity between runs and bills for it; a group with a ceiling drains
and comes back.minReplicas to the steady-state floor when the run ramps faster
than the scale-up cooldown, so the autoscaler only handles the tail.abx provisions, the E2B SDK executes. You use abx once to make sure
there is capacity, and then your trainer talks E2B for the rest of the run.
trainer process AgentBox
├─ abx scale envs … pools … provision the pool once, up front
└─ e2b.Sandbox(...) × N claim / run / discard, per episode
Sandboxes are claimed from a warm pool, not built. That is why a rollout gets an environment in about a second instead of a minute, and it is also why the pool has to be the right size before the trainer starts.
Standard E2B — the platform serves the E2B-compatible API, so the SDK you would
already reach for works unchanged. The call's fields belong to that SDK, not to
this CLI: read them from the SDK source the image ships
(/opt/agentbox/source/sdk/) or the E2B spec beside it, rather than from a
sketch in a document.
Before the first sandbox, read where to point it. abx envs <env> docs prints
the env's documentation, rendered for its cluster: the E2B API URL, the
data-plane domain, and the scheme — the three things the SDK cannot guess and
will not complain about. Where more than one way in is offered, use the public
one unless the trainer runs inside the cluster. The key stays ${AGBX_API_KEY}
in that document; the SDK reads the same one from E2B_API_KEY.
from e2b import Sandbox
sbx = Sandbox.create("<env-name>", …) # the env name; the rest is the SDK's
result = sbx.commands.run("python solve.py")
sbx.kill()
Two things to carry over whatever the signature says: the template is the
env name (abx envs lists them), and tagging each sandbox is worth the
trouble — it is what tells two of them apart later, and abx sandboxes --wide
shows it. Both are the SDK's fields, so take their names from the SDK and not
from this line.
SWE ReX is deprecated — do not reach for it. E2B is the interface.
abx envs # what exists
abx envs <env> pools # idleReplicas is what you can claim now
abx instancetypes # shapes and relative cost
abx quotas # your ceiling
abx scale envs <env> pools <pool> --replicas 64
Then leave autoscaling on with a ceiling at your peak, so the pool drains between runs rather than holding capacity idle:
abx envs <env> scaling-groups <group> --editable > g.json
# edit it — the fields, and what each one does, are in:
# abx update envs <env> scaling-groups <group> --help
abx update envs <env> scaling-groups <group> -f g.json
update is a whole-object PUT, and --editable is the file it takes — the
object --json prints is a different document (nested under spec.*), and a
file built from it clears whatever it does not carry.
maxReplicas is a ceiling,
not a request. If the pool is stuck, reduce the replica target and grow
again — a pool asking for more than the cluster can place stays stuck
asking. See abx-resource-capacity.abx quotas. No pool setting fixes this.abx sandboxes <id> logs first; see abx-observe.Claims are served from idle Pods, so a trainer at steady state and an autoscaler
adjusting the pool do not fight — but a trainer that ramps faster than the
scale-up cooldown will see queueing. If the run's concurrency is known up front,
set the floor with minReplicas on the group and let the autoscaler only handle
the tail.
abx-resource-capacity — the full autoscaler model and the recovery procedureabx-harbor-framework — running an actual benchmark rather than free-form rolloutsabx-observe — logs, events and E2B-native metricsabx-common — endpoint, key, cluster, approvalWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub scitix/agent-sandbox --plugin agentbox9 skills in this plugin
/abx-commonHow to reach an AgentBox platform with `abx` — endpoint and key, choosing a cluster, machine-readable output, and what happens to a write that needs someone's approval. Use when any abx command fails on authentication, addresses the wrong cluster, or comes back asking for approval. Every other abx skill defers here for those four things./abx-harbor-frameworkRun Harbor benchmarks (Terminal-Bench, SWE-bench, custom datasets) on AgentBox pre-warmed pools via the agent-sandbox-harbor environment plugin. Use when asked to evaluate an agent, run a benchmark suite, reproduce a leaderboard number, or work out why benchmark tasks are being rejected or timing out. Pool sizing lives in abx-resource-capacity; endpoint and key in abx-common./abx-managed-agentGive your own agent a sandbox for its file and shell tools — the AgentBox hands bindings for Claude Agent SDK, OpenCode and generic MCP, plus the platform side that has to exist first. Use when asked to connect sandboxes to an existing agent or harness, to make an agent's work durable across restarts, or to integrate AgentBox into a product. Pool sizing lives in abx-resource-capacity./abx-observeWork out why an AgentBox sandbox, pool or environment is failing or slow — events, pool status, sandbox logs, and the E2B-native metrics endpoints. Use when a sandbox will not start, a pool sits below target, commands inside a sandbox fail, or someone asks how much CPU and memory sandboxes are using. Authentication and cluster selection live in abx-common./abx-resource-capacitySize AgentBox warm pools, configure autoscaling groups, read quota, and recover when a pool will not grow. Use when sandboxes queue or fail to start, when a pool sits below its target, when scaling is too slow or runs away, or when you need N concurrent sandboxes and must work out whether the capacity exists. Authentication and cluster selection live in abx-common./abx-sandbox-dockerRun Docker inside an AgentBox sandbox — building images, docker compose, and reaching an internal registry from in there. Use when a workload needs a container runtime of its own, when `docker` is not found inside a sandbox, or when someone asks about Docker-in-Docker isolation. Pool sizing lives in abx-resource-capacity.Other plugins' skills for the same job