Audit logging for AI agent actions with NeMo Guardrails

Learn which parts of an agent action NeMo Guardrails can record through logs and traces, what you must add yourself, and how to set it up for incident response and audits.

On this page

Why audit logging for AI agent actions starts with the guardrail trail

NeMo Guardrails can produce logs and traces of rail decisions, but the complete audit record of the text that triggered an action, how it was parsed, the parameters used and the authorization applied must be designed and verified in your own environment. When an agent calls tools on internal systems and your security or compliance team later has to explain what happened, the guardrail trail is one input to that explanation, not the whole record. The current release is 0.25.0, published under the Apache 2.0 license, and it has two entry points: the Python API and the guardrails server, which loads configurations from a folder and exposes an HTTP API. Your application logs, identity provider logs and tool-side logs still have to be joined to the guardrail output to reconstruct an event.

The deployment path you choose determines what you can log. NVIDIA has sunset the NeMo Guardrails microservice as of October 1, 2026, and its container will receive no new releases, so teams that were planning around that artifact need to decide between the library or server they run themselves and a platform path that NVIDIA's archived notice points to. The NeMo Helix repository, which documents guardrails as a gateway middleware plugin, is a different architecture with its own telemetry, so do not assume log fields carry across. Confirm which log and trace fields your chosen release emits by running a test configuration and inspecting the output, and record the release number alongside the evidence. The NeMo Guardrails documentation is the place to start that check.

Before the build starts, ask your team to write down the questions an investigator will ask about one agent action: which user input led to it, how the model's output was parsed into a tool call, which parameters were sent, and which identity and permission allowed it. Then test each question against a real run in a non-production environment. Any gap you find, such as a parameter that is logged in one place but not another, or an authorization decision that never reaches the log, becomes a design task for your own logging layer. Plan retention and access to these records with your compliance team from the start, because a trail that cannot be retrieved or that lacks the identity of the caller will not satisfy an audit.

Where each record is created along an agent action

The flow starts when a user message enters the guardrails runtime and passes input rails before the model proposes a tool call. Tool-call rails and execution rails then decide whether the custom action runs, and the action crosses the trust boundary to the internal API. Output rails and the reply follow, and each step is a point where a log or trace record may be written. Confirm in your version which steps emit records, which fields they include, and where authorization is decided before you rely on the trail.

Record points along one agent action, with the trust boundary around the guardrails runtime.

Which logging and tracing options fit which audit need

This table compares the logging and tracing options you can combine for NeMo Guardrails agent actions, showing what each records, what it misses, and the privacy and retention exposure it creates. Read each row against the two uses in the header, incident response and formal audit evidence, and treat every field name as something to confirm in the documentation for the release you run.

OptionWhat it records and what it leaves outPrivacy and retention exposureBest fit
Standard application logs (Python API or guardrails server)Service events, errors and rail outcomes at the log level you configure. Usually leaves out full prompt and tool argument text unless you enable it.Low to moderate. Confirm which fields can include user input before enabling verbose levels.Incident response triage and first-pass timelines
Trace output for rail executionWhich rails ran, in what order, and their decisions. Confirm whether it captures tool-call parameters and authorization context in your release.Moderate. Traces can carry prompt fragments, so set retention and access the same way as content.Reconstructing why an action was allowed or blocked
Content capture of user and model textThe exact user input, parsed model output and tool results, if capture is enabled. Leaves out nothing from the text itself.High. Stores personal data and possibly secrets, so it needs a legal basis, masking and a short retention period.Detailed incident reconstruction where policy permits it
Forwarding to a central log platformCopies of the events above, plus the timestamps and host fields your shipper adds. Leaves out anything filtered at the shipper.Moderate to high. Copies spread to more systems, each with its own retention and access rules.Correlating agent events with identity and network logs
Tamper resistance and retention controlsDepends on the platform, not NeMo Guardrails. Confirm write-once or integrity options with your log platform.Retention length drives storage and the scope of data that must be deleted on request.Formal audit evidence, where an assessor will ask how records were protected
Authorization context (identity and permissions used)Confirm whether the rails expose the user identity and permission scope in logs or traces for each action. Do not assume a field exists.Moderate. Identity fields are personal data in most jurisdictions.Showing that each action ran under an approved user context
Parse and parameter records for tool callsConfirm in the docs whether the parsed tool name and arguments are logged separately from raw model text.Moderate to high, because arguments often contain customer identifiers.Explaining how model text became an action

What an audit record for one agent action must contain

An audit record for one agent action needs four elements: the text that triggered the action, the tool call the guardrails parsed from it, the parameters passed to the action, and the authorization context, including the user identity the action ran under. The triggering text comes from the input the application sends to NeMo Guardrails, whether through the Python API or the HTTP API of the guardrails server. The parsed tool call is what the model proposed and what the rails validated. The parameters are the values that reached the custom action or tool, and the authorization context is the user identity and permissions the calling application passed in. Map each element to the rail or action that produces it, and write that mapping down before any build starts.

A gap in any one element makes an incident hard to reconstruct. Without the triggering text, you cannot tell whether a prompt injection or a malicious user request started the sequence. Without the parsed tool call, you cannot tell whether the model asked for something different from what the execution rail checked. Without the parameters, you cannot show what data left your system or which record was changed. Without the authorization context, you cannot say whose permissions the action used, which matters most when an action runs under a shared service account. Logs that show only the final answer usually miss one of these four.

NeMo Guardrails does not guarantee that all four elements are captured. Which log entries and trace spans it emits depends on the version, the configuration and the engine you enable, so confirm each field against the NeMo Guardrails documentation for the release you run. Then verify each element with a test call: send a canary prompt with a known user identity, trigger a blocked action and an allowed action, and check that each element appears in the log or trace. Test the failure path as well. Do not rely on NVIDIA's microservice logs, because the NeMo microservices have been sunset, so confirm where your deployment writes its records.

How to set up agent action logging in a test environment first

This sequence builds audit logging for agent actions in an isolated test environment, so you can confirm that every tool call, blocked call and authorization decision produces the records your incident response and audit teams will need before anything reaches production.

  1. Choose the deployment path for the test

    Decide whether the test runs through the Python API inside your agent application or as a guardrails server built from the Dockerfile the project provides. A server is easier to point at a central log platform, while the Python API keeps everything in one process for early experiments. Record the choice, the host or container it runs on, and who owns it. Done when a single test request reaches the guardrails layer and returns a response, which confirms the path works before any logging is added.

  2. Pin the NeMo Guardrails release

    Install a specific version of nemoguardrails rather than floating to the newest package, and confirm the interpreter is Python 3.11, 3.12 or 3.13. The current release is 0.25.0, published under Apache-2.0, so pin that version, or the version your organization has approved, in your requirements file. Record the pinned version in the test notes so audit evidence can later show which software produced each log. Done when the installed version reports the pinned value and the import succeeds.

  3. Set log level and trace output in the configuration folder

    Create the configuration folder with config.yml and any Colang files, then enable the logging and tracing options that the official documentation describes for your version. Confirm the exact configuration keys, their names and their allowed values in the NeMo Guardrails documentation before you copy them, because keys change between releases. Set the level so that rail decisions, parsed action names and parameters are recorded, and confirm where trace output is written. Done when a test run writes a log entry that names the rail that fired.

  4. Route logs to the central platform

    Send the test logs to the same log platform your security team uses, such as your existing log management or SIEM system, using a dedicated index or stream for test traffic. Confirm with the platform owner how records are parsed, how long they are retained and who can read them. Do not assume the library forwards logs by default; verify the transport in your environment. Done when a test entry appears in the central platform within the time your team considers acceptable, with its source field identifying the test instance.

  5. Run representative agent actions, including a blocked one

    Drive the test agent through a small, scripted set of actions: one allowed tool call with valid parameters, one call with parameters that fail schema or allow-list checks, one tool result that the rails should inspect, and one request that a rail is expected to block. Record the input, the expected outcome and the identity used for each run so results can be compared later. Done when the script finishes and you hold a list that maps each run to its expected outcome.

  6. Confirm a blocked call produces a record with its reason

    Open the central log entries for the blocked run and check that a record exists, that it names the rail that stopped the call, that it contains the text that triggered the decision, and that it states the reason. Repeat the check for the allowed run to confirm the parsed action, its parameters and the authorization context appear. Note any missing field as a gap to fix before production. Done when every scripted run has a matching record with all expected fields, and the blocked run's reason is readable without reading source code.

  7. Check each audit element against a field list

    Compare the test records with a written field list covering the triggering text, the parsed action and its parameters, the authorization used, the decision and the timestamp, and the software version. Ask your compliance and incident response leads to review the list, and confirm which fields your organization must retain. Where the library does not emit a field, record that gap and decide whether to add it in a custom action or in the calling application. Done when each element on the list is either present in the test records or listed as an accepted gap with an owner.

Security risks in agent audit logs and how to contain them

Audit logs for agent actions capture the most sensitive path in the system: what users typed, what the model decided, and what credentials and parameters were used. Each card below names one exposure, the control to put in place, and the owner who should confirm it before logs go live.

Personal and secret data in logged text

Logged user prompts and model outputs can contain personal data, customer records or secrets pasted by users. Decide which fields are logged verbatim, which are masked or hashed, and which are dropped before they reach the log sink. Confirm that the masking applies to traces and error messages as well as the main audit record, because a second log path often bypasses the first.

NeMo Guardrails docs

Credentials inside action parameters

Tool call parameters sometimes carry API tokens, session identifiers or connection strings. Record parameter names and types, and redact values that match credential patterns before writing. Confirm with the application owner that credentials never travel as tool arguments in the first place, since redaction is a fallback and not a substitute for keeping secrets out of the model context.

Log access separated from the agent

The agent that produces audit records must not be able to read, edit or delete them. Store logs in a destination the agent's service account cannot write to after the fact, and restrict read access to security and compliance roles. Confirm this with the platform team by testing whether the agent identity can reach the log store at all.

Retention and deletion aligned to policy

Audit trails of agent actions can hold personal data for longer than the business needs it. Set retention periods per log type, so routine traces expire sooner than authorization decisions retained for investigations. Confirm with legal and data protection owners that deletion requests can reach copies held in traces, backups and search indexes.

Tamper-evident log storage

An attacker who compromises an agent may try to erase the evidence of its actions. Write logs to append-only storage or forward them to a separate system that the application cannot modify, and consider hash chaining or signed batches for records that matter in an investigation. Confirm with the security operations team that gaps in sequence numbers or missing batches raise an alert.

Logging pipeline as an injection path

Log viewers and dashboards can render text from model output, so a prompt injection that writes markup or formula-like content into a log may execute when an analyst opens it. Treat logged content as untrusted, escape it in every viewer, and avoid auto-running links or commands found in records. Confirm this with the team that owns the dashboard tooling before analysts use it during an incident.

What to confirm before you rely on NeMo Guardrails logs as audit evidence

Before any NeMo Guardrails log or trace goes into an incident file or an assessor's evidence folder, confirm the exact field names your release emits. Record the names from a test run on the version you deploy, not from examples in documentation, and check them again each time you upgrade. Ask whether the names and record structure are stable across releases and what NVIDIA's NeMo Guardrails release notes say about changes to logging. Your evidence design should assume that a field used in a control narrative can be renamed, so pin the version and keep a reference of the schema you tested against. The experimental IORails engine needs its own check: confirm whether its tool-call rails write the same records as execution rails for the parsed call, its parameters, and the authorization applied. If they differ, a single query across both paths will miss events.

Colang 1.0 and Colang 2.x flows may not record the same things. Confirm which dialect each flow uses and run a sample action through each, then compare what reaches your log store. Also plan for migration. NVIDIA documents a conversion path with the nemoguardrails convert tool and states that converted configurations still need manual review, so any flow that was converted needs a fresh log test and a sign-off that its trace still shows the trigger text, parsing result and authorization decision.

Control plane is the other decision to settle. NVIDIA's NeMo Guardrails microservice container has been sunset as of October 1, 2026, and NVIDIA's archived NeMo Microservices documentation directs existing users to their account team. The NeMo Platform repository that the sunset notice links to now resolves to NVIDIA-NeMo/nemo-helix, which documents NeMo Guardrails running as an inference gateway plugin. That is a separate documented path with its own logging behavior. Confirm with NVIDIA which control plane you will run, whether your current deployment uses the library, a guardrails server, or the retired container, and which logging path each produces. Do not assume the records from one carry over to another.

DeployOpen can plan the logging design, configure the sinks, write the test cases that prove each record type, and prepare the evidence pack for your compliance team. DeployOpen does not issue audit reports, attestations or certifications. Your internal audit function or an independent auditor decides whether the evidence is sufficient, so agree that standard with them early.

Questions buyers ask about agent audit logging before hiring help

How much effort does audit logging for AI agent actions take?

Effort depends mainly on how many tools the agent can call, which Colang version the configuration uses, where logs must go, and how long they must be kept. Each tool needs its own record of the triggering text, parsed parameters and the authorization used, so a short list of tools is a small job and a large catalog is a much bigger one. Colang 1.0 is the default in NeMo Guardrails 0.25.0, and NVIDIA documents a Colang 1.0 to 2.x migration that still needs manual review, so a team on mixed versions will spend more time on consistent logging. Ask any partner for a written scope that lists tools, log destinations and retention so the estimate follows from those items.

Can our team configure agent audit logging without outside help?

Yes, a team with Python and NeMo Guardrails experience can configure logging on its own, since the library is open source under Apache 2.0 and runs through its Python API or a guardrails server with a config.yml file. The harder parts are usually outside the library: agreeing what an incident reviewer needs to see, mapping identities and authorization decisions to log fields, and confirming that the records meet your privacy and retention rules. Teams often bring in outside help for those decisions and for the review of what gets written to disk. Whether you need that help depends on how many people already know the tool stack and how many audit requirements apply to it.

What does the logging work need from our team?

Plan for access to a non-production environment that mirrors your production agent, a complete inventory of the tools and actions the agent can invoke, and named owners for identity and for the log platform. The identity owner confirms which user or service identity each action runs under and how authorization is recorded. The log platform owner confirms the destination, retention period, access rights and any restrictions on storing prompt text. Security or compliance staff should review what content is captured, since prompts can contain personal or sensitive data. Without these inputs, the design usually has to be reopened later.

How long does a logging pilot take, and what sets that?

The duration is set by the tool count, the Colang version in use, how many log destinations are involved and how quickly reviews of privacy and retention can be completed. No pilot duration is published here, so ask for it in a written scope that names the tools covered, the environments used and the review dates. A narrow pilot on one agent and one log destination moves faster than a rollout across several agents, each with its own identity model. Scheduling also matters, because access to test systems and owner sign-off often take longer than the technical build.

What is free under Apache 2.0, and what do we pay for?

NeMo Guardrails is an open-source library licensed under Apache 2.0, so the library itself carries no license fee, and its source is published in the NVIDIA-NeMo/Guardrails repository. You still pay for the infrastructure that runs the agent and stores the logs, the engineering time to design and configure the records, testing, and any external log platform you choose. NVIDIA has also retired the NeMo Guardrails microservice as of October 1, 2026, according to its NGC catalog notice, so confirm which packaging your team will run and whether any NVIDIA commercial product is part of the plan before you commit budget.

How does a retainer cover upgrades to the logging setup?

A retainer covers ongoing work after the first build, including reviewing upgrades, testing the logging after each change and fixing records that stop matching the tool calls. This matters for NeMo Guardrails because the library moves between releases, such as 0.24.1 on 16 September 2026 and 0.25.0 on 19 November 2026, and version 0.25.0 deprecates the LLMRails class in favor of Guardrails. Ask any partner which upgrade tasks, test runs and response times the retainer includes, and whether a new Colang version or a log destination change counts as in scope.

How DeployOpen scopes and delivers agent audit logging

DeployOpen plans agent audit logging as a written, fixed-scope piece of work inside infrastructure you control. We define which agent actions, tool calls and authorization decisions must be recorded, then build and test the NeMo Guardrails logging and tracing setup so your incident response and audit teams can rely on it.

How we scope

  • Inventory every agent, tool and custom action whose calls must leave an audit trail, with owners named for each.
  • Agree in writing which fields are captured for each action: input text, parsed call, parameters and the authorization used.
  • Set retention, access and redaction rules for logs that may contain personal or sensitive data, before any build starts.
  • Confirm the deployment model, such as the Python API or guardrails server, and the NeMo Guardrails release version to be pinned.

How we build

  • Configure NeMo Guardrails logging and tracing for rail decisions, then verify each event with test agent sessions.
  • Connect logs to your existing collection, storage and search stack in the infrastructure you already run.
  • Test that blocked and allowed tool calls both produce complete records, including failures and rejected authorizations.
  • Document the log schema, event sources and known gaps so your team can review them against its own requirements.

How we hand over

  • Deliver the written configuration, log schema and runbook for finding and exporting a single agent action end to end.
  • Walk your security, platform and compliance teams through sample incident queries and audit evidence exports.
  • Record open decisions, such as retention periods and data owners, so they are assigned to named people at handover.

How we support

  • Support is available as a retainer for upgrades, log schema changes and periodic retesting after new agents or tools are added.
  • Review each NeMo Guardrails release for changes to logging or configuration before it is rolled out to your environment.
  • Scope changes are agreed in writing, so audit evidence stays consistent with the setup your auditors reviewed.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.