agent-safety-bench-envs
Tool environments for the Agent Safety Bench (ASB) benchmark. Each environment exposes a small set of mock tools (Python callables described by JSON schemas) that an LLM agent can call. ASB pairs these environments with prompts to evaluate agent safety under prompt-injection and other adversarial conditions.
The companion prompt dataset lives on the Hugging Face Hub:
aradhye/asb.
Install
pip install agent-safety-bench-envs
Quickstart
from asb_envs import EnvManager
mgr = EnvManager()
env = mgr.init_env("AccessControl_1", env_params=None)
print(env.tool_list)
print(env.get_tool_descs(["list_access_attempts"]))
result = env.call_tool("list_access_attempts", {})
print(result)
init_env(name, env_params) dynamically imports the env class and instantiates it.
Each env is a subclass of BaseEnv whose tools are auto-validated against the
{ClassName}.json schema shipped with the package.
Schema
Every env class has a sibling JSON file declaring its tools:
[
{
"name": "tool_name",
"description": "...",
"parameters": {
"type": "object",
"properties": { "...": { "type": "string" } },
"required": ["..."]
}
}
]
BaseEnv.call_tool(name, args) validates required params, coerces basic types, and
dispatches to the matching method on the env class.
Citation
If you use these environments, please cite the ASB paper (ICML 2026):
@inproceedings{asb2026,
title={...},
author={...},
booktitle={ICML},
year={2026}
}
License
Apache 2.0. The vendored functions_runtime.py is from
agentdojo and is MIT-licensed —
see NOTICE.
Release files for agent-safety-bench-envs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_safety_bench_envs-0.1.0.tar.gz | 509.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_safety_bench_envs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.6 MB
Release files / agent_safety_bench_envs-0.1.0.tar.gz
| Download URL | agent_safety_bench_envs-0.1.0.tar.gz |
|---|---|
| Size | 509.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b3d2bb112bf100c132e3734d131a201fb9b745ca2bcb5044073974b2820d3c4
|
|
BLAKE2b-256 checksum How to use checksums |
d71b1d95b5996499857d0f8db5719c6842e18c76dfedc5f43e86bb5eaeaef83e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / agent_safety_bench_envs-0.1.0-py3-none-any.whl
| Download URL | agent_safety_bench_envs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7d98cc6097c53b1f505be1f28b8925779e9955662a227f40c79f125c52a62ed
|
|
BLAKE2b-256 checksum How to use checksums |
ebe7756652f3aab9f7b8486476dd03f9a92114a0f878f00d6e6cab28eaa7ce1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|