LLM Firewall guide examples

Set the environment variables described in the guide. The URL must contain the host without /v1. Credentials stay on your machine and are not included in this download.

Review JSON files and evaluator availability before creating resources. Run bash setup_firewalls.sh from this directory to create two private rules and three account configurations. The script stops on errors. If a slug already exists, inspect the resource and consult the guide before deciding whether to update it.

Run python3 test_firewall.py to evaluate seven cases. Evaluations can consume inference. Responses are saved to firewall-evaluations.json. The ambiguous case remains pending review and mismatches or errors cause a nonzero exit code.

python3 review_documents.py reviews two synthetic documents. python3 review_output.py reviews a synthetic draft. python3 chat_with_firewall.py makes a chat request with input protection.

validate_tool.py contains a validation function without external effects. Replace its example recipient list with your backend's identity, account and resource controls before integration.

example-decision.json is illustrative and contains no measured results. Policies are starting points requiring application-specific testing and review.
