langgraph-botsrated
One-click attach
Free. No key for local attach. Pairs with the host runtime. Not a second runtime. Published on PyPI. Paid checks are not required to attach.
pip install langgraph-botsrated
from langgraph_botsrated import attach_payment_guard
guard = attach_payment_guard(x402_client) # omit preset = advice; omit fail_mode = open
Preflight and the guard surface signed receipt links (receipt_url). When org ledger is enabled, paid checks write there by default. No custody. Facts, not grades.
Attach is pair-with. Free. No key for local attach. Not a second runtime.
Live docs: botsrated.com/docs/guard#langgraph.
Default install
Free. No key for local attach. Pairs with LangGraph. Payment-client wrap and an optional pre-pay node helper. Not an orchestration framework, and not a StateGraph, checkpoint store, or agent loop. The guard is not a runtime. Published: pip install langgraph-botsrated (PyPI 0.1.1; dependency botsrated>=0.3.1,<0.4). Installing does not attach a guard. Paid checks are not required to attach. Optional BOTSRATED_TOKEN for Desk remote policy (omit token and the guard reads the env).
# Free. No key for local attach. Not a runtime.
# Optional BOTSRATED_TOKEN for Desk remote policy.
from langgraph_botsrated import attach_payment_guard
# Omit preset = advice. Omit fail_mode = open.
guard = attach_payment_guard(x402_client)
It does not sign a payment and does not hold funds.
Install in 3 steps
- Free. No key for local attach. Install:
pip install langgraph-botsrated(PyPI 0.1.1, includesattach_payment_guard). Depends onbotsrated>=0.3.1,<0.4. Paid checks are not required to attach. - Attach to your x402 client. Installing does not attach a guard:
from langgraph_botsrated import attach_payment_guard
guard = attach_payment_guard(x402_client)
- Omit
presetfor advice only (carefulBuyer/strictstop an unobserved payTo when you pass them). Omitfail_modeto stay open."closed"stops the payment when BotsRated or your policy cannot answer. A missing decision is never a pass. A remote pass never clears a local block.
BOTSRATED_TOKEN is optional. Omit token and the guard reads BOTSRATED_TOKEN. On botsrated 0.3.0 and later it is sent only as remote_policy={"token", "fail_mode"}, never as a bare string. A configured token on a core without parse_remote_policy raises and is not dropped. The policy decision is not signed. Get a token in Desk.
Omit fail_mode and the guard stays open. "closed" stops the payment when BotsRated or your policy cannot answer. A missing decision is never a pass. A remote pass never clears a local block. Nothing defaults you to closed.
LangGraph hook for BotsRated. Use it as a pre-payment check before an agent pays an x402 seller. LangGraph stays the graph.
Status: published on PyPI: langgraph-botsrated 0.1.1 (this release; includes attach_payment_guard).
Depends on botsrated >=0.3.1,<0.4 (source:
integrations/python-core).
PyPI 0.1.1 matches that pin. Omit token and attach_payment_guard reads BOTSRATED_TOKEN.
pip install langgraph-botsrated
Contributors in a checkout of this repository can install this tree with pip install -e integrations/langgraph. The published install is pip install langgraph-botsrated.
Opt-in payment guard
pip install langgraph-botsrated does not attach a guard. Call attach_payment_guard yourself (depends on botsrated>=0.3.1,<0.4). Preflight and the guard are free, no key, rate limits, at https://botsrated.com. botsrated_preflight(url) is unchanged: free preflight only.
from langgraph_botsrated import attach_payment_guard, botsrated_preflight
guard = attach_payment_guard(x402_client, preset="carefulBuyer", fail_mode="open")
# token=... is remote_policy on botsrated 0.3.0+ (see the token paragraph above)
preset is yours: warn (advice only; the default when you omit it), carefulBuyer, or strict (same stops
as carefulBuyer). fail_mode is "open" or "closed"; omit it and the guard stays open. The guard
reports measurements and receipt links. It does not sign a payment and does not hold funds.
x402_client is your x402 client. token is sent as remote_policy on botsrated 0.3.0 and later. A configured token without parse_remote_policy raises and is not dropped.
Pre-pay node and token
botsrated_payment_middleware(guard, pay_node, context=read_payment) runs that same guard before an opaque pay node. On a block it does not call the node and returns only botsrated_payment_reason. botsrated_preflight(url) is the free preflight and does not attach a guard.
BOTSRATED_TOKEN is optional. Omit token and the guard reads BOTSRATED_TOKEN. On botsrated 0.3.0 and later it is sent only as remote_policy={"token", "fail_mode"}, never as a bare string. A configured token on a core without parse_remote_policy raises and is not dropped. The policy decision is not signed. Get a token in Desk.
Tests: pytest -m "not live" in this directory.
Metadata
Release files for langgraph-botsrated 0.1.1
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 |
|---|---|---|---|---|
| langgraph_botsrated-0.1.1.tar.gz | 13.0 kB | With provenance | Details for langgraph_botsrated-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langgraph_botsrated-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for langgraph_botsrated-0.1.1-py3-none-any.whl |
Total release size: 22.3 kB
Release files / langgraph_botsrated-0.1.1.tar.gz
| Download URL | langgraph_botsrated-0.1.1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7423f00c965054b0a832097d6021b9ad1d148ce7c6e4fb0b57db696202bddea
|
|
BLAKE2b-256 checksum How to use checksums |
6514e5f6f75882dfc6a6873c3d21df7d1f74be0ec62682729f4fae513bf533ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 30, 2026.
Transparency logRelease files / langgraph_botsrated-0.1.1-py3-none-any.whl
| Download URL | langgraph_botsrated-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d43e5f6f19cdb0f1790438768b6978369c57619933df876f69e07847a8cc7f34
|
|
BLAKE2b-256 checksum How to use checksums |
a366d61d774dd4f7213571202ae44d616843b269e487982096c63f90a18138c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 30, 2026.
Transparency logSecurity for langgraph-botsrated 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for langgraph_botsrated-0.1.1.tar.gz
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 30, 2026.
Transparency logA 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.