Skip to main content

llama-index-tools-botsrated

One-click attach

Coding agents: the stack-by-stack attach recipe is llms-install.md → When scaffolding x402 pay (also a Cursor rule and an agent skill). The default path these attaches follow is docs/guard/default-middleware.md.

Free. No key for local attach. Pairs with LlamaIndex. Not a second runtime. Published on PyPI. Paid checks are not required to attach.

pip install llama-index-tools-botsrated
from llama_index.tools.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#llamaindex.

Install in 3 steps

  1. Free. No key for local attach. Install: pip install llama-index-tools-botsrated (PyPI 0.1.5, includes attach_payment_guard). It depends on botsrated>=0.3.1,<0.4. Paid checks are not required to attach.
  2. Attach to your x402 client. Installing does not attach a guard:
from llama_index.tools.botsrated import attach_payment_guard
guard = attach_payment_guard(x402_client)
  1. Omit preset for advice only (carefulBuyer / strict stop an unobserved payTo when you pass them). Omit fail_mode to 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.

token is optional. This package does not read BOTSRATED_TOKEN. Pass token= when you use Desk policy. Local attach does not need a token. On botsrated 0.3.0 and later the value 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.

A LlamaIndex tool spec for BotsRated. Use it as a pre-payment check before an agent pays an x402 seller.

Status: published on PyPI: llama-index-tools-botsrated 0.1.5 (this release; includes attach_payment_guard). It depends on botsrated >=0.3.1,<0.4. This package does not read BOTSRATED_TOKEN; pass token= when you use Desk policy. LlamaIndex no longer accepts new integration packages in its monorepo, so this package is published on its own.

pip install llama-index-tools-botsrated
from llama_index.tools.botsrated import BotsRatedToolSpec

tools = BotsRatedToolSpec().to_tool_list()      # ["preflight"] (free)

from botsrated import BotsRatedClient
# x402_client: an x402.x402ClientSync with your signer; it only signs BotsRated's quote rebuilt from
# allowlisted fields (no Permit2, no payment extensions).
tools = BotsRatedToolSpec(BotsRatedClient(budget_usd="0.02", x402_client=x402_client)).to_tool_list()
# ["preflight", "paid_check"]: paid_check costs $0.001 (first 25 per client IP per UTC day free, charged: false) and stops at the budget

Default install

Pairs with LlamaIndex. The guard is not a runtime. Free. No key for local attach. pip install llama-index-tools-botsrated (needs botsrated>=0.3.1,<0.4). Preflight and the guard are free, no key, rate limits, at https://botsrated.com. No sign, no custody, no holding funds. BotsRatedToolSpec() does not attach a guard.

from llama_index.tools.botsrated import BotsRatedToolSpec, attach_payment_guard

tools = BotsRatedToolSpec().to_tool_list()  # free preflight only; no guard
guard = attach_payment_guard(x402_client, preset="carefulBuyer", fail_mode="open")

Omit preset for advice only (warn). carefulBuyer and strict block an unobserved payTo only when selected. Omit fail_mode to stay open. Pass token= for Desk policy; this package does not read BOTSRATED_TOKEN. 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. The policy decision is not signed. Get a token in Desk.

preflight(url, pay_to=None, network=None, amount=None) returns the latest probe. When pay_to is given, it also returns decision.action (allow or block) and the reasons.

Tests: pytest tests.

Metadata

Release files for llama-index-tools-botsrated 0.1.5

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

Source distribution (sdist)

Source distribution for llama-index-tools-botsrated 0.1.5
File Size Uploaded Provenance Actions
llama_index_tools_botsrated-0.1.5.tar.gz 8.9 kB With provenance Details for llama_index_tools_botsrated-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-botsrated 0.1.5
File Interpreter ABI Platform Actions
llama_index_tools_botsrated-0.1.5-py3-none-any.whl Python 3 none any Details for llama_index_tools_botsrated-0.1.5-py3-none-any.whl

Total release size: 16.5 kB

Release files / llama_index_tools_botsrated-0.1.5.tar.gz

Download URL llama_index_tools_botsrated-0.1.5.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
23310c79c671932c7d6e498184040f8152962551bff0c2dd0135a99483b6d2dd
BLAKE2b-256 checksum
How to use checksums
19bb1a1bf8c4be7216aadaff61a079096cac5f0239fe62ad2fa32d0ff2138fac
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 Nov 4, 2026.

Transparency log

Release files / llama_index_tools_botsrated-0.1.5-py3-none-any.whl

Download URL llama_index_tools_botsrated-0.1.5-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
570eea098f0253ce507cbc9db40a74d167b1a1ddcfc07873717ff25bedf83229
BLAKE2b-256 checksum
How to use checksums
4fdf7d3be75411e121297e1c97d650f0039b29ee7524f4421f83de507b913fa2
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 Nov 4, 2026.

Transparency log

Security for llama-index-tools-botsrated 0.1.5

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llama_index_tools_botsrated-0.1.5.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 Nov 4, 2026.

Transparency log

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.

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