What execution rails do for custom actions in NeMo Guardrails
Execution rails check the inputs and outputs of custom actions that a Colang flow invokes. If your assistant calls Python custom actions that read or update internal systems, such as a ticketing API, a customer lookup or an account service, execution rails are the point where you can validate the arguments before the call and the data after it returns. NeMo Guardrails defines execution rails as one of five rail types, alongside input rails, dialog rails, retrieval rails and output rails. The library documents them for custom actions and tools. Teams need them when a flow can pass model-influenced values into a system of record, because otherwise nothing between the model's output and the API call inspects those values.
Start by listing every custom action your flows can reach and marking the ones that touch internal systems, change records or return sensitive fields. For each one, write down what a valid input looks like and what a safe output looks like, then check those rules against the documentation for your installed version. The current release is 0.25.0, published on 19 November 2026, and it requires Python 3.11, 3.12 or 3.13. Confirm which Colang version your config.yml and flows use, since Colang 1.0 is the default and Colang 2.0 is also supported. If you migrate with the nemoguardrails convert tool, plan a manual review of the converted flows before you rely on any rail logic. Confirm the exact rail hooks available to your Colang version in the NeMo Guardrails documentation before you design around them.
How a Colang flow passes through execution rails
The diagram starts with a user message entering the NeMo Guardrails runtime, where input rails run first. A Colang flow then decides to call a custom action, and execution rails check the action's inputs before the call and its outputs after it. The custom action runs inside the trust boundary you define, and output rails check the final response before it returns to the user. Confirm where the action code executes in your deployment, since that determines what the trust boundary covers.
Message flow through input rails, a Colang flow, execution rails around a custom action, and output rails.
Execution rails compared with IORails tool rails and when each fits
This table compares execution rails on Colang flows with IORails tool rails across what they check, the setup they need, where they run and when to pick each. Read it with your NeMo Guardrails version in hand, because the engine choice and its behavior depend on that version. The main takeaway is that flow-driven action calls point to execution rails, while model-chosen tool calls point to IORails, pending confirmation in the documentation.
| Aspect | Execution rails on Colang flows | IORails tool rails |
|---|---|---|
| What it checks | Inputs and outputs of custom actions invoked from a Colang flow | Schema and allow-list checks on model tool calls and the results sent back |
| Trigger point | The flow step that calls a named custom action | Model output containing a tool call, checked before the call runs |
| Engine and configuration | Colang runtime, with Colang 1.0 as the default; confirm 2.x behavior for your version | Experimental IORails engine, enabled explicitly; confirm the setting for your version |
| Maturity | Part of the core rail types documented for the library | Experimental; confirm stability and supported behavior before production use |
| Where it runs | In the guardrails runtime, unless actions are moved to a separate actions server | Within the guardrails runtime that handles the model call; confirm placement for your deployment |
| Failure behavior | Depends on how the flow handles a blocked action; design the fallback path explicitly | Designed to fail closed on invalid calls; confirm the exact response for your version |
| Typical fit | Flows that call internal services or actions your team writes and owns | Agents where the model selects tools and arguments and each call needs validation |
| Upgrade exposure | Colang 1.0 to 2.x conversion needs manual review of converted flows | Confirm changes to the engine and its settings in each release note before upgrading |
| Key question | Is the action call fixed in a flow your team controls? | Does the model choose the tool and its arguments at runtime? |
Setting up execution rails for a custom action
This sequence takes a team from a confirmed Python and NeMo Guardrails environment to a tested execution rail that checks the inputs and outputs of a custom action invoked from a Colang flow. Each step ends with a check you can run before moving on.
Confirm the Python version and release
Confirm that the host runs Python 3.11, 3.12 or 3.13, then install the nemoguardrails package at version 0.25.0 in a clean virtual environment. The package is licensed under Apache-2.0 and is published on PyPI. Check the install by running
nemoguardrails --helpand confirming the version withpip show nemoguardrails. If the version does not read 0.25.0, stop and resolve it before writing any configuration, because the Colang and action APIs differ between releases.Write the config.yml and configuration folder
Create a configuration folder containing a
config.ymlthat names the model the application will use and declares the rails to enable. Place the Colang files and the Python action file in the same folder, since NeMo Guardrails loads them from there. Choose Colang 1.0 (the default) or Colang 2.0 explicitly and keep that choice consistent across every file. Check the setup by loading the folder with the Python API or the guardrails server and confirming that it starts without configuration errors.Implement the Python custom action
Write the custom action as a Python function in the configuration folder that performs the internal call the model should not make directly, such as a lookup against an internal service. Keep credentials in the action's environment or a secrets store, never in the prompt or the Colang files. Test the function on its own with a fixed input so that its return value is known before any guardrail depends on it. The step is complete when the function returns the expected value for a known input without involving the model.
Define the Colang flow that calls the action
Write a Colang flow that matches the user intent, then invokes the custom action by name with the parameters it needs. Keep the flow narrow so that only the approved action can be reached from this intent. Run a sample request through the Python API and confirm in the logs that the action was invoked with the expected parameters and that the response reached the user. This check confirms the flow is wired correctly before any execution rail is added.
Add the execution rail flow
Add a flow that runs around the custom action so that its inputs are checked before the call and its output is checked before the result returns to the model or the user. Use the checks your policy requires, such as schema or allow-list validation of parameters and content checks on returned data. Define the blocked path explicitly, so a failed check returns a fixed refusal message rather than the raw result. Confirm the rail is registered by checking that it appears in the loaded configuration and in the trace for a sample request.
Test a blocked output and a permitted call
Send one request that should pass and one that should fail the execution rail, such as a parameter outside the allow-list or a returned value that breaks the output check. The permitted request should show the action invoked and the result returned. The failing request should show the action invoked or blocked as designed and return the fixed refusal, with no raw data in the response. Record both traces, because they become the baseline for regression tests and for later audit logging.
Repeat the tests through the guardrails server
Start the same configuration folder with the guardrails server and send the same two requests over its HTTP API, then compare the responses with the Python API results. Differences usually come from configuration paths, environment variables or model settings that differ between the two entry points, so resolve them before the server is used by any application. The step is complete when both entry points return identical outcomes for the permitted and blocked requests. Confirm the Dockerfile build of the server image only after this matches.
Security risks when custom actions sit behind guardrails
A rail checks what goes into and comes out of a custom action, but it does not decide whether the action should run for this user. The six risks below sit at the boundary between the rail, the action and the application, and each one maps to a configuration or operations decision your team has to make before go-live.
Rails do not replace authorization
An execution rail inspects the arguments and results of an action, but the action itself must still enforce who may call it and on which records. Treat the rail as one control in a stack, not the gate. Check that every custom action performs its own permission check against the end user's identity, and that a request crafted to bypass the rail still fails in the backend API. Ask the team which system is the source of truth for permissions.
Keep credentials out of prompts and rails
Actions often need API tokens or database passwords. If those values appear in the prompt, in Colang variables, or in text a rail logs, the model or a log reader can see them. Load credentials inside the action from a secrets store at runtime, and confirm that rail inputs and outputs carry only the business fields the action needs. Review what the rail receives before you rely on it to redact anything.
Fail closed on rail and action errors
If a rail times out, a model call fails, or an action raises an exception, the safe default is to refuse the call and return a generic message. Decide this per action before launch and test it by forcing each failure path. Confirm that a failed check never falls through to the action, and that error text returned to the user does not reveal internal hostnames, stack traces or service names.
Log blocked calls with enough detail
Rails that stop a call should leave a record: which rail fired, which action was requested, the parameters after parsing and the user identity. Without this, a blocked attack looks like an ordinary error and incident responders cannot reconstruct it. Decide where these logs are written, who can read them and how long they are kept, and confirm that the log format captures the decision rather than only the final text.
Actions share the app process
When custom actions run inside the same process as the application, a fault or memory problem in one action can take down the whole assistant, and any code in the action has the application's privileges. Running actions in a separate process narrows that blast radius and lets you set network rules for the action host. Decide which actions need isolation, and document which network paths each action may reach.
Retained data in traces
Tracing tools record inputs, outputs and tool arguments, which can include personal data, account numbers or document contents passed through an action. A trace store that keeps this data longer than the application does creates a second copy to protect and delete. Before enabling tracing, decide which fields are captured, set a retention period with the data owner, and confirm that deletion requests can reach trace storage.
Questions teams ask before adding execution rails
Who does the work when a company adds execution rails?
Your engineers can write the rails, or you can hand the work to a partner under a fixed-scope engagement. Execution rails sit in the Colang flows and the custom actions your application already calls, so the work is shared between the team that owns the actions and the team that owns the guardrail configuration. A written scope should name the actions in scope, what each check returns, the tests that prove it, and who reviews changes before release. Ask any partner who maintains the configuration after handover, and whether they offer an ongoing retainer for upgrades and retesting.
Can our team add execution rails to NeMo Guardrails alone?
Yes, a team with Python and Colang experience can build execution rails in-house. The library is open source under Apache 2.0, and release 0.25.0 requires Python 3.11, 3.12 or 3.13. The hard parts are less about installation and more about design and verification:
- Writing Colang flows correctly in the version you run, since Colang 1.0 is the default and 2.0 is also supported.
- Validating action inputs and outputs so that a failed check blocks the call instead of passing it through.
- Testing the failure paths, including what the user sees when a check rejects a call.
If your team has not built guardrails before, plan extra time for these steps or bring in outside help for the first version.
What drives the cost of execution rails up or down?
Cost depends on how many custom actions you guard, how many inputs and outputs each one checks, and how deep the testing goes. Other drivers include the Colang version you use, whether the rails run inside a Python application or a guardrails server, how the rails connect to your identity and secrets systems, and how many environments must be validated. Internal cost is mostly engineer time. A partner quote covers labor for the written scope, and recurring costs come from upgrades and retesting. DeployOpen does not publish a price list, so ask for a quote that lists each action, each check, the test cases, the deliverables and what is excluded.
How long does planning a first version of execution rails take?
No standard duration applies, because the time depends on the number of actions, the complexity of their checks and the state of your test environments. Planning usually covers an inventory of custom actions, a decision on the engine and deployment target, a list of checks per action, and agreed acceptance tests. Ask for a timeline in the written scope that separates planning, build, testing and handover. Also ask which of your teams must approve the design and how many review rounds the timeline assumes.
Which engine should we choose for execution rails?
Choose the engine by where the check runs. Execution rails for custom actions invoked from Colang flows are part of the Colang-based configuration, so the checks live in flows that your team authors. Tool rails that validate tool calls and tool results belong to the IORails engine, which NeMo Guardrails documents separately. Confirm the status of IORails in the release you plan to run and the steps to enable it, because the engine's availability and configuration can change between releases. Map each custom action to the engine that will check it before you write any flows.
Do execution rails change after a NeMo Guardrails upgrade?
They can, so plan each upgrade as a change to the configuration. The current release, 0.25.0, was published on 19 November 2026, and the previous one, 0.24.1, on 16 September 2026. Release 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0, and NVIDIA publishes a 0.25 migration guide. For Colang 1.0 to 2.x, NVIDIA provides the nemoguardrails convert tool, but it states that converted configurations still need manual review. Pin the version, rerun your execution rail tests, and read the release notes before each upgrade.
Is the NeMo Guardrails microservice still an option for hosting execution rails?
No. NVIDIA states that the NeMo microservices were sunset as of October 1, 2026, that there will be no new releases, and that the container is no longer supported. NVIDIA's archived documentation says new development has moved to NeMo Platform and asks existing users to contact their NVIDIA account team. Plan new deployments around the open-source library, either embedded in a Python application or run as a guardrails server that loads configurations from a folder. Confirm with your NVIDIA account team what applies to any existing microservice deployment and its support terms.
What does the work need from our side?
The work needs named owners, access and a test environment. Provide source access to the custom actions, the Colang or configuration repository, and sample inputs and outputs for each action, including real-world edge cases from your logs. Your security team should confirm how credentials reach the actions, which data may appear in traces and which accounts run the rails. Assign one reviewer who can approve design decisions quickly. Also provide a staging environment that matches production networking, because checks that work locally often fail once they call internal services.
Limits to confirm in your environment before relying on execution rails
Execution rails sit on top of a runtime that changes between releases, engines and Colang versions. The cards below cover the version, engine and configuration limits to settle first, then the checks that execution rails never perform on their own.
IORails engine status
Tool rails that validate tool calls and results run on the IORails engine, which the project treats as experimental. Confirm whether your team can accept an experimental engine in a production path before you design execution rails around it. If it is not acceptable, plan custom action checks on the standard engine and document the decision for your change board.
NeMo Guardrails docsColang 1.0 and 2.0 differences
Colang 1.0 is the default, and Colang 2.0 is supported as a separate language. Flow syntax, action invocation and rail outcomes can differ between the two, so an execution rail written in one version may not behave the same in the other. Confirm which version your configuration uses and test each custom action flow under that version.
Python version requirements
Recent NeMo Guardrails releases require a specific range of Python versions. Check the interpreter used by your application, your server image and any action runner before installing. A mismatch can block the install or the server start, which stops every execution rail at once rather than one action.
- Supported Python
- 3.11 to 3.13
LLMRails deprecation
The LLMRails class is deprecated in favor of Guardrails in the 0.25 line, and removal is planned no earlier than 0.27.0. Code that registers custom actions through LLMRails should move to the new class on a planned schedule. Confirm the removal timing against the release notes for your pinned version before you lock the integration.
Release notesManual review after conversion
NVIDIA's migration tooling can convert Colang 1.0 configurations to 2.x, but the converted output still needs manual review. Check every converted custom action flow, including the points where input and output checks run around the action call. Keep the reviewed files under version control so each later change has a record.
Colang 2 migration guideWhat execution rails do not check
Execution rails inspect the parameters and results that pass through a custom action. They do not decide whether the caller may use the downstream API, scope the data that API returns, or replace the access controls of the systems behind it. Those checks belong in the downstream API, its gateway and the identity behind the user context. Confirm each one with the owner of the target system before launch.
Which engine each rail type needs and why it matters
The engine you choose decides which code path runs your checks, so pick it before you write any rails. NeMo Guardrails 0.25.0 uses the Colang runtime by default, and Colang 1.0 is the default configuration language. With this setup, execution rails for custom actions usually run inside Colang flows: the flow calls an action, the rail inspects the arguments and the returned result, and the flow either continues or stops. The IORails engine is a separate path, marked experimental in the sibling topic on agent tool calls, that checks tool calls and tool results as the agent loop emits them. Both can exist in one project, but they are not interchangeable, so a rail written for one path does not prove anything about the other.
Match the engine to how your application actually invokes tools. If your code decides in a Colang flow which action to call and with which parameters, the Colang execution rails sit exactly where that decision is made. If the model proposes structured tool calls that your application forwards directly, the call boundary is where the checks must sit, and that points toward the IORails path. Ask your engineers to draw every route by which an action can run, including direct calls from application code that never enter a flow. Each route needs a named engine and a named check. The engine also changes what a failure looks like: a Colang rail typically steers the flow to a defined outcome, while a tool-call rail decides whether the call proceeds at all.
Treat IORails as experimental until you have confirmed its status for your version. Check the NeMo Guardrails releases and the documentation for the engine's stability, supported features and known limits, and ask NVIDIA or your support channel what they will commit to. Then test each engine on its own path. Send malformed arguments, out-of-policy parameters and oversized or injected tool results, and confirm in traces that each check fired on the intended event. Repeat these tests after every upgrade, because the project has shipped new releases in quick succession, including 0.24.1 on 16 September 2026 and 0.25.0 on 19 November 2026.
How DeployOpen scopes and delivers execution rails work
DeployOpen approaches execution rails for custom actions as a written, fixed-scope piece of work inside your own infrastructure. We map which Colang flows call which custom actions, define the checks on each action's inputs and outputs, and hand over a configuration your engineers can run, review and extend.
How we scope
- We inventory the custom actions and Colang flows that call them, and record which engine each rail set will run on.
- We agree in writing which action inputs and outputs are checked, what happens on a failed check, and what is out of scope.
- Engagements are fixed-scope, so deliverables and timelines are confirmed in writing before any build work starts.
How we build
- We build execution rails in your target environment, with the rule set, action wiring and server configuration tracked in version control.
- We test allowed and blocked action calls with unit tests and adversarial inputs, including failure paths where a check cannot complete.
- We confirm the Python version and NeMo Guardrails release pinned for your environment, and note any deprecated class usage for your team.
How we hand over
- We deliver the configuration, action code, deployment files and a runbook describing how each rail decision is logged and reviewed.
- We document the trade-offs between the execution rails path and the IORails tool rails path, so your team can see why each engine was chosen.
- We walk your engineers through the test suite and the steps to add a new custom action under the same checks.
How we support
- Retesting after changes to actions, rules or the NeMo Guardrails release is included in the written scope when agreed.
- Ongoing upgrades, continuous testing and support are available as a retainer, with the coverage agreed in writing.
- Ask us to confirm how upgrades to a new NeMo Guardrails release affect your Colang files, since converted configurations still need manual review.

