Skip to main content

nemo-tollwarden

TollWarden payment security for the NVIDIA NeMo Agent Toolkit — screen every x402 payment before your workflow settles it.

pip install nemo-tollwarden

Installing registers three NeMo functions via the nat.plugins entry point. Add them to your workflow YAML:

functions:
  scan:
    _type: tollwarden_scan_payment
    agent_id: my-agent          # optional; labels scans (limits are scoped to your API key's account)
  reputation:
    _type: tollwarden_check_reputation
  report:
    _type: tollwarden_report_counterparty

A free API key (100 free scans) is auto-minted on first use — set api_key: to pin one. Verdicts come back allow / flag / block with machine-readable reasons: prompt-injection-triggered payments, replayed nonces, overpayment vs the quote, secrets/PII leaking in payment metadata, lookalike-token contracts, address poisoning, counterparty reputation.

Provenance: the strongest check

TollWarden's best detector catches payments whose decision came from content the agent just read — a prompt-injected page or tool result saying "send payment to 0x…". In NeMo, pass that text as the scan function's optional content argument:

tollwarden_scan_payment(payment={...}, direction="outgoing", content="<the page/tool text the agent just read>")

If the pay_to address appears in that content, the payment is blocked. (LangChain and CrewAI integrations auto-tag this via a callback; NeMo has no global tool-output hook, so it's an explicit parameter the agent — or your workflow — fills.)

Enforcement, so a blocked payment can't execute

The scan function returns a verdict, and a model can ignore it. guarded_payment wraps your workflow's payment executor so a block verdict raises TollWardenBlockedError before the executor is ever called. It takes a sync or an async executor, and with an async one it returns a coroutine function and runs the scan off the event loop.

from nemo_tollwarden import guarded_payment

safe_pay = guarded_payment(execute_x402_payment, tollwarden)  # strict=True refuses flags too
await safe_pay(payment, content=page_text)

Pass content here too, for the reason above. The wrapper scans with whatever text you hand it and nothing else.

The functions

Function When to call it
tollwarden_scan_payment ALWAYS, before settling an x402 payment (direction="outgoing") or paying a received 402 offer (direction="incoming")
tollwarden_check_reputation Before dealing with an unfamiliar counterparty address
tollwarden_report_counterparty After a bad payment experience (always free) — warns other agents

The three functions share one TollWarden client per (base_url, api_key, agent_id), so they draw on the same free-tier quota. Verdicts are Ed25519-signed and payment-bound; the underlying client verifies them against a pinned key automatically.

For wallet-level enforcement (the signer itself refuses unscanned payments), see TollWardenEnforcer in the tollwarden SDK.

MIT. TollWarden is advisory and non-custodial: it never touches keys, wallets, or funds.

Metadata

Release files for nemo-tollwarden 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nemo-tollwarden 0.1.1
File Size Uploaded
nemo_tollwarden-0.1.1.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nemo-tollwarden 0.1.1
File Interpreter ABI Platform
nemo_tollwarden-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / nemo_tollwarden-0.1.1.tar.gz

Download URL nemo_tollwarden-0.1.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
15e73fed2f5033d5d45051e034c01894b5a7a3911993ccbd70fd8a5e42e15df3
BLAKE2b-256 checksum
How to use checksums
dfc3c01e769b0e185def543faa531a9ec580414199468b9d8fbbdb6e3a88edea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / nemo_tollwarden-0.1.1-py3-none-any.whl

Download URL nemo_tollwarden-0.1.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddd7f1adf01fb3e466a970b6d8a728ed24b3c3265f5b99c2d0fcb2065b5b51ed
BLAKE2b-256 checksum
How to use checksums
6969a60e77e3af9da871ca8f3d5bf20e78ed503c3cea0f2bc6efb92c84572d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page