Tool environments for the Agent Safety Bench (ASB) benchmark
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_safety_bench_envs-0.1.0.tar.gz.
File metadata
- Download URL: agent_safety_bench_envs-0.1.0.tar.gz
- Upload date:
- Size: 509.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b3d2bb112bf100c132e3734d131a201fb9b745ca2bcb5044073974b2820d3c4
|
|
| MD5 |
dec0b991b7ec4a7ce3d9cb05d65c231a
|
|
| BLAKE2b-256 |
d71b1d95b5996499857d0f8db5719c6842e18c76dfedc5f43e86bb5eaeaef83e
|
File details
Details for the file agent_safety_bench_envs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_safety_bench_envs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d98cc6097c53b1f505be1f28b8925779e9955662a227f40c79f125c52a62ed
|
|
| MD5 |
b34b84d640f27a117a3fa0a92d8c32bc
|
|
| BLAKE2b-256 |
ebe7756652f3aab9f7b8486476dd03f9a92114a0f878f00d6e6cab28eaa7ce1f
|