This is the defender which helps to defense input injection on interactionguard_testbed repo.
Python
0
2 commits
updated Sep 30, 2026
Multi-Layer Security for LLM Agents
This repository implements a research-oriented defense framework for LLM-based agents against:
The system combines three layers:
It also includes:
interactionguard_defense/
├── config/ # YAML + Python configuration
│ ├── detection_config.yaml # layer thresholds, model paths, layer3 variant selection
│ ├── test_modes.yaml # the 9 supported detection modes (1,2,3,10-15)
│ └── std_testing/ # per-trial config snapshots generated by Std Testing
├── data/
│ ├── raw/ # raw trace JSONL files (gitignored, must be supplied)
│ ├── splits/ # train/val/test trace splits (generated)
│ ├── processed/ # prefix-expanded processed samples (generated)
│ ├── data_split.py # raw -> splits
│ └── data_preprocess.py # splits -> processed
├── eval/ # ASR evaluation scripts (with/without defense, baseline)
├── experiments/ # sweeps and comparison experiments
│ └── std_testing/ # multi-seed retraining + error-bar reporting
├── models/
│ ├── detectors/ # Layer 1 / 2 / 3 detector implementations + pipeline
│ ├── baseline/ # RAGuard / Sentinel / Tool Result Parsing baselines
│ ├── layer1/, layer2/, layer3/ # trained checkpoints (gitignored, must be trained/supplied)
│ └── std_testing/ # multi-seed retrained checkpoints (gitignored)
├── results/ # detection outputs, sweep outputs, figures (gitignored)
├── scripts/ # menu-wired utility scripts (isolation sweeps, backups)
│ └── standalone/ # standalone research scripts not wired into main.py
├── training/ # training scripts for Layer 1 / Layer 2 / Layer 3
├── utils/ # data, metrics, plotting, menu helpers
└── main.py # main interactive entry point
The codebase follows this high-level workflow:
data/raw/*.jsonl (see the schema note below).data/data_split.py creates train/val/test splits in data/splits/.data/data_preprocess.py expands each trace into one or more prefix-level sequence samples in data/processed/.models/layer1/ and models/layer2/.main.py runs detection, baseline tests, ASR analysis, and figure generation.data/raw/*.jsonl)Five files are required, with these exact names:
benign_traces.jsonl
prompt_injection_traces.jsonl
rag_poison_traces.jsonl
tool_injection_traces.jsonl
correlated_injection_traces.jsonl
Each line is one JSON trace. The required field is reasoning_steps: an
ordered list of step dicts. Recognized node values are retrieve, agent,
and tools — a tool-call step's tool name is carried in a separate "tool"
field, not encoded into node itself:
{"node": "tools", "type": "tool", "content": "...", "tool": "read_docx"}
label (0/1) and attack_type are optional per-record — if omitted,
data_split.py fills them in based on which file the record came from.
Generating these files: raw traces are produced by a separate
data-generation testbed, not by this repository —
interactionguard_testbed.
It runs a real LangGraph tool-using agent (RAG + Gmail + file tools) under
benign traffic and three attack families (RAG poisoning, tool-output
injection, correlated multi-channel), and its data/traces/*.jsonl output
maps directly, file-for-file, onto the five files listed above — copy them
over unchanged (see that repo's "Output Contract for Downstream Consumers"
section for the exact mapping and schema notes).
Processed samples use a sequence format such as:
[PROMPT]
...
[SEP]
[RETRIEVE]
...
[SEP]
[TOOL: get_information]
...
[SEP]
[AGENT]
...
[EOS]
The detection pipeline supports 9 modes from config/test_modes.yaml:
| Mode | Name | Description |
|---|---|---|
1 | layer1_only | Layer 1 alone |
2 | layer2_only | Layer 2 alone |
3 | layer3_only | Layer 3 alone |
10 | layer1_to_layer2 | L1 -> L2 (2-layer pipeline) |
11 | layer1_to_layer2_to_layer3 | L1 -> L2 -> L3 (full 3-layer pipeline) |
12 | layer2_to_layer1_to_layer3 | L2 -> L1 -> L3 |
13 | layer1_to_layer3 | L1 -> L3 |
14 | layer2_to_layer3 | L2 -> L3 |
15 | layer2_to_layer1 | L2 -> L1 |
Important:
10 and 15 are 2-layer pipelines; 11 and 12 are the full 3-layer pipelines.11 (or 12
for the alternate ordering).models/detectors/layer3_detector_o2.py). A separate
layer3orig implementation (models/detectors/layer3_detector.py) exists as
a legacy fallback but is not part of any reported experiment.This section states what each layer's decision threshold is for, so a
reproduction attempt uses the right value. It intentionally does not include
any measured results — see config/detection_config.yaml for the live values
and the Std Testing feature (below) for how to characterize run-to-run
variance instead of relying on a single number.
| Layer | Config key | Purpose |
|---|---|---|
| Layer 1 (AutoEncoder) | layers.layer1.params.threshold | Cutoff on reconstruction error: above this, a sample is escalated as suspicious. |
| Layer 2 (DeBERTa) | layers.layer2.params.threshold | Cutoff on the classifier's malicious-class probability. |
| Layer 3 (O2) | layers.layer3o2.params.threshold | Cutoff on the LLM auditor's malicious-confidence score. |
Notes:
config/detection_config.yaml and can be
edited directly; no code changes are needed to try a different value.layers.layer3_variant (near the top of config/detection_config.yaml) is
an optional global override for any mode that uses the logical layer3
key. Leave it unset for the default (resolves to O2), or set it to orig
to use the legacy implementation instead.Training -> Fine-tune Layer 2 model) always
excludes attack_type == "correlated" from both train and validation, by
design — this is not configurable from the menu.Create a Python environment and install dependencies:
pip install -r requirements.txt
Recommended:
openai, python-dotenv)Create a .env file in the project root (not tracked by git). Variables
actually read by this codebase (os.getenv(...)):
# Layer 3 (O2) and other OpenRouter-backed LLM calls
OPENROUTER_API_KEY=...
OPENROUTER_MODEL=openai/gpt-4.1-mini
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Used by some evaluation scripts (e.g. no-defense prompt-injection judging)
OPENAI_API_KEY=...
# GPU selection
CUDA_DEVICE_ML=0 # device index (or "cpu") for Layer 1 / Layer 2
CUDA_DEVICE_LLM=0 # device index for local Layer 3 LLM fine-tuning, if used
# Tool Result Parsing baseline behavior
TOOL_RESULT_EXTRACT_METHOD_LIST=ParseData,CheckTool
TOOL_RESULT_EXTRACT_PARSE_DATA_FULL_CONVERSATION=False
TOOL_RESULT_EXTRACT_CHECK_TOOL_FILTER=True
Notes:
layer3_variant: orig) read
their base_url/model from config/detection_config.yaml instead of .env.Launch the interactive menu:
python main.py
main.py's top-level menu:
AGENT DEFENSE SYSTEM
1) Defense pipeline
2) Baselines
3) Evaluations
4) Figures
5) Training and threshold tools
6) Sweeps
7) Guided workflows
8) Documentation and about
9) Backup current results
10) Data preparation
0) Exit
1 Defense pipelinelayer3 key, lets you pick a Layer 3
variant (default resolves to O2).data/processed/test_processed.jsonl and saves the output to
results/mode_<id>_results.json.Use this when you want raw detection results for one pipeline mode, e.g. you
need mode_11_results.json for full 3-layer ASR evaluation.
2 Baselinesdata/splits/test.jsonl and writes
models/baseline/<name>_predictions.jsonl, <name>_metrics.json,
<name>_thresholds.json.models/baseline/combined_predictions.jsonl.3 Evaluationseval/eval_asr_without_defense.json
(no-defense ASR for prompt, rag, tool, correlated). Depends on the
prompt-attack judging step above having been run at least once.eval/eval_asr_within_defense.json and
eval/eval_asr_within_baseline.json. The 3-layer part expects
results/mode_11_results.json to already exist; the baseline part expects
the baseline prediction files to already exist.4 Figuresresults/ from
whatever evaluation/result files already exist. It does not re-run any
detector itself.5 Training and threshold toolscorrelated from train/val)6 Sweeps6 -> 8 Std Testing (multi-seed L1/L2 retraining, error bars for Table 6.4)This feature exists specifically because a single training run's point estimate is not, by itself, a reliable number to report (see "Threshold Reference" above). It retrains Layer 1 and Layer 2 with several random seeds (same data split, same hyperparameters) and evaluates all 9 modes per seed:
models/std_testing/trial<i>_seed<seed>/.results/std_testing/trial<i>_seed<seed>/.results/std_testing/summary.json /
summary.csv (mean ± std per metric per mode) from whatever trial results
already exist, without re-running anything.summary.json.Phase 1 and Phase 2 are resumable: each skips a trial/mode combination whose
output already exists, unless that mode ID is listed under
std_testing_invalidated_modes in config/detection_config.yaml (used to
force re-evaluation after a config value such as a threshold has changed).
7 Guided workflowsPre-composed sequences of the steps above for common tasks — see "Common Workflows" below for the exact menu paths.
8 Documentation and aboutIn-app reference text (introduction, workflow guide, author note, quick reference) — useful as a quick refresher without leaving the terminal.
9 Backup current resultsArchives the current results/ directory into a timestamped zip under
backups/ (via scripts/backup_current_results.sh).
10 Data preparationdata/rawdata/splitsEach option asks for a YES confirmation before overwriting, since it
regenerates files other steps depend on.
Menu paths below use the notation top-level -> submenu choice.
1 -> 1 (Interactive mode picker) -> enter 11
Result: creates results/mode_11_results.json.
2 -> 1, 2 -> 2, 2 -> 3, then 2 -> 4 for the merged baseline.
3 -> 4
Use this after raguard_predictions.jsonl, tool_result_parsing_predictions.jsonl,
sentinel_predictions.jsonl, or combined_predictions.jsonl changed.
7 -> 4 (Guided workflows -> "Generate Issue 3 ASR line chart from ready outputs")
This is the shortest path only if results/mode_11_results.json and
eval/eval_asr_without_defense.json already exist.
7 -> 5 (Guided workflows -> "Generate Issue 3 ASR line chart from scratch")
This runs, in order: no-defense prompt judging -> no-defense ASR for all attacks -> mode 11 -> combined baseline -> defense/baseline ASR evaluation -> figure generation.
2 -> 2, 2 -> 4, 3 -> 4, 4 -> 1
6 -> 8 -> 1 (Std Testing Phase 1), then 6 -> 8 -> 2 (Phase 2), then
6 -> 8 -> 3 (Aggregate), then 6 -> 8 -> 4 (Generate figures).
6 -> 1 or 6 -> 2 (choose mode 11 or 12 when prompted), then 4 -> 1.
results/mode_<id>_results.json for each mode you have run (1, 2, 3, 10-15)models/baseline/raguard_predictions.jsonlmodels/baseline/tool_result_parsing_predictions.jsonlmodels/baseline/sentinel_predictions.jsonlmodels/baseline/combined_predictions.jsonleval/eval_asr_without_defense.jsoneval/eval_asr_within_defense.jsoneval/eval_asr_within_baseline.jsonresults/std_testing/summary.json, summary.csvresults/std_testing/issue1_precision_recall_latency_chart_with_error_bars.pngExamples:
results/issue3_ASRline_chart.pngissue3_ASRline does not read models/baseline/tool_result_parsing_metrics.json
directly — it reads eval/eval_asr_within_baseline.json. After changing a
baseline prediction file, re-run baseline evaluation before regenerating figures.11, not mode 10.results/mode_2_results.json) reflect exactly
one trained checkpoint. They are useful as a sanity check that the pipeline
runs end-to-end, but should not be treated as the precise, reproducible
number for any layer whose model is retrained — use Std Testing's mean ± std
for that instead.data/raw/, data/splits/, data/processed/, models/layer1/,
models/layer2/, models/layer3/, models/std_testing/, and results/
are all gitignored. Cloning this repository gives you the code only — raw
traces, trained checkpoints, and prior results must be supplied or
regenerated separately.Primary entry:
python main.py
Data processing (equivalent to menu 10 -> 3):
python -m data.data_split
python -m data.data_preprocess
2026-09-30: active development moved to a new, cleaned-up repository:
https://github.com/MinhBang1000/interactionguard_defense. The previous
repository (agent_defense, pushed to https://github.com/MinhBang1000/agent_eval.git)
is frozen at its last commit and kept only as a historical archive of the full
development process (all AE_000* branches, experimental Layer 3 variants,
Dojo integration work, etc.). Its origin remote was intentionally removed
(git remote remove origin) to prevent accidental pushes here.
To recover the link to the old GitHub remote if ever needed:
git remote add origin https://github.com/MinhBang1000/agent_eval.git
This is a research codebase rather than a production package. Some scripts
under scripts/standalone/ are experimental or exploratory and are not wired
into main.py — run them directly with python -m if needed. The menu
reference above is the safest way to operate the repository consistently.
This is the defender which helps to defense input injection on interactionguard_testbed repo.
Python
0
2 commits
updated Sep 30, 2026
Multi-Layer Security for LLM Agents
This repository implements a research-oriented defense framework for LLM-based agents against:
The system combines three layers:
It also includes:
interactionguard_defense/
├── config/ # YAML + Python configuration
│ ├── detection_config.yaml # layer thresholds, model paths, layer3 variant selection
│ ├── test_modes.yaml # the 9 supported detection modes (1,2,3,10-15)
│ └── std_testing/ # per-trial config snapshots generated by Std Testing
├── data/
│ ├── raw/ # raw trace JSONL files (gitignored, must be supplied)
│ ├── splits/ # train/val/test trace splits (generated)
│ ├── processed/ # prefix-expanded processed samples (generated)
│ ├── data_split.py # raw -> splits
│ └── data_preprocess.py # splits -> processed
├── eval/ # ASR evaluation scripts (with/without defense, baseline)
├── experiments/ # sweeps and comparison experiments
│ └── std_testing/ # multi-seed retraining + error-bar reporting
├── models/
│ ├── detectors/ # Layer 1 / 2 / 3 detector implementations + pipeline
│ ├── baseline/ # RAGuard / Sentinel / Tool Result Parsing baselines
│ ├── layer1/, layer2/, layer3/ # trained checkpoints (gitignored, must be trained/supplied)
│ └── std_testing/ # multi-seed retrained checkpoints (gitignored)
├── results/ # detection outputs, sweep outputs, figures (gitignored)
├── scripts/ # menu-wired utility scripts (isolation sweeps, backups)
│ └── standalone/ # standalone research scripts not wired into main.py
├── training/ # training scripts for Layer 1 / Layer 2 / Layer 3
├── utils/ # data, metrics, plotting, menu helpers
└── main.py # main interactive entry point
The codebase follows this high-level workflow:
data/raw/*.jsonl (see the schema note below).data/data_split.py creates train/val/test splits in data/splits/.data/data_preprocess.py expands each trace into one or more prefix-level sequence samples in data/processed/.models/layer1/ and models/layer2/.main.py runs detection, baseline tests, ASR analysis, and figure generation.data/raw/*.jsonl)Five files are required, with these exact names:
benign_traces.jsonl
prompt_injection_traces.jsonl
rag_poison_traces.jsonl
tool_injection_traces.jsonl
correlated_injection_traces.jsonl
Each line is one JSON trace. The required field is reasoning_steps: an
ordered list of step dicts. Recognized node values are retrieve, agent,
and tools — a tool-call step's tool name is carried in a separate "tool"
field, not encoded into node itself:
{"node": "tools", "type": "tool", "content": "...", "tool": "read_docx"}
label (0/1) and attack_type are optional per-record — if omitted,
data_split.py fills them in based on which file the record came from.
Generating these files: raw traces are produced by a separate
data-generation testbed, not by this repository —
interactionguard_testbed.
It runs a real LangGraph tool-using agent (RAG + Gmail + file tools) under
benign traffic and three attack families (RAG poisoning, tool-output
injection, correlated multi-channel), and its data/traces/*.jsonl output
maps directly, file-for-file, onto the five files listed above — copy them
over unchanged (see that repo's "Output Contract for Downstream Consumers"
section for the exact mapping and schema notes).
Processed samples use a sequence format such as:
[PROMPT]
...
[SEP]
[RETRIEVE]
...
[SEP]
[TOOL: get_information]
...
[SEP]
[AGENT]
...
[EOS]
The detection pipeline supports 9 modes from config/test_modes.yaml:
| Mode | Name | Description |
|---|---|---|
1 | layer1_only | Layer 1 alone |
2 | layer2_only | Layer 2 alone |
3 | layer3_only | Layer 3 alone |
10 | layer1_to_layer2 | L1 -> L2 (2-layer pipeline) |
11 | layer1_to_layer2_to_layer3 | L1 -> L2 -> L3 (full 3-layer pipeline) |
12 | layer2_to_layer1_to_layer3 | L2 -> L1 -> L3 |
13 | layer1_to_layer3 | L1 -> L3 |
14 | layer2_to_layer3 | L2 -> L3 |
15 | layer2_to_layer1 | L2 -> L1 |
Important:
10 and 15 are 2-layer pipelines; 11 and 12 are the full 3-layer pipelines.11 (or 12
for the alternate ordering).models/detectors/layer3_detector_o2.py). A separate
layer3orig implementation (models/detectors/layer3_detector.py) exists as
a legacy fallback but is not part of any reported experiment.This section states what each layer's decision threshold is for, so a
reproduction attempt uses the right value. It intentionally does not include
any measured results — see config/detection_config.yaml for the live values
and the Std Testing feature (below) for how to characterize run-to-run
variance instead of relying on a single number.
| Layer | Config key | Purpose |
|---|---|---|
| Layer 1 (AutoEncoder) | layers.layer1.params.threshold | Cutoff on reconstruction error: above this, a sample is escalated as suspicious. |
| Layer 2 (DeBERTa) | layers.layer2.params.threshold | Cutoff on the classifier's malicious-class probability. |
| Layer 3 (O2) | layers.layer3o2.params.threshold | Cutoff on the LLM auditor's malicious-confidence score. |
Notes:
config/detection_config.yaml and can be
edited directly; no code changes are needed to try a different value.layers.layer3_variant (near the top of config/detection_config.yaml) is
an optional global override for any mode that uses the logical layer3
key. Leave it unset for the default (resolves to O2), or set it to orig
to use the legacy implementation instead.Training -> Fine-tune Layer 2 model) always
excludes attack_type == "correlated" from both train and validation, by
design — this is not configurable from the menu.Create a Python environment and install dependencies:
pip install -r requirements.txt
Recommended:
openai, python-dotenv)Create a .env file in the project root (not tracked by git). Variables
actually read by this codebase (os.getenv(...)):
# Layer 3 (O2) and other OpenRouter-backed LLM calls
OPENROUTER_API_KEY=...
OPENROUTER_MODEL=openai/gpt-4.1-mini
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# Used by some evaluation scripts (e.g. no-defense prompt-injection judging)
OPENAI_API_KEY=...
# GPU selection
CUDA_DEVICE_ML=0 # device index (or "cpu") for Layer 1 / Layer 2
CUDA_DEVICE_LLM=0 # device index for local Layer 3 LLM fine-tuning, if used
# Tool Result Parsing baseline behavior
TOOL_RESULT_EXTRACT_METHOD_LIST=ParseData,CheckTool
TOOL_RESULT_EXTRACT_PARSE_DATA_FULL_CONVERSATION=False
TOOL_RESULT_EXTRACT_CHECK_TOOL_FILTER=True
Notes:
layer3_variant: orig) read
their base_url/model from config/detection_config.yaml instead of .env.Launch the interactive menu:
python main.py
main.py's top-level menu:
AGENT DEFENSE SYSTEM
1) Defense pipeline
2) Baselines
3) Evaluations
4) Figures
5) Training and threshold tools
6) Sweeps
7) Guided workflows
8) Documentation and about
9) Backup current results
10) Data preparation
0) Exit
1 Defense pipelinelayer3 key, lets you pick a Layer 3
variant (default resolves to O2).data/processed/test_processed.jsonl and saves the output to
results/mode_<id>_results.json.Use this when you want raw detection results for one pipeline mode, e.g. you
need mode_11_results.json for full 3-layer ASR evaluation.
2 Baselinesdata/splits/test.jsonl and writes
models/baseline/<name>_predictions.jsonl, <name>_metrics.json,
<name>_thresholds.json.models/baseline/combined_predictions.jsonl.3 Evaluationseval/eval_asr_without_defense.json
(no-defense ASR for prompt, rag, tool, correlated). Depends on the
prompt-attack judging step above having been run at least once.eval/eval_asr_within_defense.json and
eval/eval_asr_within_baseline.json. The 3-layer part expects
results/mode_11_results.json to already exist; the baseline part expects
the baseline prediction files to already exist.4 Figuresresults/ from
whatever evaluation/result files already exist. It does not re-run any
detector itself.5 Training and threshold toolscorrelated from train/val)6 Sweeps6 -> 8 Std Testing (multi-seed L1/L2 retraining, error bars for Table 6.4)This feature exists specifically because a single training run's point estimate is not, by itself, a reliable number to report (see "Threshold Reference" above). It retrains Layer 1 and Layer 2 with several random seeds (same data split, same hyperparameters) and evaluates all 9 modes per seed:
models/std_testing/trial<i>_seed<seed>/.results/std_testing/trial<i>_seed<seed>/.results/std_testing/summary.json /
summary.csv (mean ± std per metric per mode) from whatever trial results
already exist, without re-running anything.summary.json.Phase 1 and Phase 2 are resumable: each skips a trial/mode combination whose
output already exists, unless that mode ID is listed under
std_testing_invalidated_modes in config/detection_config.yaml (used to
force re-evaluation after a config value such as a threshold has changed).
7 Guided workflowsPre-composed sequences of the steps above for common tasks — see "Common Workflows" below for the exact menu paths.
8 Documentation and aboutIn-app reference text (introduction, workflow guide, author note, quick reference) — useful as a quick refresher without leaving the terminal.
9 Backup current resultsArchives the current results/ directory into a timestamped zip under
backups/ (via scripts/backup_current_results.sh).
10 Data preparationdata/rawdata/splitsEach option asks for a YES confirmation before overwriting, since it
regenerates files other steps depend on.
Menu paths below use the notation top-level -> submenu choice.
1 -> 1 (Interactive mode picker) -> enter 11
Result: creates results/mode_11_results.json.
2 -> 1, 2 -> 2, 2 -> 3, then 2 -> 4 for the merged baseline.
3 -> 4
Use this after raguard_predictions.jsonl, tool_result_parsing_predictions.jsonl,
sentinel_predictions.jsonl, or combined_predictions.jsonl changed.
7 -> 4 (Guided workflows -> "Generate Issue 3 ASR line chart from ready outputs")
This is the shortest path only if results/mode_11_results.json and
eval/eval_asr_without_defense.json already exist.
7 -> 5 (Guided workflows -> "Generate Issue 3 ASR line chart from scratch")
This runs, in order: no-defense prompt judging -> no-defense ASR for all attacks -> mode 11 -> combined baseline -> defense/baseline ASR evaluation -> figure generation.
2 -> 2, 2 -> 4, 3 -> 4, 4 -> 1
6 -> 8 -> 1 (Std Testing Phase 1), then 6 -> 8 -> 2 (Phase 2), then
6 -> 8 -> 3 (Aggregate), then 6 -> 8 -> 4 (Generate figures).
6 -> 1 or 6 -> 2 (choose mode 11 or 12 when prompted), then 4 -> 1.
results/mode_<id>_results.json for each mode you have run (1, 2, 3, 10-15)models/baseline/raguard_predictions.jsonlmodels/baseline/tool_result_parsing_predictions.jsonlmodels/baseline/sentinel_predictions.jsonlmodels/baseline/combined_predictions.jsonleval/eval_asr_without_defense.jsoneval/eval_asr_within_defense.jsoneval/eval_asr_within_baseline.jsonresults/std_testing/summary.json, summary.csvresults/std_testing/issue1_precision_recall_latency_chart_with_error_bars.pngExamples:
results/issue3_ASRline_chart.pngissue3_ASRline does not read models/baseline/tool_result_parsing_metrics.json
directly — it reads eval/eval_asr_within_baseline.json. After changing a
baseline prediction file, re-run baseline evaluation before regenerating figures.11, not mode 10.results/mode_2_results.json) reflect exactly
one trained checkpoint. They are useful as a sanity check that the pipeline
runs end-to-end, but should not be treated as the precise, reproducible
number for any layer whose model is retrained — use Std Testing's mean ± std
for that instead.data/raw/, data/splits/, data/processed/, models/layer1/,
models/layer2/, models/layer3/, models/std_testing/, and results/
are all gitignored. Cloning this repository gives you the code only — raw
traces, trained checkpoints, and prior results must be supplied or
regenerated separately.Primary entry:
python main.py
Data processing (equivalent to menu 10 -> 3):
python -m data.data_split
python -m data.data_preprocess
2026-09-30: active development moved to a new, cleaned-up repository:
https://github.com/MinhBang1000/interactionguard_defense. The previous
repository (agent_defense, pushed to https://github.com/MinhBang1000/agent_eval.git)
is frozen at its last commit and kept only as a historical archive of the full
development process (all AE_000* branches, experimental Layer 3 variants,
Dojo integration work, etc.). Its origin remote was intentionally removed
(git remote remove origin) to prevent accidental pushes here.
To recover the link to the old GitHub remote if ever needed:
git remote add origin https://github.com/MinhBang1000/agent_eval.git
This is a research codebase rather than a production package. Some scripts
under scripts/standalone/ are experimental or exploratory and are not wired
into main.py — run them directly with python -m if needed. The menu
reference above is the safest way to operate the repository consistently.