Skip to main content Switch to mobile version fizzl 0.13.0 Safety checks for AI agents that pay: check a transaction or signature before signing, a token before buying, a wallet's approvals, and an x402 endpoint before paying it (presign-guard, x402 Doctor), plus an opt-in tool that buys live data in one call (Fizzl Buy).
pip install fizzl==0.13.0 Copy PIP instructions
Safety checks for Python AI agents that pay: LangChain, LangGraph, the OpenAI Agents SDK, CrewAI or your own loop.
An official LangChain integration: listed in the LangChain docs among the security tools.
For LangChain.js and LangGraph.js: fizzl-langchain on npm.
The checks only check. They never sign, pay or move anything themselves. A failed check comes back as {"error": ..., "message": ...} instead of raising, so the agent can tell its user.
One more, which buys, so the tool sets only include it when you ask (buy=True, or in only):
fizzl.buy_live_data("weather forecast for Amsterdam tomorrow") # {'delivered': True, 'answer': {...}, 'service': {'url': ..., 'track_record': ...}, 'paid_usd': 0.005, 'answer_check': {...}} Without a paying session it answers with a free preview: the seller Fizzl Buy would buy from, not the data itself.
pip install "fizzl[x402]" # with the x402 client, to pay per check pip install "fizzl[langchain,x402]" # plus LangChain tools pip install "fizzl[openai-agents]" # OpenAI Agents SDK tools (Python 3.10+) Use
import requests from eth_account import Account from x402 import x402ClientSync from x402.http.clients import wrapRequestsWithPayment from x402.mechanisms.evm.exact import ExactEvmScheme from fizzl import Fizzl payer = x402ClientSync().register("eip155:8453", ExactEvmScheme(Account.from_key(AGENT_KEY))) # USDC on Base session = wrapRequestsWithPayment(requests.Session(), payer) fizzl = Fizzl(session=session) fizzl.check_endpoint_before_paying("https://api.example.com/funding", max_usd=0.05) # {'verdict': 'go', 'summary': 'OK to pay: $0.02 on Base.', 'options': [...], 'reasons': [], ...} fizzl.check_token("base", "0x...") fizzl.check_before_signing(type="approval", chainId=8453, token="0x...", spender="0x...", amount="115792089237316195423570985008687907853269984665640564039457584007913129639935") Try it without a wallet: Fizzl() with no paying session and no credit keys falls back to the free quick checks for check_token, check_before_signing, check_solana_transaction, check_algorand_transaction, check_stellar_transaction, check_message and check_endpoint_before_paying: the verdict only, a few per hour, marked "free": True with a note on what the full check costs. check_wallet_approvals, screen_wallet and check_xrpl_transaction have no free version. Fizzl(free=False) returns payment_required instead.
Prepaid credits instead of a payment per check: buy a pack once (presign-guard: 100 checks for $0.80; x402 Doctor: 1000 preflights for $0.80), then use a plain session:
fizzl = Fizzl(credit_keys={"presign": PRESIGN_CREDIT_KEY, "doctor": DOCTOR_CREDIT_KEY}) Already pay with the x402 client? One line
If your agent pays with the official x402 Python client (x402ClientSync or x402Client), add x402 Doctor's preflight as a hook and every payment that client makes is checked first:
import requests from x402 import x402ClientSync from x402.http.clients import wrapRequestsWithPayment from fizzl.hook import doctor_preflight payer = x402ClientSync() # register your schemes as before session = wrapRequestsWithPayment(requests.Session(), payer) payer.on_before_payment_creation(doctor_preflight(session=session, max_usd=0.05)) Before the client signs, the hook asks x402 Doctor ($0.001, paid through the same session, or 1 prepaid credit with credit_key):
no_go: the payment is aborted (PaymentAbortedError); nothing is signed.
caution: aborted, unless on_caution="pay" or your function says yes.
go: it goes ahead. With on_incomplete="stop", a go whose checks_complete is false is aborted too.
The verdict is reused while the endpoint asks the same payTo, amount, token and network. Doctor's own 402 for the preflight is skipped by the hook and paid only up to $0.002. If Doctor can't be asked, the payment stops (on_error="pay" lets it through). Install with pip install "fizzl[x402]".
from langgraph.prebuilt import create_react_agent from fizzl.langchain import fizzl_tools tools = fizzl_tools(session=session) # or credit_keys={...}; only=[...] for some of them; buy=True adds buy_live_data agent = create_react_agent(model, tools + your_tools, prompt="Before you pay any API, call check_endpoint_before_paying. Before you sign anything, call check_before_signing. Never continue on red or no_go.") The tools are plain StructuredTools with typed arguments, so CrewAI and other frameworks that take LangChain tools can use them too.
from agents import Agent, Runner from fizzl.openai_agents import fizzl_tools agent = Agent(name="buyer", tools=fizzl_tools(session=session), # or credit_keys={...}, or nothing for the free checks instructions="Before you pay any API, call check_endpoint_before_paying. Before you sign anything, call check_before_signing. Never continue on red or no_go.") print(Runner.run_sync(agent, "Is https://api.example.com/funding safe to pay, at most $0.05?").final_output) The checks run in a worker thread, so a blocking requests session doesn't stall the agent's event loop. Bad arguments from the model come back as {"error": "bad_input", ...} without calling (or paying for) the check.
Want the wallet to enforce it, not just inform the model?
Tools inform the model; a model can still ignore them. To make red and over-budget payments impossible, guard the wallet itself: presign-guard-wallet (Node) checks every signature with presign-guard and your spending limits, with Telegram approval above them.
Both files in this release have provenance metadata.
MIT View SPDX License List
langchain openai-agents x402
agents ai-agents approvals base honeypot langchain live-data mcp openai-agents presign rlusd security solana token-check usdc wallet x402 xrpl
Intended Audience Developers
Programming Language Python :: 3
Release files for fizzl 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 41.7 kB
Release files / fizzl-0.13.0.tar.gz
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Release files / fizzl-0.13.0-py3-none-any.whl
Both files in this release have been uploaded with provenance metadata.
With provenance fizzl-0.13.0.tar.gz Nov 3, 2026
With provenance fizzl-0.13.0-py3-none-any.whl Nov 3, 2026
Attestation for fizzl-0.13.0.tar.gz
Attestation for fizzl-0.13.0-py3-none-any.whl
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.
Release history Release notifications | RSS feed
Nov 18, 2026 2 release files Full provenance
Nov 10, 2026 2 release files Full provenance
Nov 3, 2026 2 release files Full provenance
Oct 27, 2026 2 release files Full provenance
Oct 26, 2026 2 release files Full provenance
Oct 24, 2026 2 release files Full provenance
Oct 11, 2026 2 release files Full provenance
Oct 10, 2026 2 release files Full provenance
Oct 8, 2026 2 release files Full provenance
Oct 6, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




