Inventorying LLM Guard scanners before a migration
If your team inherited or runs an LLM Guard deployment, the inventory is the first step of any migration. The protectai/llm-guard repository was archived by its owner on 9 July 2026, so every scanner you depend on will need a maintained replacement, and you cannot scope that work until you know which scanners exist. The short answer on effort is that the inventory is bounded by two numbers: the scanners in use and the call sites that invoke them. LLM Guard documents 15 input scanners and 20 output scanners, so your list is a subset of 35, but a single scanner can be called from several services. That count, more than the scanner count alone, is what decides how the rest of the migration is sized.
LLM Guard can be used as a Python library installed with pip or deployed as an API server, so the inventory must cover both modes. For the library, search every repository and service for imports of the llm_guard package and for the scanner classes they construct, and record the Python version and installed package version of each runtime. For the API server, record the deployment manifests, the configuration that selects scanners, and every client that sends requests to it. Confirm the configured thresholds and the model identifiers each scanner loads, because those values are what the replacement must match. Note that the last release on PyPI is 0.3.16, uploaded on 19 May 2025, so compare what is installed in production with that version.
For each scanner, mark whether it blocks traffic or only records a finding. A scanner that logs without rejecting a request is a control your replacement must reproduce only if someone relies on its output, such as a dashboard or an incident process, so ask the owners of those downstream systems before you decide. Only a scanner that actually blocks traffic defines the minimum protection your replacement must match. Record each call site with its owner, the input or output stage it runs at, and what the application does with a flagged result. Keep this map in version control, because it becomes the test scope in later migration steps.
Which LLM Guard scanner settings carry over and which must be re-derived
This table compares each field you record for an LLM Guard scanner with what a maintained replacement such as NeMo Guardrails can express. Read it as a checklist: fields marked as carrying over still need a check, and fields marked as re-derived need new testing on your own traffic. Confirm exact scanner behavior against the LLM Guard documentation for the version you pin.
| Field | Carries over as-is | Must be re-derived |
|---|---|---|
| Scanner name | Names such as Anonymize, Prompt Injection, Secrets and Toxicity identify the intent, so map each to a replacement control | Replacement rails rarely share the same names or boundaries, so one LLM Guard scanner may split into several rails or merge with another |
| Direction (input or output) | Input scanners such as Prompt Injection and Secrets and output scanners such as Sensitive and Deanonymize sort cleanly into input and output rails | Deanonymize depends on state from Anonymize, so the pairing and restore step must be rebuilt, not copied |
| Threshold | The numeric value is recorded and can be kept as a reference point | Thresholds rarely map one-to-one to another engine's scores or rules, so re-tune them on real traffic and your own attack set |
| Model or dependency | The model name, version and license are recorded so you know what runs today | Models such as those behind Toxicity or Prompt Injection usually need a different model or classifier, with its own license and hosting |
| Action on fail | Whether the scanner rejects, sanitizes or flags the text is recorded as the intended behavior | The replacement may express reject, mask or log differently, so the outcome must be tested per case |
| Logs or blocks | Whether the scanner only logs or actually blocks traffic is the key fact to capture for each scanner | Log-only scanners need a decision on whether they stay log-only, and blocking behavior needs a fresh test before cutover |
How to build the scanner inventory step by step
This sequence turns an unknown LLM Guard footprint into a migration map that lists each scanner, its settings, its dependencies, its callers, and whether a failed scan actually stops traffic. The output is the baseline every later replacement step is measured against.
Pin the installed LLM Guard version and runtime
Record the exact llm-guard package version in every environment, along with the Python interpreter version and the lockfile or container image that produced it. The last LLM Guard release on PyPI is 0.3.16, uploaded on 19 May 2025, and it requires Python 3.10 or newer but below 3.13, so the team knows which code it is reading and whether the runtime is still supported. Check each service separately, because staging and production often drift. Done when every deployment has one recorded version and interpreter pair, and any mismatch is logged as a finding.
Export scanner configuration from every service
Collect the scanner configuration from every service that imports the library or calls the LLM Guard API. Include the input and output scanner lists, constructor arguments, the API server settings file or environment variables, and any scanner configuration stored in shared config repositories or secret stores. Ask the owners of each service to confirm that the exported files are the ones currently running, not an old copy. Done when every service has an exported configuration and an owner has signed off on it.
Record each scanner with direction and thresholds
Create one inventory row per scanner instance with its name, whether it runs on input or output, its threshold and other tuning values, and the service and environment where it runs. The LLM Guard documentation lists 15 input scanners and 20 output scanners, so use that list as the checklist and mark any scanner in use that does not appear in it. Note custom scanners separately, since they have no maintained upstream equivalent. Done when every configured scanner has a row and no configuration entry is left unassigned.
Map model and Hugging Face dependencies
For each scanner, identify the models it downloads or loads, the Hugging Face model identifiers and revisions, the local cache location, and any tokenizer or language resources it needs. The project and its associated Hugging Face models are no longer maintained, so record the exact revisions in use and confirm with your security team whether those model artifacts are approved for continued use. Also record the hardware and memory each model needs at runtime. Done when each model-dependent scanner has a listed model, revision, and resource footprint.
Trace every call site in code
Search each codebase for imports of the library and for HTTP calls to the LLM Guard API, then follow each call to the function that wraps it. Record the file, the function, the request path that reaches it, and the scanners invoked there. Include calls made from background jobs, batch pipelines, and tests that run against production-like settings. Done when every scanner row links to at least one call site and every call site lists the scanners it invokes.
Classify each scanner as blocking or log-only
For each call site, read the code that handles a scan result that reports a failure. Determine whether the request is rejected, the content is replaced or redacted, or the result is only written to a log or metric and the original content continues. A scanner can be configured to block but wired to log, so judge the behavior from the code path rather than the config alone. Mark each scanner as blocking, log-only, or mixed, and note the owner who confirmed the behavior. Done when every scanner has a classification backed by a referenced code path.
Review the map and set the replacement baseline
Have the service owners and the security team review the completed inventory against the running systems, resolving any scanner whose classification or call site is disputed. Mark which blocking scanners must be matched by any replacement, since log-only scanners usually need a different decision. The finished map becomes the baseline for the scanner-by-scanner migration and for the test sets that show the replacement blocks at least what LLM Guard did. Done when the review is recorded and every blocking scanner is assigned to a migration path.
Where LLM Guard is called in library and API deployments
When LLM Guard is installed as a Python package, every scanner is instantiated and invoked from application code. The scanner classes are imported from the library, constructed with arguments such as thresholds, and then called on prompts or responses. Search the repositories for imports from the library package, for calls to scan functions, and for scanner class names. Include notebooks, scripts, batch jobs, and any shared internal package that wraps the library, because those are often missed. Record the Python version, the pinned library version, and the resolved dependency lock file, since the last PyPI release is 0.3.16, uploaded on 19 May 2025, and it requires Python 3.10 or newer but below 3.13.
- Import and constructor search: grep for the package name and each scanner class you find, and record the arguments passed at construction.
- Scanners built in background jobs: check queue workers, cron jobs, and evaluation pipelines, which may instantiate scanners outside the request path.
- Feature flags and environment checks: look for conditionals that skip a scanner in staging or in one region only.
- Runtime records: capture the interpreter version, the lock file, and the container image digest for each service that imports the library.
- Model cache location: note where the models were downloaded, because a model loaded at startup may be the only trace of a scanner's dependency.
Confirm with each owning team whether any code path is not in the repositories you searched, such as a vendored copy or a forked package.
When LLM Guard runs as an API server, the scanners are selected and configured in a configuration file rather than in application code. Clients call HTTP endpoints, so the inventory has to read the server configuration, the deployment manifests, and the client calls together. The configuration determines which input and output scanners load, what thresholds apply, and which models are fetched. Find the configuration file that the server reads, the environment variables that override it, and the image or process command that starts it. Compare the configuration in each environment, because the same image often behaves differently with different files.
- Configuration file: record every enabled scanner, its parameters, and its threshold values, and keep a copy under version control.
- Environment overrides: list the variables that change scanner behavior at startup, including any that point to model paths or disable a scanner.
- Deployment manifests: capture the replica count, image tag, resource limits, and the process command for each environment.
- Client call sites: search the calling services for the server's hostname, the endpoint paths, and any HTTP client wrapper that sends prompts.
- Model artifacts: record which model files the server loads and where they are stored, since those files need to be preserved for rollback.
Ask the platform team for the running configuration, not only the file in the repository, because a mounted secret or a late override can change the active scanner set.
Many organizations place LLM Guard behind a wrapper service, an internal SDK, or an AI gateway that handles authentication, routing, and logging. In this shape the application may never mention LLM Guard by name, so a source search for the library finds nothing. The inventory must follow the request path from the user-facing application through the gateway to the scanner. Check gateway plugins, middleware, and policy files for calls to the LLM Guard service, and check the gateway's own configuration for which routes apply scanning. A route that bypasses the gateway is a common gap.
- Gateway policy and plugins: list each route, each attached scanning policy, and whether the policy blocks or only logs.
- Internal SDK versions: record the wrapper's version and the LLM Guard client version it pins.
- Fallback behavior: check what the wrapper does when the scanner service is unreachable, since a fail-open setting changes what is actually protected.
- Shadow or sampled paths: note any route that scans only a sample of traffic or sends results to a log without enforcement.
- Ownership of each hop: record which team owns the wrapper, the gateway, and the scanner service.
Confirm with the gateway owner which routes are scanned in production, because gateway policy often differs from the documented design.
The most damaging gaps are not in the obvious call sites. They sit in configuration that changes behavior without a code change, in code paths that run rarely, and in environments that differ from production. Each blind spot can make the inventory look complete while a scanner that blocks traffic in production is absent from the migration map, or while a scanner that is believed to block is only logging. The checks below apply to both library and API deployments and should be run before any scanner is counted as covered.
- Environment-only disables: compare configuration across development, staging, and production, and treat every difference as a finding.
- Log-only scanners: identify scanners whose results are written to logs but do not change the response, and mark them separately from blocking scanners.
- Rarely executed paths: review error handlers, retry logic, and admin tools, which may call scanners on unusual inputs.
- Dead configuration: note scanners that are configured but never invoked, and confirm that with traffic logs before dropping them.
- Model dependencies: check that each scanner's model is present in every environment, because a missing model can cause a path to fail or to skip scanning.
Write each blind spot as a question for the owning team, and keep the answers in the same inventory as the scanner list.
Telling blocking scanners from log-only scanners
A scanner in a config file may not be the same as a scanner that stops traffic. Each check below separates real enforcement from scanners that only record findings, and each should be confirmed with traffic evidence from logs rather than from configuration alone.
Code branch on a flag
Find what the application does when a scanner returns a failed result. Trace the call site in the library or the API client and identify the branch taken. A branch that only writes a message and then continues to the model call is not enforcement. Confirm by searching the application code and by reading logs for requests that were flagged but still reached the model.
LLM Guard docsSanitized output or rejection
Check whether a flagged prompt is replaced by a sanitized version, rejected with an error, or passed through unchanged. Each outcome reaches the model or user differently. Record which response a client actually receives for each scanner, since a sanitized prompt can still change model behavior while a rejection stops the request.
Alert-only log sinks
Some deployments send scanner results to a logging, metrics or SIEM pipeline without changing the request. Identify every sink receiving scanner verdicts and whether any alerting rule causes an action. Confirm that a flagged request in the logs has a matching outcome in the response, because a dashboard that shows detections does not prove anything was blocked.
Sampling and shadow modes
Scanners may run on a percentage of traffic or in shadow mode, where verdicts are recorded but never applied. Ask the team whether sampling or shadow settings were ever enabled, and when. Compare scanner invocation counts with total request counts over the same period to see whether every request was actually scanned.
Environment-specific overrides
Production, staging and developer environments often differ in thresholds, enabled scanners or fail-open settings. A scanner that blocks in staging may only log in production. Compare the effective configuration in each environment, including environment variables and deployment manifests, and confirm the production behavior from production logs.
Downstream services ignoring verdicts
A verdict can be computed correctly and still be ignored by the service that consumes it. Check whether the gateway, orchestration layer, or model client reads the scanner result before forwarding the request. Test this with a known attack input in a staging copy and confirm that the downstream call is not made when the scanner fails.
How the inventory traces scanners from config to enforcement
The trace starts with the source repositories, the configuration files and the deployed LLM Guard API servers, since each can define scanners differently. Those sources feed a scanner register that records each input and output scanner with its thresholds and models. The register is then matched against call sites in the applications that invoke the library or the API. Each scanner is classified as blocking, log-only or unknown, and only that classification feeds the migration map. Check especially the unknown rows, because a scanner whose enforcement path is not visible cannot be assumed safe to drop.
Flow from LLM Guard sources to the classified migration map.
Sequence from inventory to a parallel run and cutover
The sequence turns the scanner inventory into an agreed migration map, a proven replacement for each scanner, and a cutover that leaves no live LLM Guard dependency behind. Each step consumes the output of the one before it, so gaps found late are cheap to fix only if they are caught early.
Build the scanner and call-site inventory
Your platform engineers list every input and output scanner configured in each LLM Guard deployment, including thresholds, model identifiers, and the code paths or API clients that call them. Record whether each call uses the Python library or the API server, and which application or endpoint owns it. The step is done when every scanner has a row with an owner, a call site, and a configuration snapshot taken from the running system rather than from memory of the setup.
Validate the inventory against live traffic logs
Compare the inventory with actual request and response logs over a representative window that your team chooses. Confirm which scanners fire, which are configured but never invoked, and which run on paths nobody documented. The output is a corrected inventory with a traffic count per scanner and per endpoint. Ask your security team to confirm the log window covers the periods when business peaks and batch jobs run.
Classify each scanner as blocking or logging
For each scanner, establish whether its result changes what reaches the user or the model, or whether it only writes a log entry or score. Trace the application code that reads the scanner output and note any fallback behavior, such as failing open when the scanner errors. This classification sets the replacement priority, because a blocking scanner that fails open is a different risk from a logging-only scanner. The step closes when every row is marked blocking, logging, or fail-open with the evidence attached.
Agree the migration map with security and product owners
Walk the validated inventory with the security owner, the product owner of each affected application, and the people who approve changes to customer-facing behavior. For each scanner, agree the target maintained option, the test set that will define acceptable behavior, and who signs off the cutover. The migration map is complete when each scanner has a named target, a named approver, and a recorded decision on which logging-only scanners may be retired instead of replaced.
Pilot one low-risk scanner end to end
Choose one logging-only or low-impact scanner and replace it in a non-production environment, using the same deployment path and test harness planned for the rest. The pilot exposes gaps in the inventory, such as missing configuration, hidden dependencies, or model downloads that need network access. Your team records what changed in the migration map as a result. The pilot is done when the replacement runs on the same traffic sample and its findings are reviewed by the approvers.
Run the replacement in parallel and compare decisions
Run each replacement alongside the existing LLM Guard scanner on the same live or replayed traffic, without letting the new decision affect users yet. Record every case where the two disagree, classify the disagreements as missed attacks, false positives, or latency issues, and send the results to the approvers. The step closes when the disagreement log is reviewed and each category has an accepted outcome or a tuning change that is retested.
Cut over endpoint by endpoint
Switch one endpoint or application at a time from LLM Guard decisions to the replacement, starting with the lowest-traffic path that the inventory marked as blocking. Keep the rollback route ready and confirm, through logs, that each endpoint no longer calls LLM Guard before moving to the next. Done means every endpoint in the migration map is served by the replacement and the cutover record names the approver for each one.
Decommission the LLM Guard runtime
Once no endpoint, job, or library import references LLM Guard, remove the API server, the Python environment, the cached models, and the associated secrets and network rules. Retain configuration snapshots and decision logs according to your records policy. The step is done when traffic logs show zero LLM Guard calls over the agreed window and the decommission record is signed by the security owner.
What drives the effort of the scanner inventory
This table lists the factors that make an LLM Guard inventory faster or slower, along with who typically pays for the work and what it means for a quote. Use it to judge how much of the inventory your own team can absorb and where an outside partner would spend time.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Services and call sites | Each service that imports the library or calls the LLM Guard API adds code to trace, config to read and an owner to find. | Search code and deployment manifests first, then confirm the list with platform owners before scoping. |
| Scanners enabled | Every enabled input and output scanner needs its settings, model dependency and enforcement role recorded. | Export the active scanner configuration per service so the list is written from config, not memory. |
| Custom scanners or forked code | Local subclasses or patched copies of LLM Guard are not documented upstream and must be read line by line. | Ask teams to flag any local changes or vendored copies at the start. |
| Hugging Face models loaded | Each loaded model has its own name, revision, cache location and license to record, and some run at startup. | Pin model names and revisions from the running containers or the model cache rather than from the README. |
| Thresholds tuned per environment | If production, staging and developer settings differ, each combination needs its own record and comparison. | Collect thresholds from every environment and mark which values are actually in effect. |
| Traffic logs with enforcement outcomes | Logs showing whether a scanner blocked, redacted or only recorded a finding decide which scanners truly enforce. | Confirm log retention and fields before the inventory starts; missing outcome logs mean a manual review of code paths. |
| Access to owning teams | Someone must confirm why each scanner is on and whether anyone relies on its output, which takes meetings and time. | Name one owner per service and book sign-off sessions early in the project plan. |
| Who pays in-house or outsourced | Internal teams pay with engineering hours from platform and security staff. An outsourced inventory is quoted from written scope, and the client still supplies access, owners and logs. | Ask any partner to state in writing what the client must provide and how many services and environments the quote covers. |
What usually goes wrong during the scanner inventory
Most migration surprises come from an inventory that describes the intended setup rather than the running one. The risks below share a root cause: the map was built from configuration files and memory instead of from what the deployed system actually executes, logs and blocks.
Log-only scanners treated as blocking
A scanner that only records findings looks identical to a blocking scanner in most configuration files. Teams that list every scanner as a control often overstate protection and then find that the replacement is expected to block traffic the old system never stopped. Prevention: for each scanner, trace the application code path after the scan result and record whether a failed result stops the request, rewrites the output, or only writes a log line. Confirm with a test prompt that should trigger the scanner.
Scanners missing from background jobs
Scanners often run in batch jobs, document ingestion pipelines, evaluation scripts or a second API instance that no one lists as part of the application. Those paths can process far more content than the user-facing chat. Prevention: search every service, cron job, queue worker and deployment manifest for imports of the library and calls to the API, and ask each team which scanners they invoke and on what data.
Unpinned library versions
A requirements file may name the library loosely while the container image or virtual environment in production holds a different build. Scanner behavior can change between builds, so the inventory must describe the version that actually runs. Prevention: record the installed version from inside the running container or environment with the package manager, compare it with the lock file, and note any gap between them.
Thresholds set outside the code
Scanner thresholds frequently come from environment variables, a secrets store or an override file rather than from the source code. Reading the default values alone gives an incomplete picture of how aggressively traffic is filtered. Prevention: capture the effective value of every threshold in each environment, including production, and store it in the migration map with the owner who approved it and the date it was last changed.
Models without a recorded source
Some scanners load models that were downloaded from Hugging Face and cached on disk, so the model name in code may not reveal which revision or copy the service uses. A cache copied between hosts can also hide where a model came from. Prevention: list each model with its repository identifier, revision hash, file checksum and the host where it is cached, and record the license terms that apply to it before it is reused or replaced.
Assuming scanner output still feeds the app
A scanner may still run while the application ignores its result, for example after a refactor removed the check or a feature flag disabled the branch. The scanner then costs compute and adds latency without protecting anything, and the migration would reproduce a control that no longer exists. Prevention: confirm with a recent production trace or log sample that the scanner result is read and acted on, and mark scanners whose output is discarded as removed from scope.
Questions teams ask before inventorying LLM Guard
How much effort does an LLM Guard scanner inventory take?
The effort depends on how many applications call LLM Guard, how many scanners each one uses, and how many places the scanners are configured. A single application with one API server and a short scanner list is a small exercise. Several applications, each with its own Python library calls and custom thresholds, takes longer because every call site must be traced and every threshold recorded. The biggest unknown is usually how many services import the library directly, since those calls rarely appear in a central config. Ask any partner to show how they will find call sites before agreeing a scope, and ask what the written inventory will contain at the end.
How long does the inventory phase run?
No general duration is published for this work, so the honest answer is that it depends on the number of applications, environments and owners to interview. Inventory usually runs in parallel with access requests, because repository and log access often takes longer than the code reading itself. Plan for time to confirm which scanners block traffic and which only log, since that requires looking at production behavior, not just configuration. Ask for a milestone plan in the quote that separates discovery, verification against logs and the sign-off review, so you can see where time is actually going.
What must our team provide to start the inventory?
The inventory is only as complete as the material you can share. Prepare the following before work starts:
- Source repositories and dependency manifests that reference
llm-guard, including lock files - API server configuration, container images and deployment manifests for any LLM Guard service
- Scanner configuration, including thresholds, model names and any custom settings
- Application logs or scanner output from production or staging, so blocking and logging behavior can be confirmed
- A named owner for each application and a contact for security decisions about it
Missing logs are the most common gap. Without them, the map can show what is configured but not what actually stops traffic.
Can our internal team run the inventory without outside help?
Often yes, if the team has someone who knows the codebases and someone who can read the production logs. The work is mostly search, reading and record-keeping, so it fits a platform or security engineer with access to the right repositories. Where teams struggle is verifying blocking behavior and keeping the map complete across services owned by different groups. An outside partner adds value when the team lacks time, when ownership is spread across many teams, or when the inventory will be used as evidence in a compliance or security review. Decide which of these applies before choosing the approach.
Does the archived LLM Guard project still receive fixes?
No. The protectai/llm-guard repository was archived by its owner on 9 July 2026, and the README states that the project and its associated models on Hugging Face are no longer under active development or maintained. The last PyPI release is 0.3.16, uploaded on 19 May 2025, and it requires Python 3.10 or newer but below 3.13. That means security or compatibility problems found later will not be fixed upstream. The inventory should therefore record the exact version and Python runtime in use, so the migration plan accounts for the risk. For licensing questions about continued use, see the LLM Guard buyer's guide.
Should we stop using LLM Guard now, before the inventory?
Do not roll out new LLM Guard deployments, but do not switch off a working deployment before you know what it protects. The inventory is what tells you which scanners block traffic and therefore which protections would disappear if the service were removed. Keep existing deployments stable and contained while the map is built, and treat the decommission date as a result of the inventory rather than a starting assumption. Teams that stop first often discover that a logging-only scanner was the only control on a sensitive output path.
What should a quote for this inventory include?
A quote should follow from a written scope and list the work in terms you can check. Ask for the following items to be stated separately:
- The applications, environments and repositories in scope, and the ones excluded
- The method for finding call sites, both library imports and API calls
- How blocking and logging-only behavior will be verified, and from which logs
- The form of the deliverable, such as a scanner register with thresholds, models and owners
- Who pays for access, interviews and any follow-up review, and whether a retest is included
- Any work that recurs, such as updating the inventory as services change
DeployOpen does not publish a price list, so compare quotes on these items rather than on totals.
How DeployOpen scopes the scanner inventory
DeployOpen scopes the scanner inventory in writing before any work starts. The written scope names the deployments in question, the environments they run in, the repositories and configuration files to be reviewed, the log and traffic sources that will be sampled, and the people who must be available to answer questions about business intent. It also states what the inventory will not cover, such as scanners in other applications that the client has not identified. Because the LLM Guard project is archived, the scope should make clear that the output is a migration map, not a recommendation to keep LLM Guard running. Ask for the scope to be agreed and signed before evidence collection begins, so both sides know what "complete" means.
The work is reviewed with your team at each step. DeployOpen goes through the application source, the pinned llm-guard version, scanner configuration, model settings and the calls into the library or the API server, then checks those findings against real traffic and logs. Your engineers confirm which applications own each call site, and your security team confirms which decisions are enforced and which are only recorded. The main deliverable is a scanner register listing each input and output scanner, its threshold and model settings, its call location, its owner, and an enforcement classification: blocking, redacting, or log-only. The register is paired with a migration map that links each scanner to a candidate replacement and the test evidence needed before cutover.
DeployOpen plans, implements, hardens and supports self-hosted open-source platforms in your own infrastructure, and the inventory is one step in that work. The map can be carried into a replacement build and retest, either under a retainer or as a fixed-scope follow-on agreed in writing. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Ask your auditor or certification body which inventory artifacts they expect to see, and confirm that the register format meets their needs before the engagement closes.

