Quickstart

Repo workflow from mock target to artifacts.

1) Start a Local Mock Target

bash
python3 scripts/mock_agent.py --mode vulnerable --port 8787

2) Inspect Available Vectors

bash
cargo run --manifest-path cli/Cargo.toml -- vectors list --category prompt-injection

3) Initialize Project Config + Auth Commands

bash
cargo run --manifest-path cli/Cargo.toml -- initcargo run --manifest-path cli/Cargo.toml -- auth activate --key apy_example_keycargo run --manifest-path cli/Cargo.toml -- auth statuscargo run --manifest-path cli/Cargo.toml -- auth refreshcargo run --manifest-path cli/Cargo.toml -- vectors sync --pro

4) Run the Scanner

bash
cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection

5) Run From Config Defaults

bash
cargo run --manifest-path cli/Cargo.toml -- scan --config .agentprey.toml

6) Generate JSON/HTML Artifacts

bash
cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection --json-out ./scan.json
bash
cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection --html-out ./scan.html

7) Tune Resilience Controls

bash
cargo run --manifest-path cli/Cargo.toml -- scan   --target http://127.0.0.1:8787/chat   --category prompt-injection   --retries 2   --retry-backoff-ms 250   --max-concurrent 2   --rate-limit-rps 10

8) Try a Resistant Target

bash
python3 scripts/mock_agent.py --mode resistant --port 8787cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection

Calibration Sanity Check

Vulnerable mode should trigger findings. Resistant mode should stay near-zero false positives.

bash
# vulnerable baselinepython3 scripts/mock_agent.py --mode vulnerable --port 8787cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection# resistant baselinepython3 scripts/mock_agent.py --mode resistant --port 8787cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection