AI Agent Security Competition SDK - Red teaming framework for tool-using AI agents
Project description
JED: Replay-Based Security Benchmark for Tool-Using AI Agents
JED is a Python SDK and benchmark for evaluating tool-using agents under adversarial pressure.
It supports three package workflows:
- attack-only evaluation
- guardrail-only evaluation
- combined attack+defense evaluation
Documentation: https://mbhatt1.github.io/competitionscratch/
Choose Your Workflow
Use aicomp evaluate when you want the scorer-style public interface and stable machine-readable artifacts.
Use aicomp test when you are iterating locally and want run history, compare, and visualize.
| Workflow | Submission | Primary entrypoint | Default env | Output |
|---|---|---|---|---|
| Kaggle red-team | attack.py |
aicomp evaluate redteam |
sandbox |
normalized attack score |
| Package attack-only | attack.py |
aicomp test redteam |
sandbox |
normalized attack score |
| Package guardrail-only | guardrail.py |
aicomp test defense |
sandbox |
defense score |
| Package dual-track | submission.zip with attack.py and guardrail.py |
aicomp test dual |
sandbox |
attack + defense |
The public Kaggle competition uses the attack-only path. The package itself supports all three workflows.
Install
From PyPI:
pip install aicomp-sdk
From source:
git clone https://github.com/mbhatt1/competitionscratch.git
cd competitionscratch
pip install -e .
Quick Start: Attack-Only
Generate a starter submission:
aicomp init attack
aicomp validate redteam attack.py
aicomp test redteam attack.py --budget-s 60 --agent deterministic
Run the standalone public-path scorer locally:
aicomp evaluate \
redteam \
attack.py \
--budget-s 60 \
--agent deterministic \
--env gym
attack.py must define AttackAlgorithm, inherit from AttackAlgorithmBase, and return list[AttackCandidate].
If you want CLI behavior that matches the public Kaggle default more closely, use aicomp evaluate redteam attack.py --env gym.
The standalone evaluator defaults to a short terminal summary. Use --verbosity progress for package-owned progress messages. Add --save-transcript, --save-framework-events, and --save-agent-debug when you want transcript.log, framework.jsonl, and agent-debug.jsonl written under --artifacts-dir.
aicomp test keeps its explicit-path diagnostics flags: --transcript-file, --event-log-file, and --agent-debug-jsonl.
Other Supported Package Workflows
Guardrail-only:
aicomp init guardrail
aicomp validate defense guardrail.py
aicomp test defense guardrail.py --budget-s 60 --agent deterministic
Dual-track:
zip submission.zip attack.py guardrail.py
aicomp test dual submission.zip --budget-s 60 --agent deterministic
aicomp evaluate dual submission.zip --budget-s 60 --agent deterministic --env sandbox
How Scoring Works
Attack scoring is replay-based. The evaluator replays each returned AttackCandidate and recomputes:
- the trace
- triggered predicates
- the cell signature
- the final score
The public Kaggle leaderboard uses normalized attack score only. Package guardrail-only and dual-track workflows also expose defense scoring.
SDK Notes
SandboxEnvis the default environment for local evaluator runs.GymAttackEnvis available when you explicitly pass--env gymfor Kaggle-style parity.- As of
2.0.0, directSandboxEnv(...)construction requires an explicitagent=instance. aicomp testdefaults to3600seconds total because it supports all three package workflows. That means3600attack seconds forredteam,3600defense seconds fordefense, and1800/1800fordual.
Documentation
docs/GETTING_STARTED.mddocs/KAGGLE_REDTEAM_GUIDE.mddocs/GUARDRAILS_GUIDE.mddocs/SCORING.mddocs/API_REFERENCE.md
Repository Layout
aicomp_sdk/- package codeexamples/- runnable examplestests/- unit and integration tests
License
MIT. See LICENSE.
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 aicomp_sdk-2.2.0.tar.gz.
File metadata
- Download URL: aicomp_sdk-2.2.0.tar.gz
- Upload date:
- Size: 518.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac3662d7588bdf20f7d7134ebf9c1c35a5ee5158b0ae83a6c3ccd3a8f2d7332
|
|
| MD5 |
7aa49b96848a289c22ece24a1d99213e
|
|
| BLAKE2b-256 |
4cc5d3eda7ed4fbd6473f50d6ef6927234e20c9191859e3ef052379221b25ddc
|
File details
Details for the file aicomp_sdk-2.2.0-py3-none-any.whl.
File metadata
- Download URL: aicomp_sdk-2.2.0-py3-none-any.whl
- Upload date:
- Size: 593.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1fd2320c19855d8800e4999c96f4e2c2f7f81b89a787995fc19f853b02f74c2
|
|
| MD5 |
da224b6666190b8a9fe28f5cf22af315
|
|
| BLAKE2b-256 |
3dfea7be8502c89ba7df3613ae7063f96bafa114d99443f4983c857e4d25086d
|