πŸ€– Web3 Agent Kit

July 6, 2026 Β· View on GitHub

Build autonomous AI agents that interact with blockchains β€” in minutes, not months.

PyPI Downloads License: MIT Python 3.10+ CI Docs Website Coverage Twitter

Web3 Agent Kit Demo


⚑ Quick Install

pip install web3-agent-kit

Verify installation:

wak info        # Show version, modules, chains
wak doctor      # Check dependencies
wak examples    # List 19 example scripts

Run your first swap:

from web3_agent_kit import Agent

agent = Agent(private_key="0x...")
result = agent.execute("swap 0.01 ETH to USDC on Base")
print(result.tx_hash)

πŸ€” Why Web3 Agent Kit?

Building AI agents that interact with blockchains is hard. You need to juggle RPC providers, wallet management, transaction signing, gas estimation, DeFi protocol ABIs, LLM integration, and safety rails β€” all before writing a single line of business logic.

Web3 Agent Kit handles all of that for you.

Pain PointWithout Web3 Agent KitWith Web3 Agent Kit
SetupDays of boilerplatepip install β†’ 5 lines of code
CLIWrite Python for everythingwak β€” 7 commands, zero code
Multi-chainWrite adapters per chainBuilt-in for 8 chains
LLM IntegrationManual prompt engineeringNatural language goals, auto-parsed
SafetyBuild your own guardrailsSpend limits, kill switch, operator confirmation
DeFiRead docs, write ABIsDrop-in Uniswap V2, Uniswap V3, Aave V3, Curve, bridges
AirdropsManual quest huntingAuto-track 7 platforms, multi-wallet farming
Security AuditManual code reviewStatic analysis, fuzzing, exploit PoC
MEVBuild from scratchArbitrage, liquidation, Flashbot support
NFTWrite ERC-721 manuallyDeploy, batch mint, marketplace listing
TradingManual recurring buysDCA bot, yield optimizer, token sniper
Multi-walletManage keys manuallyBatch ops, consolidated portfolio
RestakingManual protocol jugglingEigenLayer + Babylon + Solana
Price OracleHardcode pricesChainlink + DexScreener + CoinGecko aggregator
TX SimulationHope it worksTenderly + eth_call pre-flight verification
Account AbstractionBuild ERC-4337 from scratchBundler, paymaster, factory deployment
Cross-chainManual bridge + relayLayerZero + Wormhole + CCIP unified API
GovernanceCheck manuallySnapshot + Tally + on-chain governor tracking
ExtensibilityHard-coded logicPlugin system β€” extend anything
Error HandlingManual retry logicAuto-fallback across LLM providers & RPCs

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        User / Application                          β”‚
β”‚              "Swap 0.1 ETH to USDC on Base"  /  `wak agent "..."`  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          Agent Framework                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Goal      β”‚β†’ β”‚ LLM Planner  β”‚β†’ β”‚ Tool        β”‚β†’ β”‚ Transactionβ”‚ β”‚
β”‚  β”‚ Parser    β”‚  β”‚ (6 providers)β”‚  β”‚ Router      β”‚  β”‚ Executor   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                            β”‚
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚         Safety Layer       β”‚        β”‚
                               β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β” β”‚
                               β”‚  β”‚ Spend Governor          β”‚      β”‚ β”‚
                               β”‚  β”‚ β€’ Per-tx limits         β”‚      β”‚ β”‚
                               β”‚  β”‚ β€’ Daily caps            β”‚      β”‚ β”‚
                               β”‚  β”‚ β€’ Kill switch           β”‚      β”‚ β”‚
                               β”‚  β”‚ β€’ Operator confirmation β”‚      β”‚ β”‚
                               β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                            β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                    Tool Ecosystem                    β”‚        β”‚
       β”‚                                                     β”‚        β”‚
       β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚        β”‚
       β”‚  β”‚ DeFi     β”‚ β”‚ Airdrop  β”‚ β”‚ Security β”‚ β”‚ MEV    β”‚β”‚        β”‚
       β”‚  β”‚ β€’Uniswap β”‚ β”‚ β€’Galxe   β”‚ β”‚ β€’Static  β”‚ β”‚ β€’Arb   β”‚β”‚        β”‚
       β”‚  β”‚ β€’Aerodromeβ”‚ β”‚ β€’Zealy   β”‚ β”‚ β€’Fuzzing β”‚ β”‚ β€’Liq   β”‚β”‚        β”‚
       β”‚  β”‚ β€’Aave    β”‚ β”‚ β€’Layer3  β”‚ β”‚ β€’Exploit β”‚ β”‚ β€’Flash β”‚β”‚        β”‚
       β”‚  β”‚ β€’Curve   β”‚ β”‚ β€’Gleam   β”‚ β”‚ β€’Audit   β”‚ β”‚  bots  β”‚β”‚        β”‚
       β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”‚        β”‚
       β”‚  β”‚ Trading  β”‚ β”‚ NFT      β”‚ β”‚ Portfolioβ”‚ β”‚ Bridge β”‚β”‚        β”‚
       β”‚  β”‚ β€’DCA Bot β”‚ β”‚ β€’Deploy  β”‚ β”‚ β€’Tracker β”‚ β”‚ β€’Li.Fi β”‚β”‚        β”‚
       β”‚  β”‚ β€’Sniper  β”‚ β”‚ β€’Mint    β”‚ β”‚ β€’P&L     β”‚ β”‚ β€’Socketβ”‚β”‚        β”‚
       β”‚  β”‚ β€’Yield   β”‚ β”‚ β€’Market  β”‚ β”‚ β€’Alerts  β”‚ β”‚        β”‚β”‚        β”‚
       β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚        β”‚
       β”‚                                                     β”‚        β”‚
       β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚        β”‚
       β”‚  β”‚ Gas      β”‚ β”‚ Wallet   β”‚ β”‚ Plugins  β”‚ β”‚Restake β”‚β”‚        β”‚
       β”‚  β”‚ Optimizerβ”‚ β”‚ β€’Multi   β”‚ β”‚ β€’Custom  β”‚ β”‚β€’Eigen  β”‚β”‚        β”‚
       β”‚  β”‚          β”‚ β”‚ β€’Watcher β”‚ β”‚ β€’Communityβ”‚ β”‚β€’Babylonβ”‚β”‚        β”‚
       β”‚  β”‚          β”‚ β”‚ β€’Approvalβ”‚ β”‚          β”‚ β”‚β€’Solana β”‚β”‚        β”‚
       β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚        β”‚
       β”‚                                                     β”‚        β”‚
       β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚        β”‚
       β”‚  β”‚ Oracle   β”‚ β”‚ Events   β”‚ β”‚Simulator β”‚ β”‚Acct    β”‚β”‚        β”‚
       β”‚  β”‚β€’Chainlinkβ”‚ β”‚β€’Listener β”‚ β”‚β€’Tenderly β”‚ β”‚Abstractβ”‚β”‚        β”‚
       β”‚  β”‚β€’DexScrnr β”‚ β”‚β€’Webhooks β”‚ β”‚β€’eth_call β”‚ β”‚β€’ERC4337β”‚β”‚        β”‚
       β”‚  β”‚β€’CoinGeckoβ”‚ β”‚β€’Callbacksβ”‚ β”‚β€’Anvil    β”‚ β”‚β€’Paymstrβ”‚β”‚        β”‚
       β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”‚        β”‚
       β”‚  β”‚Messaging β”‚ β”‚Governanceβ”‚ β”‚          β”‚ β”‚        β”‚β”‚        β”‚
       β”‚  β”‚β€’LayerZeroβ”‚ β”‚β€’Snapshot β”‚ β”‚          β”‚ β”‚        β”‚β”‚        β”‚
       β”‚  β”‚β€’Wormhole β”‚ β”‚β€’Tally    β”‚ β”‚          β”‚ β”‚        β”‚β”‚        β”‚
       β”‚  β”‚β€’CCIP     β”‚ β”‚β€’On-chain β”‚ β”‚          β”‚ β”‚        β”‚β”‚        β”‚
       β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚        β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                            β”‚
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚    Chain Abstraction Layer  β”‚        β”‚
                               β”‚  β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β” β”‚        β”‚
                               β”‚  β”‚ ETH  β”‚ β”‚ BASE β”‚ β”‚ARB β”‚ β”‚        β”‚
                               β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€ β”‚        β”‚
                               β”‚  β”‚ OP   β”‚ β”‚ MATICβ”‚ β”‚AVAXβ”‚ β”‚        β”‚
                               β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€ β”‚        β”‚
                               β”‚  β”‚ BSC  β”‚ β”‚ SOL  β”‚ β”‚    β”‚ β”‚        β”‚
                               β”‚  β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜ β”‚        β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Comparison vs Alternatives

FeatureWeb3 Agent KitLangChain + Web3Custom BotGoat SDK
Setup TimeMinutesHoursDaysHours
Multi-chain8 chainsManualManualLimited
Built-in LLM6 providersDIY❌❌
CLI Toolwak (7 cmds)❌❌❌
DeFi ToolsUniswap V2, Uniswap V3, Aave V3, Curve❌❌Limited
Airdrop Suite7 platforms❌❌❌
Security AuditStatic + Fuzz + Exploit❌❌❌
MEV BotsArbitrage + Liquidation❌❌❌
NFT ToolsDeploy + Mint + Market❌❌❌
Token Sniperβœ…βŒβŒβŒ
DCA Botβœ…βŒβŒβŒ
Gas Optimizerβœ…βŒβŒβŒ
Multi-Walletβœ…βŒβŒβŒ
Plugin Systemβœ…βŒβŒβŒ
RestakingEigenLayer + Babylon + Solana❌❌❌
Safety Railsβœ… Governor❌❌❌
Natural Languageβœ…Partial❌❌
Python Nativeβœ…βœ…Varies❌ (TS)
Type Hintsβœ…PartialVariesN/A

🎯 Quick Start

5 lines of code. No ceremony.

pip install web3-agent-kit
export PRIVATE_KEY="0x..."
export ANTHROPIC_API_KEY="sk-ant-..."
from web3_agent_kit import Agent, Wallet, Chain, ChainManager
from web3_agent_kit.defi import Uniswap

chain = ChainManager(chains=[Chain.BASE])
wallet = Wallet.from_env("PRIVATE_KEY", chain_manager=chain)

agent = Agent(wallet=wallet, chains=[Chain.BASE], tools=[Uniswap(chain_manager=chain)])
result = agent.run("Swap 0.1 ETH to USDC on Base")

That's it. One pip install, two env vars, five lines of Python, and your AI agent is swapping on-chain.

CLI? wak agent --goal "Swap 0.1 ETH to USDC" --chain base

More examples: wak examples or browse examples/ β€” 19 working scripts (DCA bot, sniper, airdrop farmer, multi-wallet, yield optimizer, bridge agent, portfolio tracker, and more).

πŸ’‘ Tip: Start with dry_run=True on testnet to validate before going live.


✨ Features

πŸ€– Core

  • πŸ”— Multi-chain support β€” Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, BSC
  • 🧠 LLM-powered reasoning β€” Multi-provider cascade (OpenAI, Anthropic, Groq, DeepSeek, OpenRouter, Kimi)
  • 🎯 Natural language goals β€” Tell the agent what to do in plain English
  • πŸ” Governed signing β€” Safety caps, kill-switch, operator confirmation

πŸ’° DeFi

  • πŸ’± Uniswap V2 swaps β€” Actual token swaps with quotes, approvals, slippage protection
  • πŸŒ‰ Cross-chain bridges β€” Li.Fi + Socket aggregators for best routes
  • πŸ“Š Portfolio tracking β€” Real-time balances, P&L across all chains

πŸ”« Sniper

  • 🎯 Token sniper β€” Monitor new liquidity pools, auto-buy safe tokens
  • πŸ›‘οΈ Risk assessment β€” Honeypot detection, liquidity checks, contract analysis
  • ⚑ Live monitoring β€” Background thread with callback alerts

πŸ“ˆ DCA Bot

  • πŸ”„ Recurring buys β€” Dollar-cost average into any token automatically
  • ⏰ Flexible intervals β€” Hourly, daily, weekly, biweekly, monthly
  • πŸ›‘ Spending limits β€” Max buys, max total spend, auto-stop
  • πŸ“Š Cost average analysis β€” Track avg price, min/max, P&L
  • πŸ’Ύ Persistent orders β€” Survives restarts, stored on disk
  • πŸ”” Callbacks β€” Hook into execution events for notifications

πŸ”’ Security Module (NEW!)

  • 🍯 Honeypot detection β€” Check if token can be sold before buying
  • 🧢 Rug pull checker β€” Assess rug pull risk factors
  • πŸ“ Contract audit β€” Detect hidden mint, blacklist, pause, proxy patterns
  • πŸ’° Tax checker β€” Buy/sell tax analysis
  • πŸ’§ Liquidity analysis β€” Locked %, lock duration
  • πŸ‘₯ Holder analysis β€” Concentration, whale detection
  • πŸ“Š Safety score β€” 0-100 score with risk levels
  • 🌐 GoPlus API β€” Real-time token security data
  • πŸ“ˆ DexScreener β€” Liquidity data integration

πŸͺ‚ Airdrop Automation (NEW!)

  • πŸ” Campaign Discovery β€” Auto-scan 7 platforms (Galxe, Zealy, Layer3, QuestN, TaskOn, Intract, Port3)
  • ⛓️ On-chain Farming β€” DeFi interactions for airdrops (Base, Ethereum, Arbitrum, Optimism, Scroll, Linea, zkSync)
  • ⏰ Daily Scheduler β€” Automate recurring tasks with retry logic
  • πŸ“Š Points Dashboard β€” Track points across all platforms with history
  • πŸ”— Referral Manager β€” Generate, track, and optimize referral links
  • 🚰 Faucet Claimer β€” Auto-claim testnet tokens from 12+ faucets
  • πŸ€– Multi-wallet β€” Sybil avoidance, wallet rotation
  • πŸ”Œ Plugin System β€” Extend with custom platform executors

🌐 REST API

  • πŸ“‘ 37+ endpoints β€” Full HTTP API for all modules
  • πŸ”‘ API key auth β€” Secure access control
  • πŸ“– Swagger UI β€” Interactive API documentation
  • πŸ”„ Auto-fallback β€” Multi-provider LLM cascade

πŸ”Œ Plugin System

  • πŸ“¦ Plugin registry β€” Discover and load plugins dynamically
  • πŸ› οΈ Custom plugins β€” Extend with your own tools
  • πŸ”„ Hot reload β€” Add plugins without restarting

πŸ”„ Restaking

  • 🏦 EigenLayer integration β€” Restake LSTs, delegate to operators, track rewards
  • β‚Ώ Babylon BTC restaking β€” Bitcoin restaking via Babylon protocol
  • β˜€οΈ Solana restaking β€” Solayer, Jito, Marinade support
  • πŸ“Š Yield optimizer β€” Cross-protocol restaking yield optimization with risk-adjusted scoring
  • πŸ”” Slashing monitor β€” Position tracking, slashing risk alerts, portfolio snapshots

πŸ“‘ Oracle Aggregator (NEW!)

  • πŸ”— Chainlink feeds β€” 12+ mainnet price feeds (ETH, BTC, SOL, UNI, AAVE, etc.)
  • πŸ“ˆ DexScreener β€” Real-time DEX price data with liquidity ranking
  • πŸͺ™ CoinGecko β€” Free API fallback for 20+ tokens
  • βš–οΈ Weighted median β€” Multi-source aggregation with deviation detection
  • πŸ’Ύ Smart cache β€” 30s TTL, batch queries, automatic stale detection

πŸ“‘ Event Listener (NEW!)

  • πŸ”” On-chain events β€” Subscribe to any contract event (Transfer, Approval, custom)
  • 🌐 Webhook support β€” HTTP POST to any URL on event trigger
  • 🧡 Background polling β€” Multi-subscription threaded listener
  • πŸ“¦ Pre-built ABIs β€” ERC-20 Transfer/Approval, ERC-721 Transfer
  • πŸ“Š Status tracking β€” Per-subscription event count, error rate, last block

πŸ§ͺ Transaction Simulator (NEW!)

  • πŸ” Pre-flight verification β€” Simulate before broadcasting to catch reverts
  • 🌐 Tenderly integration β€” Full state diff, events, gas profiling
  • 🍴 Local fork mode β€” Anvil/Hardhat impersonation testing
  • ⚑ eth_call mode β€” Fast simulation with gas estimation + safety margin
  • ⚠️ Smart warnings β€” Balance checks, approval analysis, MEV exposure

🏦 Account Abstraction (NEW!)

  • πŸ“¦ ERC-4337 support β€” UserOperations, EntryPoint v0.6
  • 🏭 Factory deployment β€” SimpleAccount, Safe v1.4.3, Kernel v3
  • πŸ’° Paymaster integration β€” Pimlico gas sponsorship, token paymaster
  • πŸ”— Multi-chain β€” Ethereum, Base, Arbitrum, Optimism, Polygon
  • πŸ“Š Counterfactual addresses β€” Pre-compute before deployment

πŸŒ‰ Cross-chain Messaging (NEW!)

  • πŸ“‘ LayerZero β€” 7 chains, endpoint registry, fee estimation
  • πŸ› Wormhole β€” Multi-chain message relay, delivery tracking
  • ⛓️ Chainlink CCIP β€” Chain selector registry, message verification
  • πŸ“Š Status tracking β€” Real-time delivery status via protocol APIs
  • πŸ’° Fee estimation β€” Per-chain cost breakdown

πŸ›οΈ Governance (NEW!)

  • πŸ“Š Snapshot integration β€” GraphQL API, active proposal tracking
  • πŸ“ˆ On-chain governor β€” OpenZeppelin Governor, proposal lifecycle
  • πŸ—³οΈ Voting power β€” Token-weighted voting, delegation management
  • πŸ” Tally API β€” Delegate discovery, voting history
  • 🏷️ Known DAOs β€” Uniswap, Aave, Arbitrum, Optimism, ENS pre-configured

🌐 REST API

Full HTTP API for all modules β€” use from any language (JavaScript, curl, etc):

# Start the API server
python -m src.api

# Or with API key
WEB3_API_KEY=your-secret python -m src.api

Endpoints:

EndpointMethodDescription
/wallet/infoGETWallet info + balance
/swap/quoteGETGet swap quote
/swap/executePOSTExecute token swap
/portfolio/GETPortfolio dashboard
/gas/estimateGETGas estimates (EIP-1559)
/gas/recommendationGETGas timing recommendation
/watcher/listGETList watched wallets
/watcher/addPOSTAdd wallet to watch
/approval/scanGETScan token approvals
/approval/riskGETRisk report
/dca/ordersGET/POSTList/create DCA orders
/yield/opportunitiesGETScan yield opportunities
/yield/bestGETFind best yield
/bridge/quoteGETGet bridge quote
/bridge/executePOSTExecute bridge
/healthGETHealth check
/docsGETSwagger UI
/redocGETReDoc documentation

πŸ’‘ Full list of endpoints available in Swagger UI when the server is running.

Example:

# Get gas estimate
curl http://localhost:8000/gas/estimate?chain=ethereum

# Get swap quote
curl "http://localhost:8000/swap/quote?token_in=ETH&token_out=USDC&amount_in=1.0"

# Scan approvals
curl http://localhost:8000/approval/scan?chain=ethereum

🎯 Showcase

Telegram Bot

A full-featured Telegram bot built with web3-agent-kit:

cd showcase/telegram-bot
pip install -r requirements.txt
python bot.py

Features: balance check, token swap, portfolio tracking, token sniper, cross-chain bridge.

Telegram Bot Demo


πŸ“¦ Examples

ExampleDescription
examples/llm_swap_agent.pyLLM-powered natural language swapping
examples/direct_swap.pyProgrammatic Uniswap swap without LLM
examples/token_sniper.pyMonitor new pairs, auto-buy safe tokens
examples/portfolio_dashboard.pyReal-time portfolio across chains
examples/bridge_agent.pyCross-chain transfers via Li.Fi/Socket
examples/swap_agent.pyAutonomous token swapping
examples/yield_optimizer.pyCross-protocol yield farming + auto-compound
examples/multi_wallet.pyMulti-wallet management + batch ops
examples/plugin_system.pyPlugin system usage + custom plugins
examples/dca_bot.pyDollar-cost averaging bot with intervals & limits
examples/api_server.pyREST API server with Swagger docs
examples/airdrop_farmer.pyMulti-chain airdrop farming
examples/sniper_bot.pyToken launch sniper
examples/portfolio_tracker.pyPortfolio tracking & reporting
examples/airdrop_suite.pyFull airdrop automation suite
examples/security_analysis.pyToken security analysis
examples/approval_manager.pyToken approval scanning & management
examples/gas_optimizer.pyGas optimization & batch operations
examples/wallet_watcher.pyMulti-wallet monitoring & alerts

🧠 LLM Integration

Multi-provider cascade with automatic fallback:

from web3_agent_kit.agent import LLM, LLMConfig

# Use any LLM provider with automatic fallback
llm = LLM(LLMConfig(
    providers=["anthropic", "openai", "groq", "deepseek"],
    model="claude-3-5-sonnet-20241022",
))

# Natural language β†’ structured action
action = llm.parse("Swap 0.1 ETH to USDC on Base")
# β†’ {"tool": "uniswap", "action": "swap", "params": {...}}

πŸ”’ Security Module

Analyze tokens before interacting:

from web3_agent_kit.security import TokenAnalyzer, SecurityConfig

analyzer = TokenAnalyzer(SecurityConfig(chain="base"))

# Quick check
result = analyzer.quick_check("0x...")
print(f"Is Honeypot: {result['is_honeypot']}")

# Full analysis
report = analyzer.analyze_token("0x...")
print(f"Safety Score: {report.safety_score}/100")
print(f"Risk Level: {report.risk_level.value}")

if report.is_honeypot:
    print("🚨 HONEYPOT DETECTED!")
elif report.safety_score < 50:
    print("⚠️ HIGH RISK TOKEN")
else:
    print("βœ“ Safe to trade")

πŸͺ‚ Airdrop Automation

Automate airdrop farming across multiple platforms:

from web3_agent_kit.airdrop import (
    CampaignDiscovery,
    OnChainAirdropFarmer,
    OnChainConfig,
    AirdropScheduler,
    PointsDashboard,
    ReferralManager,
    FaucetClaimer,
)

# Discover new campaigns
discovery = CampaignDiscovery()
campaigns = discovery.discover_all()

# On-chain farming (dry run)
farmer = OnChainAirdropFarmer(OnChainConfig(chain="base", dry_run=True))
farmer.farm_plan("base_activity")

# Schedule daily tasks
scheduler = AirdropScheduler()
scheduler.add_daily("galxe_checkin", "09:00", galxe_checkin_fn)

# Track points
dashboard = PointsDashboard(DashboardConfig(wallet="0x..."))
dashboard.sync_all()

# Generate referrals
manager = ReferralManager()
manager.generate_links(count=10)

# Claim testnet tokens
claimer = FaucetClaimer()
claimer.claim_all(wallet="0x...")

πŸ”„ Restaking

Optimize yields across restaking protocols:

from web3_agent_kit.restaking import (
    EigenLayer,
    EigenLayerConfig,
    RestakingOptimizer,
    RestakingMonitor,
    BabylonBtcRestaking,
    SolanaRestaking,
)

# EigenLayer restaking
el = EigenLayer(EigenLayerConfig(chain="ethereum"))
result = el.restake("stETH", 10.0)
print(f"Restaked: {result.tx_hash}")

# Find best restaking yield
optimizer = RestakingOptimizer()
best = optimizer.find_best_opportunity(min_apy=3.0)
print(f"Best: {best.protocol} β€” {best.apy}% APY")

# Monitor positions
monitor = RestakingMonitor()
snapshot = monitor.get_portfolio_snapshot()
print(f"Total staked: ${snapshot.total_value_usd:,.2f}")
print(f"Slashing risk: {snapshot.total_risk_score}")

πŸ“Š Project Stats

  • Version: 1.9.0
  • Modules: 23
  • Source Files: 115
  • Lines of Code: 32,743
  • Tests: 991
  • Examples: 19
  • Chains: 8
  • License: MIT

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.


πŸ“„ License

MIT License β€” see LICENSE for details.


πŸ™ Acknowledgments


Made with ❀️ by @itseywacc