Instructions to use ProKope-AI/ProKope-SafeAgent-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProKope-AI/ProKope-SafeAgent-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ProKope-AI/ProKope-SafeAgent-4B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ProKope-AI/ProKope-SafeAgent-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from ProKope-AI/ProKope-SafeAgent-4B: direct link, hf CLI and curl.
- Browser
- Download file 6.37 kB
-
https://huggingface.co/ProKope-AI/ProKope-SafeAgent-4B/resolve/main/README.md
- Command line
-
hf download hf://ProKope-AI/ProKope-SafeAgent-4B/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/ProKope-AI/ProKope-SafeAgent-4B/resolve/main/README.md
license: apache-2.0
library_name: transformers
pipeline_tag: text-classification
base_model: Qwen/Qwen3-4B
gated: manual
extra_gated_heading: Request Access to ProKope-SafeAgent-4B
extra_gated_description: >-
Access requests are reviewed manually by ProKope AI. Access is granted for
agent-safety research, guardrails evaluation, and production integration under
Apache-2.0.
extra_gated_prompt: >-
By requesting access to ProKope-SafeAgent-4B, you agree to evaluate and deploy
the model weights responsibly in accordance with Apache-2.0 license terms and
understand that results on safeagents-judge-bench are self-reported cleanly
under zero-leakage verification.
extra_gated_button_content: Request Access
extra_gated_fields:
Company or Institution: text
Corporate or Academic Email: text
Country: country
Intended Use:
type: select
options:
- Academic / Security Research
- Internal Enterprise Evaluation
- Red-Teaming / Benchmarking
- Production Agent Guardrail
Accept Responsible Use Terms: checkbox
language:
- en
tags:
- agent-safety
- safeagents
- system-one
- guardrail
- tool-call-safety
- decision-model
- text-classification
- prokope
- qwen3
datasets:
- ia03/terminal-bench
- IntelligenceLab/Long-Horizon-Terminal-Bench
ProKope-SafeAgent-4B™
Creator: Alan Canto (ProKope-AI)
Architecture: Qwen/Qwen3-4B dual-head System One safety decision model ([h_mean; h_last] -> binary allow/block head + 7-class misuse taxonomy head)
Benchmark Target: harness-hub/safeagents-judge-bench (Strict Zero-Overlap Clean-Room Build v6)
Key Results on harness-hub/safeagents-judge-bench (661 Calls)
Evaluated zero-shot across all 661 test calls (536 block, 125 allow) at the unmodified official threshold (0.50) using the systemone adapter (AutoModel.from_pretrained(..., trust_remote_code=True)):
| Model | Track | Balanced Acc ↑ | AUROC ↑ | False Block Rate ↓ | Recall ↑ | Precision ↑ | F1 ↑ | Cat Acc ↑ | Cat Macro-F1 ↑ | Traj Caught | Latency p50 ↓ |
|---|---|---|---|---|---|---|---|---|---|---|---|
ProKope-AI/ProKope-SafeAgent-4B (v6) |
Binary | 0.967 | 0.990 | 0.040 (5/125) |
0.974 | 0.991 | 0.982 | — | — | 81/82 | 0.143s |
ProKope-AI/ProKope-SafeAgent-4B (v6) |
Category | 0.956 | 0.991 | 0.024 (3/125) |
0.937 | 0.994 | 0.964 | 0.747 | 0.522 | 80/82 | 0.143s |
PromptforceAI/niti-gate-vegaml-4b (#1 LB) |
Binary | 0.905 | 0.957 | 0.072 | 0.882 | — | — | 0.729 (cat) | 0.497 | 78/82 | 0.41s |
Cloudflare/clef-flash |
Binary | 0.893 | 0.967 | 0.192 | 0.978 | 0.956 | 0.967 | 0.576 (cat) | 0.462 | 81/82 | 0.326s |
Cloudflare/clef-omni |
Binary | 0.877 | 0.946 | 0.160 | 0.914 | 0.961 | 0.937 | 0.564 (cat) | 0.437 | 81/82 | 0.285s |
vllm-sr/d3-mini |
Binary | 0.856 | 0.986 | 0.288 | 1.000 | 0.937 | 0.968 | 0.652 (cat) | 0.512 | 82/82 | 0.168s |
LiquidAI/d1-3B |
Binary | 0.836 | 0.946 | 0.008 | 0.681 | 0.997 | 0.809 | 0.457 (cat) | 0.328 | 68/82 | 0.035s |
TypeScript/FastBrain-9B |
Binary | 0.814 | 0.985 | 0.368 | 0.996 | 0.921 | 0.957 | 0.858 (cat) | 0.751 | 82/82 | 0.327s |
Cloudflare/clef |
Binary | 0.808 | 0.993 | 0.384 | 1.000 | 0.918 | 0.957 | 0.737 (cat) | 0.563 | 82/82 | 0.636s |
Adversarial Clean-Room & Zero-Overlap Verification
- Strict Multi-Granular Quarantine: Screened against all
661test calls and55tasks ofharness-hub/safeagents-judge-bench:task_idoverlap:0- exact /
120-char substringtask_textoverlap:0 - exact
>=25-chartool_argsoverlap:0 8-gramtask_text&8-gramtool_argsoverlap:0/013-gramstate/task overlap:0
- Template-Disjoint Validation & Label-Neutral Scanner Findings:
2,432train rows (154tasks,1,000uniqueArguments) /496val rows (29unseen tasks,288uniqueArguments),0train-vs-valArgumentsoverlap,0duplicates, and identical canonicalScanner findings:strings acrossallowandblock. - Counterfactual Stress Audit:
12/12pass on workspace-vs-verifier boundary inversions, comment-framing jailbreaks, missing findings, and long truncated payloads. - Training Footprint:
16.5MBF16 LoRA parameters (0.4089%of4.04B) + float32 heads merged to410bfloat16safetensors (0NaN,0Inf), trained on an RTX 5080 Laptop GPU (8.59 GBpeak VRAM).
Usage (systemone Adapter)
import torch
from transformers import AutoModel
model = AutoModel.from_pretrained(
"ProKope-AI/ProKope-SafeAgent-4B",
trust_remote_code=True,
dtype=torch.bfloat16,
).to("cuda").eval()
out = model.system_one(state=state_text, questions=questions)
p_block = out["answers"]["block"]["noul"]
category = out["answers"]["category"]["choice"]
Known Limitations
eval_gamingcredential/secret probes frequently collide withcredential_misuse(category_macro_f1 = 0.522), though binary gating catches81/82malicious trajectories with0.0median bad calls before catch.- Long prefixes (
>3,000chars) truncated by upstreambench/decide.pyforce reliance on static scanner findings for binary detection. - Scores recorded in
.eval_results/safeagents-judge-bench.yamlare self-reported using an exact local replica ofbench/decide.py+bench/run.py; official public ranking onharness-hub/safeagents-judge-benchawaits maintainer benchmark execution. - Intended strictly for sandboxed coding-agent tool-call gating; not a general-purpose chat guardrail.
Trademark & Attribution Notice (NOTICE)
ProKope-SafeAgent-4B™, ProKope™, ProKope AI™, AZAC™, and the ProKope™ model lineup (ProKope-421M™, ProKope-421M-8K™, ProKope-7B™, ProKope-VL-7B™, ProKope-4B-Eagle-Eye™, ProKope-Guard-8K™, ProKope-SafeAgent-4B™, ProKope-SecAudit-4B™) are common-law trademarks of Alan Canto / ProKope AI™. Any model or code license in this repository governs weights/code only and does not grant trademark rights.