Serving multiple guardrail configurations from one NeMo Guardrails server: when teams need it
Several applications or teams often need different rails: a customer support assistant may need topic control and PII masking, while an internal coding assistant needs tool-call validation and a different set of blocked topics. Running one guardrails server per assistant multiplies the containers, endpoints and configurations your team must patch and monitor. The alternative is one self-hosted guardrails endpoint that serves several configurations. The open-source NeMo Guardrails server loads configurations from a folder and exposes an HTTP API, and multi-config mode lets each request select the configuration it needs. Treat this as a governance and operating-cost decision, not just a packaging choice. One shared server gives you a single place to review policy and a single deployment to run, but it also means one outage, one overloaded process or one bad configuration change can affect every application that calls it.
Before you commit to this pattern, confirm the exact multi-config behavior in the release you plan to run, because configuration loading, how a request names its configuration (for example through the config_id field in the request body), and error handling for unknown identifiers can change between versions. Check the NeMo Guardrails documentation and the release notes for your version, and test the behavior in a staging environment with your own configuration folder. Note also that NVIDIA has sunset the NeMo Guardrails microservice, so the guidance here covers only the open-source library and server. Plan around that scope when you ask a vendor or partner about hosting options.
Decide early which applications share a server. Group configurations that have the same risk profile, owner and change cadence, and keep high-risk or regulated assistants on separate server processes so that a failure or an emergency rollback in one does not stop another. Ask for a written list of which configurations live on each server, who approves changes to each one, and how a bad configuration is rolled back without restarting unrelated assistants. Those answers determine whether consolidation saves effort or simply moves the risk into one place.
Single-config or multi-config: which mode fits which deployment
This table compares single-config mode, multi-config mode in one server process, and separate server processes per configuration group. Read each column as a deployment pattern and check the row on configuration ownership first, since it usually drives the other choices. Confirm the exact mode names, flags and config_id behavior in the NeMo Guardrails documentation for the version you run before you commit to a layout.
| Decision point | Single-config server | Multi-config server (one process) | Separate processes per group |
|---|---|---|---|
| Configuration owner | One team owns the single guardrails configuration and its actions | A platform team owns the server and several teams own folders of configurations | Each group owns its own server, image tag and rollout schedule |
| What a change affects | Every caller of the server when the configuration reloads or the image changes | Only requests routed to the changed configuration, but a server restart or shared action code affects all of them | Only the group's server, so a faulty change is contained to that group's traffic |
| How requests are routed | No selection needed, every request uses the one configuration | Callers pick a configuration per request with config_id, so client code and gateway rules must send the right ID | The gateway or DNS routes each application to its group's endpoint |
| Shared policy | Easy to keep consistent because there is one source of rules | Shared rails can be copied across folders, which invites drift that you must check in review | Shared policy must be distributed to each server, so it is harder to keep identical |
| Resource use | Lowest overhead, one process to size and monitor | One process holds all configurations and their models, so memory and model calls grow with the set | More processes and more replicas to size, but load from one group cannot starve another |
| Typical fit | A single assistant or application with one policy owner | Several related applications in one organization that share a platform team and a low change rate | Groups with different risk levels, separate change approvals or regulatory boundaries |
| Verification before go-live | Test the one configuration and confirm the server loads it | Test each config_id path and confirm an unknown or missing ID fails closed | Test each group's endpoint and confirm the gateway cannot send traffic to the wrong group |
How a request reaches one guardrail configuration on a shared server
A calling application sends a request that names a configuration, and the guardrails server uses that identifier to pick one configuration folder. Input rails run first, the model endpoint is called, and output rails check the response before it returns. The trust boundary sits between the application, the guardrails server and the model or safety endpoints, and the step where the identifier is matched to a folder is the one to confirm against the NeMo Guardrails documentation for your server version.
Request flow through one selected configuration on a shared guardrails server.
How config_id selects a guardrail configuration for each request
The caller identifies which guardrail configuration should apply to a request, and the server uses that identifier to pick the configuration it runs. In a multi-config setup, the server maps the identifier to a folder that holds a config.yml file, any Colang files and any Python actions. The same server process then runs the input, dialog, retrieval, execution and output rails defined in that folder for that request. The caller never supplies rail logic, only a reference to a configuration the platform team already published. The request field that carries this identifier, usually named config_id, and the exact error returned for a missing or unknown identifier must be confirmed in the server documentation for the NeMo Guardrails version you run. Do not build clients against the field name or error shape until you have checked both in that version's docs and tested them on your own server.
Because the identifier decides which rails run, control of the mapping belongs to the platform team, not to application developers. Decide who creates configuration folders, who approves changes to them and how an application is granted access to a given identifier. Your gateway or service layer should set the identifier from a server-side mapping tied to the calling application's identity, so a client cannot choose a weaker configuration by editing a request. Record which configuration version handled each request in your logs so a blocked or allowed response can be traced back to the exact rules that produced it.
Test the failure paths before launch. Send a request with no identifier, one with an unknown identifier and one with a valid identifier, and confirm the outcome for each. Decide in advance whether a missing identifier should fall back to a default configuration, be rejected, or be sent to a restrictive configuration, and make sure the server behaves as your design requires. A fallback to a permissive default is the most common way a multi-config deployment quietly weakens protection, so verify it explicitly.
Combining configurations or splitting them across server processes
Combining configurations on one server fits teams that share a risk profile, the same model access and a similar release cadence. In that case one server process loads several configurations from a single folder, and each request selects its configuration with config_id. The operational benefit is fewer containers to build, patch, monitor and scale, and one set of network policies and health checks. The trade-off is that every configuration shares the same process, the same Python dependencies and the same restart window, so a change to one configuration becomes a change to the whole server.
- Shared dependencies: All configurations run on one NeMo Guardrails version and one set of packages, so a library upgrade affects every team at once.
- Shared model endpoints: Configurations that call the same safety or main model endpoints can reuse one credential set and one capacity plan.
- Shared release cadence: Changes to any configuration usually require one coordinated restart, which suits teams that ship on the same schedule.
- Naming discipline: Configuration folder names become the
config_idvalues that clients send, so they need an owner, a naming rule and a review step. - Cross-team regressions: A malformed Colang file in one folder can block startup, so every configuration needs validation before it is merged.
Before cutover, confirm that each config_id returns the expected rails for a set of known test prompts, and that a broken configuration cannot take the others offline.
Splitting configurations across server processes fits cases where a team needs isolated upgrades, separate credentials, different safety endpoints or independent scaling. Each process loads only the configurations it owns, so one team can move to a newer NeMo Guardrails release, rotate its model keys or add GPU-backed detectors without touching the others. The cost is more processes to deploy, monitor and route to, and a gateway or routing layer that decides which server receives each request. This split is most useful when one configuration carries much heavier load or stricter access controls than the rest.
- Isolated upgrades: A team can test a new release, such as a version that changes configuration or server behavior, on its own process before other teams move.
- Separate credentials: Each process can hold only the keys for the model providers its configuration is approved to use.
- Different safety endpoints: A process can point at a different self-hosted detector or NIM endpoint without changing shared configuration.
- Independent scaling: A high-volume configuration can add replicas without paying for capacity that low-volume configurations do not need.
- Routing complexity: Clients or a gateway must map each request to the correct server, and that mapping becomes another item to test and version.
Before cutover, test the routing table, confirm that each process rejects requests for configurations it does not own, and verify that health checks reflect the state of each process separately.
The decision between combining and splitting depends on who owns each configuration and how much they need to change independently. Start by listing every configuration with its owner, its model and detector endpoints, its credentials, its expected request volume and its release schedule. Configurations that match on all of these can share a process. Configurations that differ on one or more of them are candidates for separation, especially where a security or compliance owner must approve changes separately. Revisit the decision when a team adds a new detector or changes its release rhythm, because the right split can change over time.
- Ownership map: Record who approves changes to each configuration, since ownership usually drives the process boundary.
- Credential boundaries: Check whether any configuration must be isolated from another's model keys or endpoints.
- Load profile: Compare request volume and latency targets, since a busy configuration can starve quieter ones on a shared process.
- Migration path: Plan how a configuration moves from a shared server to its own process without changing client calls.
- Rollback plan: Define how to return traffic to the previous layout if a cutover fails.
Before cutover, run the same test prompts against the old and new layouts, compare the rails applied to each config_id, and confirm that rollback works within the window your operations team has agreed.
Setting up a multi-config server step by step
This sequence takes a team from an empty folder to a NeMo Guardrails server that loads several configurations, routes each request to the right one, and proves each one blocks and allows what it should. It also covers how to catch startup errors and roll back a single configuration without disturbing the others.
Confirm the Python version and release
The platform engineer or lead developer confirms the NeMo Guardrails release to deploy and checks that the runtime Python version is one the release supports. For release 0.25.0, the supported versions are Python 3.11, 3.12 and 3.13. Before the folder layout is final, read the 0.25.0 release notes and the Colang 2 migration guide, because the Colang version you pick and the move from LLMRails to Guardrails both affect how each configuration folder is written. Done means the team has written down the release, the Python version, the Colang version for each configuration and the class name the code will use.
Lay out one folder per configuration
The engineer creates a configuration root directory with one subfolder per guardrail configuration. Each subfolder holds its own config.yml, plus any Colang files and Python actions that belong only to that configuration. Keep shared material in a clearly named location and decide whether each configuration references it or copies it, since copies drift over time. Done means every folder can be read on its own, each has a config.yml, and a reviewer can tell from the folder names which application or policy each one serves. This is also the point to fix the identifiers that clients will send, because renaming a folder later changes the contract with callers.
Start the server against the configuration root
The engineer starts the guardrails server and points it at the configuration root rather than at a single configuration folder. The server reads each subfolder as a separate configuration. Watch the startup log closely for each configuration as it loads. Done means the server starts, reports that it loaded every expected configuration, and the health endpoint responds. Confirm the exact startup flags and the server's configuration listing endpoint in the NeMo Guardrails documentation for your release, since these details are version-specific.
Send a test request to each configuration
For each configuration identifier, the engineer sends a test request that names that identifier, using the config_id field in the request. Use one prompt the configuration should block and one it should allow, chosen from the policy the configuration is meant to enforce. Record the response for each call. Done means every configuration answers its own requests and the team has a written table of identifier, prompt, expected result and observed result. Any response that matches another configuration's behavior signals that routing or folder contents are wrong.
Verify blocked and allowed behavior per configuration
The QA or security engineer checks that each configuration blocks and allows what its policy says, not just that it responds. Run a small set of blocked and allowed prompts against every identifier, including prompts that would be blocked by one configuration and allowed by another. Compare results against the expected table from the previous step. Done means every configuration shows its own behavior, and the team can show a second reviewer the evidence. Treat any difference between configurations that should match as a defect to trace before launch.
Check unknown identifiers and startup load errors
The engineer sends a request with an identifier that does not exist and confirms the server returns a clear error rather than falling back to another configuration. Then introduces a deliberate error in a test copy of one configuration, such as a malformed config.yml or a Colang syntax problem, and restarts the server to confirm the failure appears in the startup log with the configuration name. Decide in advance whether a broken configuration should stop the whole server or be skipped, and confirm which behavior the release applies. Done means both failure cases are documented with the exact response or log line, and the team knows which failure must trigger an alert.
Roll back one configuration safely
The engineer keeps the last known good version of each configuration folder under version control and defines the rollback as restoring that folder to its previous commit, then restarting or reloading the server as the release requires. Make the change to one configuration in a branch, run the test table from the earlier steps, and then deploy. Rehearse the rollback once in a non-production environment and confirm that the other configurations keep their behavior during the change. Done means the team can name the commit to restore, the command or process to apply it, and the test that proves the rollback worked.
Security and operational risks of sharing one server
A shared guardrails server concentrates policy enforcement, model credentials and logs in one process that several teams depend on. The cards below name the risks that follow from that concentration and the control to add for each, so the decision to share is made with the failure modes in view.
Cross-team blast radius
One configuration that loads slowly, raises errors or floods the model endpoints can degrade every configuration served by the same process. Check whether a single configuration can exhaust worker capacity or memory for the whole server, and test a failing configuration with the others under load. Add per-group rate limits at the gateway and keep high-traffic or regulated configurations in separate processes where their failures cannot reach other teams.
NeMo Guardrails docsMis-selection of configuration
Callers choose a configuration with config_id, so a client that sends the wrong identifier applies another team's rails to its traffic, or skips the rails it needs. Map each caller to its permitted configuration IDs on the server side rather than trusting the value the client sends. Log the selected configuration on every request so mismatches can be traced after the fact.
Shared model and safety credentials
When all configurations share one set of model and safety endpoint credentials, any team that can read the configuration folder or environment can reach every endpoint and any leaked key exposes all of them. Use separate secrets per configuration group, scoped to the endpoints that group needs, and rotate them without a full server restart where your deployment allows. Confirm with your secrets platform who can read each secret.
Configuration change control
Rails in a shared folder change policy for every consumer, so an unreviewed edit to a Colang file or config.yml can alter behavior across several products at once. Require review and approval for each configuration change, and keep audit logs that record who changed which configuration and when. Store configurations in version control and deploy from tagged revisions so the running policy can be traced to a reviewed commit.
Logging of blocked content across teams
Blocked prompts and responses often contain personal data or sensitive business content, and a shared log store lets staff from one team read another team's blocked traffic. Decide what each configuration logs, redact or omit content where its policy requires, and restrict log access by configuration group. Confirm retention periods with each owning team before logs are shared.
Unauthenticated access to the HTTP API
The guardrails server exposes an HTTP API, and that API does not by itself decide which caller may use which configuration. Place authentication in front of the server, such as an API gateway or reverse proxy that validates tokens, and enforce per-caller authorization against the permitted configuration IDs. Test the API from an unauthorized client to confirm that requests for other teams' configurations are refused.
What to confirm about multi-config mode before you rely on it
Confirm the multi-config behavior in the exact release you run before you build on it. The way the server selects a configuration, the request field that carries the selection and the behavior when no configuration matches can change between versions, so the source for each answer is the documentation for your release, checked against the code and the NeMo Guardrails releases page. Send one request per configuration identifier through config_id in a test environment, then send a request with an unknown identifier and a request without the field. Record the status codes and the responses. Those results become your baseline for the routing tests you keep in your regression suite.
Find out what happens when one configuration fails to load. Break one configuration folder on purpose (for example, a malformed config.yml or a missing Colang file) and start the server. Check whether startup fails for every configuration, whether the others keep serving requests, and what the health endpoint reports. Then measure memory: start the server with a single configuration, record resident memory, add configurations one at a time and record it again. Whether each loaded configuration holds its own model clients and action modules determines how many configurations one process can host, and you should not estimate that number from the documentation alone.
Test how Colang 1.0 and 2.0 configurations coexist, and review your LLMRails code now. Colang 1.0 is the default and Colang 2.0 is also supported, so confirm whether one server accepts both syntaxes in the same deployment and how it reports a mismatch. If you convert configurations with the nemoguardrails convert tool, plan a manual review of the output, since NVIDIA says converted configurations still need one. Separately, release 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0. Search your code for LLMRails, follow the NeMo Guardrails documentation migration guidance, and keep the results in your test record.
Questions teams ask before running multi-config guardrails
What drives the effort of a multi-config NeMo Guardrails setup?
The effort grows with the number of configurations, how many rails each one runs, and how much those configurations share. Each configuration needs its own config.yml, Colang files and any Python actions, and each one may call different safety models or model endpoints. Shared pieces, such as a common set of actions or a base policy, reduce duplicated work but add a dependency that must be tested whenever it changes. Ask whether configurations will share rails and whether they must run in one process or can be split across processes, since that decision sets the structure of the whole build.
How long does a multi-config build take?
Duration depends mainly on the number of configurations, the rails in each, and how many of them need new custom actions or Colang logic rather than existing ones. A single configuration with off-the-shelf rails is a much smaller job than several configurations that each need their own topic control, retrieval checks and tests. Quotes should break the timeline into design, build, integration with your identity and infrastructure, and testing phases, so you can see which phase your own inputs will affect. Any figure should come from the written scope, not from a general estimate.
What must the platform team provide before the work starts?
The platform team needs to supply the hosting environment, the identity and access setup, named owners for each configuration, and a set of test cases that define correct behavior. Hosting includes container runtime capacity, network paths to any safety model endpoints, and secret storage for model credentials. Identity covers how callers authenticate to the server and which teams may call which config_id. Configuration owners decide what each policy blocks or allows, and test cases give the build a measurable acceptance point. Missing any of these usually moves work into later phases.
Can an internal team set up multi-config guardrails without outside help?
Yes, a team with Python, container and Kubernetes skills can do it, provided it has time to learn Colang, the server's configuration loading and the testing approach for guardrails. The harder parts tend to be defining policies with the business owners, writing tests that catch regressions across configurations, and running the server reliably under load. Teams often weigh their own capacity against the cost of delay and the risk of an unclear design. A fixed-scope engagement from DeployOpen can cover design, implementation, hardening and documentation, and the written scope will show which parts your team would keep.
What does a change to one configuration cost in testing?
A change to one configuration costs the time to rerun its own tests and any tests that cover shared actions or rails it depends on. Changes to a shared action or to the server's configuration loading can affect several configurations at once, so the test scope widens. Recurring costs include keeping test cases current as policies evolve and running them in each environment before release. Ask for a regression plan that names which tests run on each type of change, how long the suite takes, and who approves policy edits.
What should we ask for in a written quote for multi-config guardrails?
Ask for a quote that lists the configurations in scope, the rails and actions each one uses, and the safety model or model endpoints they call. The quote should state which environments are covered, how identity and config_id access are set up, and what documentation and test artifacts are delivered. It should separate one-time build work from recurring support, upgrades and continuous testing, and state what the client must provide and by when. Confirm how changes after sign-off are priced and what happens if a required input, such as a policy owner decision, is late.
Should configurations for different teams always run in separate server processes?
Not always. Running several configurations in one multi-config server keeps operations simpler, but a heavy or unstable configuration can affect the others. Separate processes isolate failures, allow independent scaling, and let each team upgrade on its own schedule, at the cost of more containers to deploy and monitor. Decide based on load profile, the sensitivity of each policy, and whether teams need separate change control. Confirm the decision with your platform and security teams before the design is fixed.
How DeployOpen scopes and delivers a multi-config guardrails server
DeployOpen starts with a written scope that names every configuration the server must serve, who owns each one, and how requests will select them. We then build, test and document the server inside your own infrastructure so your security and platform teams can review it before it carries traffic.
How we scope
- Inventory every guardrail configuration, its owner, and the applications that will call it through config_id.
- Decide whether each team gets its own configuration, a shared base, or combined rails, and record the reasoning in the scope.
- Agree in writing which processes, hosts and environments the server runs in, and what happens when one configuration fails.
- Engagements are fixed-scope, so deliverables and timelines are agreed before work begins, and ongoing support is available as a retainer.
How we build
- Structure configuration folders so each config loads independently and shared rails are defined once and reused.
- Set up request routing so callers select configurations by config_id, with rejection of unknown identifiers.
- Test each configuration on its own and in combination, covering blocked inputs, allowed inputs and unexpected config_id values.
- Decide the process split (one server or several) based on the team boundaries and latency targets set during scoping.
How we hand over
- Document each configuration's purpose, owner, rails, model endpoints and the config_id values that route to it.
- Provide the container and deployment files used to run the server, with the configuration folder layout and version pins.
- Walk your platform and security engineers through change control for adding or editing a configuration in production.
- Deliver test results and a retest record so your compliance team can review the evidence independently.
How we support
- Review configuration changes and new rails when NeMo Guardrails releases move forward, including planned upgrades.
- Monitor for drift between documented configurations and what the running server loads, and report deviations.
- Extend the test suite when a team adds a configuration or a new rail, before that change reaches production.
- Ongoing support, upgrades and continuous testing are available as retainers, with scope agreed in writing.

