Skip to main content

PyPI Python 3.10+ License: MIT

boltzpay-crewai

CrewAI tools for BoltzPay — two integration paths for paid API access with AI agents.

Recommended: MCP Integration

CrewAI natively supports MCP. Our MCP server works out of the box — no Python package needed.

See the complete guide: MCP Integration Guide

from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter
from mcp import StdioServerParameters

server_params = StdioServerParameters(
    command="npx",
    args=["-y", "@boltzpay/mcp"],
    env={"BOLTZPAY_DAILY_BUDGET": "5.00"},
)

with MCPServerAdapter(server_params) as tools:
    agent = Agent(role="Researcher", goal="Access paid APIs", tools=tools)
    task = Task(description="Discover paid APIs", expected_output="API list", agent=agent)
    Crew(agents=[agent], tasks=[task]).kickoff()

Alternative: CLI Bridge Tools

For users who prefer native Python tools, this package provides 7 BaseTool subclasses that call @boltzpay/cli via subprocess.

Install

pip install boltzpay-crewai

Prerequisites

  • Python 3.10+
  • Node.js 20+ — required for the CLI bridge (nodejs.org)
  • Coinbase CDP keys (optional) — only needed for fetch

Usage

from crewai import Agent, Task, Crew
from boltzpay_crewai import (
    BoltzPayFetchTool,
    BoltzPayDiagnoseTool,
    BoltzPayDiscoverTool,
)

agent = Agent(
    role="Data Researcher",
    goal="Find and access paid APIs using BoltzPay",
    tools=[BoltzPayFetchTool(), BoltzPayDiagnoseTool(), BoltzPayDiscoverTool()],
)

task = Task(
    description="Discover paid APIs and diagnose endpoint for invy.bot",
    expected_output="API diagnostic report",
    agent=agent,
)

crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()

Tool Reference

Tool Name Description Credentials
BoltzPayFetchTool boltzpay_fetch Fetch data from a paid API. Detects x402/L402, pays with USDC or Lightning. Required
BoltzPayQuoteTool boltzpay_quote Get detailed price quote with chain options. Not needed
BoltzPayDiscoverTool boltzpay_discover Browse directory of compatible paid APIs. Not needed
BoltzPayDiagnoseTool boltzpay_diagnose Full endpoint diagnostic: protocol, pricing, health, latency. Not needed
BoltzPayBudgetTool boltzpay_budget Check daily spending budget and remaining balance. Not needed
BoltzPayHistoryTool boltzpay_history View recent payment transactions. Not needed
BoltzPayWalletTool boltzpay_wallet Check wallet address and USDC balance. Not needed

No Credentials Needed

Six tools work without any Coinbase credentials:

from boltzpay_crewai import BoltzPayDiagnoseTool, BoltzPayDiscoverTool

# Discover APIs and diagnose endpoints — no keys required
agent = Agent(
    role="API Scout",
    goal="Evaluate paid APIs without purchasing",
    tools=[BoltzPayDiagnoseTool(), BoltzPayDiscoverTool()],
)

Error Handling

CLI bridge tools return error strings instead of raising exceptions (CrewAI pattern), so your agent can recover gracefully:

Error (NODE_NOT_FOUND): Node.js/npx not found. Install Node.js 20+ from https://nodejs.org
Error (TIMEOUT): CLI command timed out after 30s
Error (CLI_ERROR): Payment failed: budget exceeded

For programmatic error handling, import the error classes:

from boltzpay_crewai import BoltzPayBridgeError, BoltzPayNodeNotFoundError, BoltzPayTimeoutError

Links

Metadata

Release files for boltzpay-crewai 0.3.2

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

Source distribution (sdist)

Source distribution for boltzpay-crewai 0.3.2
File Size Uploaded
boltzpay_crewai-0.3.2.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boltzpay-crewai 0.3.2
File Interpreter ABI Platform
boltzpay_crewai-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / boltzpay_crewai-0.3.2.tar.gz

Download URL boltzpay_crewai-0.3.2.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3d785e43d95b72a50453f7fb299a0c6ae5eabb995d375594970742da8d0bb9d8
BLAKE2b-256 checksum
How to use checksums
cc93886b52da4f47423cd81017d38e21632cac9c5d0b3dada48b0d1b49b8929f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / boltzpay_crewai-0.3.2-py3-none-any.whl

Download URL boltzpay_crewai-0.3.2-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a0cb20aceaccfe103e5274f7c5fd5a6e3b0f202a9aacaf62f2bd1bfe9be5146
BLAKE2b-256 checksum
How to use checksums
213d55331931cdffa0aeb32f8a4c26c24f9ffc5f22bb1af2a85b878d80e97a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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