Skip to main content

JED: Replay-Based Security Benchmark for Tool-Using AI Agents

Python 3.11+ License: MIT PyPI version

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

  • SandboxEnv is the default environment for local evaluator runs.
  • GymAttackEnv is available when you explicitly pass --env gym for Kaggle-style parity.
  • Direct SandboxEnv(...) construction requires an explicit agent= instance.
  • aicomp test defaults to 1800 seconds for redteam, 1800 seconds for defense, and 3600 seconds total for dual (1800/1800 split).

Documentation

Repository Layout

License

MIT. See LICENSE.

Metadata

Release files for aicomp-sdk 3.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aicomp-sdk 3.1.2
File Size Uploaded Provenance
aicomp_sdk-3.1.2.tar.gz 521.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aicomp-sdk 3.1.2
File Interpreter ABI Platform
aicomp_sdk-3.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / aicomp_sdk-3.1.2.tar.gz

Download URL aicomp_sdk-3.1.2.tar.gz
Size 521.3 kB
Tags Source
SHA-256 checksum
How to use checksums
615030e19a2eb1ea62afa64f6530e6fc9263afe26b9abfd83fa554771111e1fd
BLAKE2b-256 checksum
How to use checksums
cf29157b24fe8cec6cc69a043dea5f9042ad3dd688455e7b570ab9c8102d1eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / aicomp_sdk-3.1.2-py3-none-any.whl

Download URL aicomp_sdk-3.1.2-py3-none-any.whl
Size 602.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa106658f18d7954ba0a2da468379e6dc7b25b1a3543ce30d3cc9109ae0b8e68
BLAKE2b-256 checksum
How to use checksums
eeb582108b7d295035aeed7699157c8da211b3b3c737faa5b2f061c0019a3146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for aicomp-sdk 3.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page