Quickstart
Repo workflow from mock target to artifacts.
1) Start a Local Mock Target
bash
python3 scripts/mock_agent.py --mode vulnerable --port 87872) Inspect Available Vectors
bash
cargo run --manifest-path cli/Cargo.toml -- vectors list --category prompt-injection3) 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 --pro4) Run the Scanner
bash
cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection5) Run From Config Defaults
bash
cargo run --manifest-path cli/Cargo.toml -- scan --config .agentprey.toml6) 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.jsonbash
cargo run --manifest-path cli/Cargo.toml -- scan --target http://127.0.0.1:8787/chat --category prompt-injection --html-out ./scan.html7) 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 108) 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-injectionCalibration 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