Skip to main content

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

Release files for crewai-tool-agentwallet 1.0.0

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

Source distribution (sdist)

Source distribution for crewai-tool-agentwallet 1.0.0
File Size Uploaded
crewai_tool_agentwallet-1.0.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewai-tool-agentwallet 1.0.0
File Interpreter ABI Platform
crewai_tool_agentwallet-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / crewai_tool_agentwallet-1.0.0.tar.gz

Download URL crewai_tool_agentwallet-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
77f3ec93fd9ee2a237b5f066e3d8156ecdc9585d84d1effea0438fbbf055ee00
BLAKE2b-256 checksum
How to use checksums
54cdc2c5300056e6788404c52d4cb5b6b160408a06186d22e9a3d2e8be4a5e54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / crewai_tool_agentwallet-1.0.0-py3-none-any.whl

Download URL crewai_tool_agentwallet-1.0.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a68e098ade852a369dda1b3964efa036c9a0c3178d366f149cab30613a7fbea
BLAKE2b-256 checksum
How to use checksums
cd4a3418aadeebc1baa4ba7c5c572fbd167cb56d8e0829370d4d8f21674571dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

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