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; scopes velocity limits
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.)
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nemo_tollwarden-0.1.0.tar.gz.
File metadata
- Download URL: nemo_tollwarden-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
938f71847e3a6caabe0384ab46ddd7ca3470eed4910d9a929fbafee4e901d1d3
|
|
| MD5 |
4fb83a2cc19ca1392cf6c900df53bb1f
|
|
| BLAKE2b-256 |
bb3941be90f0555e1503271bb51e6044dafb958fec90e46ecd114458a01eb703
|
File details
Details for the file nemo_tollwarden-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nemo_tollwarden-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b77a083822f7f1bde5f78b1a666787ea13850da4f2730b7043011e4c40ce9c67
|
|
| MD5 |
eda701bad0df75da75c11af489a761a0
|
|
| BLAKE2b-256 |
66b7431e0ee5caeb21b44e798e3b16d133b7f08c2157dc9e3dd19ea6bc5bc77b
|