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
GetSpendLimitsToolto enforce budget caps before large transactions
License
MIT
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77f3ec93fd9ee2a237b5f066e3d8156ecdc9585d84d1effea0438fbbf055ee00
|
|
| MD5 |
c80d2740ff4f226419574c21de217335
|
|
| BLAKE2b-256 |
54cdc2c5300056e6788404c52d4cb5b6b160408a06186d22e9a3d2e8be4a5e54
|
File details
Details for the file crewai_tool_agentwallet-1.0.0-py3-none-any.whl.
File metadata
- Download URL: crewai_tool_agentwallet-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a68e098ade852a369dda1b3964efa036c9a0c3178d366f149cab30613a7fbea
|
|
| MD5 |
bdf1823926b20e8e94493649e823416c
|
|
| BLAKE2b-256 |
cd4a3418aadeebc1baa4ba7c5c572fbd167cb56d8e0829370d4d8f21674571dc
|