nat-revsec: RevSec for the NVIDIA NeMo Agent Toolkit
Ship NeMo Agent Toolkit agents your customers' security teams will approve.
Agents built with the NVIDIA NeMo Agent Toolkit take real actions: they refund orders, send emails, change records and call MCP servers. RevSec decides, before each action runs, whether the agent is allowed to take it, and keeps a record of what every agent did. Add one middleware to your workflow's YAML; your functions and agent code stay the same.
One middleware covers all three things an agent touches: its actions (Agent Security), the MCP servers it calls (MCP Governance) and what reaches its model (Model Security).
What it does for your business
- Stops risky actions before they happen. Each tool call is checked against your policies before it runs. A refund above a limit, a delete, or a call to an MCP server nobody approved is blocked, and the agent is told why, so it can answer the user instead of failing.
- Keeps prompt injection and leaked data away from your model. RevSec Model Security checks what the workflow is asked before the agent sees it, and what tools hand back (web pages, documents, MCP replies) before the model reads it, for instructions aimed at the model, secrets and personal data. Your organisation's own prompt rules apply too.
- Governs your MCP servers. Each call through an
mcp_clientfunction group is checked against that server: whether it is approved, its policies and its known vulnerabilities. - Gives you one view of every agent. Each workflow appears in your RevSec console as an agent with its model, its tools and MCP servers, its risk rating, and its decisions grouped by conversation. Prompt and tool-result checks also show in Model Security.
- Proves control, action by action. Replay any session in Activity Explorer: what the user asked, each tool and MCP call, and what RevSec decided. Frameworks shows which controls in the EU AI Act, ISO/IEC 42001, NIST AI RMF, SOC 2 and more your policies are mapped to, and Evidence Packs gather the evidence for a customer's security review or auditor.
- Works alongside NVIDIA's own controls. Keep NeMo Guardrails and the toolkit's own middleware. RevSec adds each customer's own rules, approvals and record.
Quick start
pip install "nat-revsec[mcp]"
Get a key from the RevSec console (Customer accounts → New key in a builder account, or Settings → SDK), then:
export REVSEC_API_KEY=rsk_...
export REVSEC_BASE_URL=https://app.revsec.app/fcc
Add the revsec middleware and list it on the workflow, the functions and the function groups it should cover:
middleware:
revsec:
_type: revsec
agent_name: orders-agent
functions:
lookup_order:
_type: lookup_order
middleware: [revsec]
refund_order:
_type: refund_order
middleware: [revsec]
function_groups:
notes:
_type: mcp_client
server:
transport: stdio
command: npx
args: ["-y", "@acme/notes-mcp"]
middleware: [revsec]
llms:
nim_llm:
_type: nim
model_name: meta/llama-3.3-70b-instruct
workflow:
_type: react_agent
llm_name: nim_llm
tool_names: [lookup_order, refund_order, notes]
middleware: [revsec]
nat run --config_file workflow.yml --input "Where is order A1?"
That's all. The first request registers the agent in RevSec. From then on its tool calls, requests and tool results are checked, and the decisions show in the console.
What RevSec checks
| When | What | If RevSec stops it |
|---|---|---|
Before the agent runs (on the workflow) |
What the workflow was asked | The model is never called; the caller gets a short reply saying it was blocked |
| Before each function call | The workflow's own functions, against the agent's policies | The function never runs; the agent gets a result saying why |
| Before each MCP tool call | The call, against that MCP server: whether it is approved, its policies, its known vulnerabilities | The call never reaches the server; the agent gets a result saying why |
| After each call | What the function or MCP server handed back | The model gets "withheld" instead of the content |
Blocked calls are recorded, and MCP calls record whether they succeeded or failed and how long they took. Only the
workflow, functions and function groups that list revsec under middleware: are checked.
MCP servers
Tools from an mcp_client function group are checked against that MCP server, filed under the group's name with its
address (remote) or the package its command starts (local). A tool exposed under an alias (tool_overrides) is checked
under its name on the server. RevSec never sends the launch command's other arguments or its environment, which can
carry tokens.
Options
middleware:
revsec:
_type: revsec
agent_name: orders-desk # default: the workflow's name
customer_facing: true # shown on the agent and used in its risk rating
description: Handles order questions and refunds
owner_email: team@example.com
environment: production
on_block: message # or raise
failure_mode: fail_open # or fail_closed: block calls when RevSec can't be reached
check_prompts: true # false when model calls go through the RevSec AI gateway
check_tool_results: true
dlp: false # true also scans what each call sends out for sensitive data
api_key and base_url can be set here too; by default they come from REVSEC_API_KEY and REVSEC_BASE_URL.
With on_block: raise, a blocked call raises revsec.RevsecBlocked. The toolkit's agents treat a function that
raises as a failed tool call and tell the model, so the run usually goes on; a blocked request raises from the
workflow itself. Either way, the blocked call never runs.
If RevSec can't be reached, calls go ahead by default, so an outage never stops your product. Set
failure_mode: fail_closed to block them instead.
Requirements
- Python 3.11 or later, and the NeMo Agent Toolkit 1.8 or later (
nvidia-nat-core) nvidia-nat-mcpfor MCP servers (installed by themcpextra)- A RevSec account: start a free 30-day trial, no card needed
Links
- RevSec: https://app.revsec.app/start?from=nemo-agent-toolkit
- Source and issues: https://github.com/RevUp-AI/nat-revsec
- The RevSec Python SDK: https://pypi.org/project/revsec-sdk/
Licensed under Apache 2.0. RevSec is a product of RevUp AI LLC. NVIDIA and NeMo are trademarks of NVIDIA Corporation; this package is not made or endorsed by NVIDIA.
Metadata
Release files for nat-revsec 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nat_revsec-0.1.0.tar.gz | 23.9 kB | Without provenance | Details for nat_revsec-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nat_revsec-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nat_revsec-0.1.0-py3-none-any.whl |
Total release size: 40.7 kB
Release files / nat_revsec-0.1.0.tar.gz
| Download URL | nat_revsec-0.1.0.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8ae0972bd3e626dcd5d386e113c37b24a3510f3eb0cd918f9ed53b72ea5bb1d
|
|
BLAKE2b-256 checksum How to use checksums |
26639e42680e2ae43ddb4b859e871568d8399dfb0fea0d34d0c56d3c404de24c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / nat_revsec-0.1.0-py3-none-any.whl
| Download URL | nat_revsec-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ad61a0b644ad76aa7dc039ed79cbdeb60da8ce48fcb2c9864de5bdabf5093e0
|
|
BLAKE2b-256 checksum How to use checksums |
585924bfdc2b76007d6fcc2feaa63e611d90570e8c88f5347f5ebb7da8c82d15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Security for nat-revsec 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.