Skip to main content

agentkit-tollwarden

TollWarden payment security for Coinbase AgentKit — a scan-before-you-pay action provider for x402 payments.

pip install agentkit-tollwarden

Add the action provider

from coinbase_agentkit import AgentKit, AgentKitConfig
from agentkit_tollwarden import tollwarden_action_provider

agent_kit = AgentKit(AgentKitConfig(
    wallet_provider=wallet_provider,
    action_providers=[
        tollwarden_action_provider(agent_id="my-agent"),   # free key auto-minted
        # ... your other providers
    ],
))

The agent gets three actions — tollwarden_scan_payment, tollwarden_check_reputation, tollwarden_report_counterparty — each described so the model calls them at the right moment. 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.

Two AgentKit-native touches

Wallet payer auto-fill. tollwarden_scan_payment receives AgentKit's wallet_provider, so when you don't supply a payer it fills in the agent's own wallet address, so every scan records which wallet is paying. Velocity and first-contact limits are scoped to your API key's account (the SDK mints one automatically); payer scopes them only for anonymous scans. Supply payer explicitly to override.

Provenance for injection detection. TollWarden's strongest check catches payments whose decision came from content the agent just read. Pass that text as the scan action's optional content argument; if the pay_to address appears in it, the payment is blocked.

Enforcement, so a blocked payment can't execute

The actions rely on the model choosing to scan and then obeying the verdict. guarded_payment doesn't. Wrap your payment executor with it and a block verdict raises TollWardenBlockedError before the executor is ever called.

from agentkit_tollwarden import guarded_payment

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

With wallet_provider, the scan's payer is filled from the agent's wallet the same way the scan action does it, and the executor still receives the payment exactly as you passed it. Pass content for the same reason as above. AgentKit has no hook that sees what the agent read, so the prompt-injection check runs only on text you hand it.

Non-custodial by design

TollWarden only reads payment metadata to produce a verdict — it never signs, holds, or routes funds, and the action provider never touches the AgentKit wallet's keys. The settle/refuse decision stays with your agent. Verdicts are Ed25519-signed and payment-bound; for wallet-level enforcement (the signer itself refuses unscanned payments), see TollWardenEnforcer in the tollwarden SDK.

MIT.

Metadata

Release files for agentkit-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 agentkit-tollwarden 0.1.1
File Size Uploaded
agentkit_tollwarden-0.1.1.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 16.0 kB

Release files / agentkit_tollwarden-0.1.1.tar.gz

Download URL agentkit_tollwarden-0.1.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3fa6281f007cb7dce3d0503b9248a0138aa40530dc37046d183a7cf4d859870d
BLAKE2b-256 checksum
How to use checksums
ec3c60c051a7dcace15b4c0d82b82e5b907fff17b23cebc503fbb19f021f12c7
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 / agentkit_tollwarden-0.1.1-py3-none-any.whl

Download URL agentkit_tollwarden-0.1.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e54d32c19d54d26b86efb4f5872c06ac3e1705f036cae0369384682b685322c
BLAKE2b-256 checksum
How to use checksums
98ebd84cc74013ba8cfad4132527bdb04b188311601e81d6395ced877e71b708
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