Skip to main content

Non-custodial wallet tools for CrewAI agents — EVM + Solana, x402 payments, CCTP bridge, on-chain spend limits

Project description

crewai-tool-agentwallet

Non-custodial wallet tools for CrewAI agents.

Give your CrewAI agents a real wallet: check balances, send tokens, handle HTTP 402 micropayments, and enforce on-chain spend limits — without ever surrendering custody of your keys.

Features

  • EVM balance checks — native ETH and any ERC-20 token
  • Token transfers — sign and broadcast transactions locally (non-custodial)
  • x402 payments — automatic handling of HTTP 402 Payment Required flows
  • On-chain spend limits — query AgentAccountV2 contract limits before spending

Installation

pip install crewai-tool-agentwallet

Quick Start

from crewai import Agent, Task, Crew
from crewai_tool_agentwallet import AgentWalletToolkit

toolkit = AgentWalletToolkit(
    wallet_address="0xYourAgentWalletAddress",
    private_key="0xYourPrivateKey",
    chain_id=8453,          # Base mainnet
    rpc_url="https://mainnet.base.org",
)

wallet_agent = Agent(
    role="Blockchain Wallet Manager",
    goal="Manage on-chain assets and execute transactions securely",
    backstory=(
        "You are an expert blockchain agent with a non-custodial wallet. "
        "You can check balances, send tokens, and pay for services autonomously."
    ),
    tools=toolkit.get_tools(),
    verbose=True,
)

check_balance_task = Task(
    description="Check the ETH balance of address 0x...",
    agent=wallet_agent,
    expected_output="The current ETH balance in human-readable format",
)

crew = Crew(agents=[wallet_agent], tasks=[check_balance_task])
result = crew.kickoff()
print(result)

Available Tools

WalletBalanceTool

Check native ETH or ERC-20 token balance.

Input: address (wallet address), optional token (ERC-20 contract address)

WalletTransferTool

Sign and broadcast an ETH or ERC-20 transfer.

Input: to (recipient), amount_wei, optional token, gas_limit

X402PaymentTool

Automatically handle HTTP 402 payment flows.

Input: url, optional max_amount_usd (default 1.0), method, body

GetSpendLimitsTool

Query on-chain spend limits from an AgentAccountV2 contract.

Input: contract_address, optional token (zero address for ETH)

Using Individual Tools

from crewai_tool_agentwallet import WalletBalanceTool, WalletTransferTool

balance_tool = WalletBalanceTool(
    rpc_url="https://mainnet.base.org",
    wallet_address="0x...",
)

transfer_tool = WalletTransferTool(
    rpc_url="https://mainnet.base.org",
    wallet_address="0x...",
    private_key="0x...",
    chain_id=8453,
)

Security Notes

  • Keys never leave your environment — all signing is local
  • Use environment variables for PRIVATE_KEY, never hardcode
  • Use GetSpendLimitsTool to enforce budget caps before large transactions

License

MIT

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_tool_agentwallet-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_tool_agentwallet-1.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file crewai_tool_agentwallet-1.0.0.tar.gz.

File metadata

  • Download URL: crewai_tool_agentwallet-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for crewai_tool_agentwallet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 77f3ec93fd9ee2a237b5f066e3d8156ecdc9585d84d1effea0438fbbf055ee00
MD5 c80d2740ff4f226419574c21de217335
BLAKE2b-256 54cdc2c5300056e6788404c52d4cb5b6b160408a06186d22e9a3d2e8be4a5e54

See more details on using hashes here.

File details

Details for the file crewai_tool_agentwallet-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_tool_agentwallet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a68e098ade852a369dda1b3964efa036c9a0c3178d366f149cab30613a7fbea
MD5 bdf1823926b20e8e94493649e823416c
BLAKE2b-256 cd4a3418aadeebc1baa4ba7c5c572fbd167cb56d8e0829370d4d8f21674571dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page