Skip to content
Back to skills

Rl Agent Zoo

ASecurity

"Implement SMARTS Agent policies, AgentSpec packages, versioned zoo

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 9, 2026
testingpythonapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill rl-agent-zoo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rl Agent Zoo?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rl Agent Zoo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-rl-agent-zoo/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-rl-agent-zoo)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rl-agent-zoo
description: "Implement SMARTS Agent policies, AgentSpec packages, versioned zoo
  locators, social-agent bubbles, and optional Ray/RLlib integrations without
  assuming optional training dependencies are installed."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# RL and agent zoo

Use this route when a user needs a SMARTS policy object, an installable agent
package, a registered locator, a social agent or bubble, or an RLlib/Ray
adapter. Keep core policy and registry work separate from the simulation
lifecycle route. Keep benchmark commands and full training runs reference-only.

## Capability and boundary

This route covers:

- `smarts.core.agent.Agent` policies and the `act(obs, **configs)` contract.
- `smarts.zoo.agent_spec.AgentSpec`, registry registration, dynamic module
  loading, and `make`/`make_agent`.
- Interface/action/observation alignment for an agent specification.
- `SocialAgentActor`, `BoidAgentActor`, `Bubble`, airlocks, and policy kwargs.
- The shape of an `RLlibHiWayEnv` configuration and Ray worker distribution.
- Safe, import-only validation of a locator with
  [the bundled checker](scripts/check_agent_locator.py).
- Packaging an inference policy for a zoo or benchmark consumer.

Do not use this route for Gym reset/step/close basics or general action and
observation catalogues; use `simulation-environments`. Use `cli-integrations`
for `scl zoo` and `scl benchmark` command details. Do not promise training,
checkpoint downloads, benchmark scores, or regression results.

## Fast decision path

1. Decide whether the deliverable is a core Python policy, an installed zoo
   package, a social/bubble actor, or an RLlib integration.
2. Implement and test the policy with a concrete `AgentInterface`. The policy
   must return an action accepted by that interface's action space.
3. Wrap the policy and interface in an `AgentSpec`; register a versioned name
   from an importable module. Run the locator checker before attempting a
   simulation.
4. If RLlib is requested, first probe `ray` and `ray.rllib`. They are optional,
   and are not installed in the prepared core environment. Do not import
   `RLlibHiWayEnv` as a core smoke test when Ray is absent.
5. For a benchmark deliverable, package inference code and its model/dependency
   contract, then route installation and benchmark invocation to
   `cli-integrations`.

## Runtime invariants

- A policy subclasses `Agent` and implements `act(self, obs, **configs)`.
  `Agent.from_function(callable)` is suitable for a tiny stateless policy.
- `AgentSpec(interface=..., agent_builder=..., agent_params=...)` describes
  both the simulator-facing interface and the policy constructor. The builder
  is a class or callable, not an already-built policy instance.
- `agent_params` are dispatched as no arguments for `None`, positional
  arguments for a list/tuple, keyword arguments for a dict, and one argument
  otherwise. `build_agent()` raises if the builder is absent or not callable.
- `AgentSpec` is cloudpickle-checked at construction. Keep builders, params,
  adapters, and model handles serializable when workers will be used.
- Locators use `module.importable:registered-name-vN` (or `-latest`), where the
  registered name includes the version suffix. A bare `registered-name-vN`
  works only after that name is already registered in the current process.
- A module locator causes SMARTS to import the module and expects that import
  to execute `register(...)`. Importability is therefore part of the package
  contract; installing a distribution alone is not proof of registration.
- `make(locator, **kwargs)` returns an `AgentSpec`; `make_agent(locator,
  **kwargs)` returns `(Agent, interface)` and applies kwargs to the registered
  factory. Use `make` when the interface/spec must be inspected first.
- Do not use the deprecated observation/action/reward/info adapters for new
  core code. They remain fields on the current `AgentSpec` for compatibility;
  RLlib's current adapter path may still exercise them, so keep any legacy use
  explicit and test it against the selected RLlib release.

## Checks before handing off

- Confirm `AgentInterface` and the policy's raw action agree. Check the
  environment's per-agent `action_space[agent_id].contains(action)` rather
  than relying on a model's declared shape.
- Confirm the policy's observation adapter output agrees with the declared
  model observation space, including dtype, bounds, keys, and array shape.
- Import the package module and run
  `scripts/check_agent_locator.py --locator module:agent-name-v0`.
  The checker only imports and inspects the registry; it never installs,
  constructs a model, trains, downloads a checkpoint, or starts a simulator.
- Build the `AgentSpec` and policy without a scenario first. Use a bounded
  simulation smoke only when a scenario is supplied and the lifecycle route
  owns that smoke.
- For Ray, validate worker configuration and serialization before attempting
  any long run. The optional framework status is `unverified` until the user
  supplies a compatible installed stack.

## Progressive references

- [AgentSpec and registry](references/agent-spec-and-registry.md) — exact
  interfaces, locator grammar, registration and construction patterns.
- [RL frameworks](references/rl-frameworks.md) — RLlibHiWayEnv, Ray workers,
  spaces, optional Torch/TensorFlow, and resume caveats.
- [Social agents and bubbles](references/social-agents-and-bubbles.md) — actor,
  boid, bubble, airlock, travel, and policy-kwargs rules.
- [Benchmark packaging](references/benchmark-packaging.md) — inference package
  layout, dependency/model contracts, and benchmark compatibility gates.
- [Troubleshooting](references/troubleshooting.md) — installation/import,
  optional dependencies, config/data, API/CLI mistakes, and workflow failures.

Files in this skill

  • SKILL.md5.8 KB
  • references/agent-spec-and-registry.md5.5 KB
  • references/benchmark-packaging.md3.9 KB
  • references/rl-frameworks.md6.3 KB
  • references/social-agents-and-bubbles.md4.3 KB
  • references/troubleshooting.md5.7 KB
  • scripts/check_agent_locator.py3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.