Skip to main content

Open-source framework for building autonomous AI agents that interact with blockchain networks

Project description

 1|# ๐Ÿค– Web3 Agent Kit
 2|
 3|> **Build autonomous AI agents that interact with blockchains โ€” in minutes, not months.**
 4|
 5|[![PyPI](https://img.shields.io/pypi/v/web3-agent-kit.svg)](https://pypi.org/project/web3-agent-kit/)
 6|[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
 7|[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
 8|[![CI](https://github.com/ulsreall/web3-agent-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/ulsreall/web3-agent-kit/actions)
 9|| [![Coverage](https://img.shields.io/badge/coverage-66%25-green.svg)](https://github.com/ulsreall/web3-agent-kit#readme) |
10|[![Twitter](https://img.shields.io/twitter/follow/itseywacc?style=social)](https://twitter.com/itseywacc)
11|
12|<p align="center">
13|  <img src="assets/demo.gif" alt="Web3 Agent Kit Demo" width="700"/>
14|</p>
15|
16|---
17|
18|## ๐Ÿค” Why Web3 Agent Kit?
19|
20|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.
21|
22|**Web3 Agent Kit handles all of that for you.**
23|
24|| Pain Point | Without Web3 Agent Kit | With Web3 Agent Kit |
25||------------|------------------------|---------------------|
26|| **Setup** | Days of boilerplate | `pip install` โ†’ 5 lines of code |
27|| **Multi-chain** | Write adapters per chain | Built-in for 7+ chains |
28|| **LLM Integration** | Manual prompt engineering | Natural language goals, auto-parsed |
29|| **Safety** | Build your own guardrails | Spend limits, kill switch, operator confirmation |
30|| **DeFi** | Read docs, write ABIs | Drop-in Uniswap, Aave, bridges |
31|| **Yield** | Manual research, claim, compound | Auto-compound, cross-protocol APY comparison |
32|| **DCA** | Manual recurring buys | Automated DCA with intervals, limits, callbacks |
33|| **Gas** | Guess gas prices | Smart estimation, timing, batching |
34|| **Security** | Manual approval checks | Auto-scan & revoke risky approvals |
35|| **Alerts** | Manual whale tracking | Auto-monitor wallets, instant alerts |
36|| **Multi-wallet** | Manage keys manually | Batch ops, consolidated portfolio, wallet groups |
37|| **Airdrops** | Manual quest hunting | Auto-track campaigns, multi-wallet farming, Sybil-safe |
38|| **Token Security** | Manual research | Honeypot detection, rug pull check, contract audit |
39|| **Extensibility** | Hard-coded logic | Plugin system โ€” community can extend anything |
40|| **Error Handling** | Manual retry logic | Auto-fallback across LLM providers & RPCs |
41|
42|---
43|
44|## ๐Ÿ—๏ธ Architecture
45|
46|```
47|โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
48|โ”‚                        User / Application                          โ”‚
49|โ”‚                    "Swap 0.1 ETH to USDC on Base"                  โ”‚
50|โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
51|                               โ”‚
52|                               โ–ผ
53|โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
54|โ”‚                          Agent Framework                            โ”‚
55|โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
56|โ”‚  โ”‚ Goal      โ”‚โ†’ โ”‚ LLM Planner  โ”‚โ†’ โ”‚ Tool        โ”‚โ†’ โ”‚ Transactionโ”‚ โ”‚
57|โ”‚  โ”‚ Parser    โ”‚  โ”‚ (cascade)    โ”‚  โ”‚ Router      โ”‚  โ”‚ Executor   โ”‚ โ”‚
58|โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
59|โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
60|                                                            โ”‚
61|                               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
62|                               โ”‚         Safety Layer       โ”‚        โ”‚
63|                               โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
64|                               โ”‚  โ”‚ Spend Governor          โ”‚      โ”‚ โ”‚
65|                               โ”‚  โ”‚ โ€ข Per-tx limits         โ”‚      โ”‚ โ”‚
66|                               โ”‚  โ”‚ โ€ข Daily caps            โ”‚      โ”‚ โ”‚
67|                               โ”‚  โ”‚ โ€ข Kill switch           โ”‚      โ”‚ โ”‚
68|                               โ”‚  โ”‚ โ€ข Operator confirmation โ”‚      โ”‚ โ”‚
69|                               โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚ โ”‚
70|                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
71|                                                            โ”‚
72|                               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
73|                               โ”‚      Tool Ecosystem        โ”‚        โ”‚
74|                               โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚        โ”‚
75|                               โ”‚  โ”‚ Uniswap โ”‚ โ”‚ Bridge   โ”‚ โ”‚        โ”‚
76|                               โ”‚  โ”‚ V2/V3   โ”‚ โ”‚ Agg.     โ”‚ โ”‚        โ”‚
77|                               โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚        โ”‚
78|                               โ”‚  โ”‚ Sniper  โ”‚ โ”‚ Portfolioโ”‚ โ”‚        โ”‚
79|                               โ”‚  โ”‚ Module  โ”‚ โ”‚ Tracker  โ”‚ โ”‚        โ”‚
80|                               โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚        โ”‚
81|                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
82|                                                            โ”‚
83|                               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
84|                               โ”‚    Chain Abstraction Layer  โ”‚        โ”‚
85|                               โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ” โ”‚        โ”‚
86|                               โ”‚  โ”‚ ETH  โ”‚ โ”‚ BASE โ”‚ โ”‚ARB โ”‚ โ”‚        โ”‚
87|                               โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”ค โ”‚        โ”‚
88|                               โ”‚  โ”‚ OP   โ”‚ โ”‚ MATICโ”‚ โ”‚AVAXโ”‚ โ”‚        โ”‚
89|                               โ”‚  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”œโ”€โ”€โ”€โ”€โ”ค โ”‚        โ”‚
90|                               โ”‚  โ”‚ BSC  โ”‚ โ”‚      โ”‚ โ”‚    โ”‚ โ”‚        โ”‚
91|                               โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”˜ โ”‚        โ”‚
92|                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
93|```
94|
95|---
96|
97|## ๐Ÿ“Š Comparison vs Alternatives
98|
99|| Feature | Web3 Agent Kit | LangChain + Web3 | Custom Bot | Goat SDK |

100||---------|:--------------:|:----------------:|:----------:|:--------:| 101|| Setup Time | Minutes | Hours | Days | Hours | 102|| Multi-chain | 7+ chains | Manual | Manual | Limited | 103|| Built-in LLM | 6 providers | DIY | โŒ | โŒ | 104|| DeFi Tools | Uniswap, Aave, bridges | โŒ | โŒ | Limited | 105|| Token Sniper | โœ… | โŒ | โŒ | โŒ | 106|| DCA Bot | โœ… | โŒ | โŒ | โŒ | 107|| Gas Optimizer | โœ… | โŒ | โŒ | โŒ | 108|| Approval Manager | โœ… | โŒ | โŒ | โŒ | 109|| Wallet Watcher | โœ… | โŒ | โŒ | โŒ | 110|| Yield Optimizer | โœ… | โŒ | โŒ | โŒ | 111|| Multi-Wallet | โœ… | โŒ | โŒ | โŒ | 112|| Airdrops | โœ… | โŒ | โŒ | โŒ | 113|| Token Security | โœ… | โŒ | โŒ | โŒ | 114|| Plugin System | โœ… | โŒ | โŒ | โŒ | 115|| Safety Rails | โœ… Governor | โŒ | โŒ | โŒ | 116|| Natural Language | โœ… | Partial | โŒ | โŒ | 117|| Python Native | โœ… | โœ… | Varies | โŒ (TS) | 118|| Type Hints | โœ… | Partial | Varies | N/A | 119|| Active Maintenance | โœ… | โœ… | Depends | Limited | 120| 121|--- 122| 123|## ๐ŸŽฏ Quick Start 124| 125|### 1. Install 126| 127|bash 128|pip install web3-agent-kit 129| 130| 131|### 2. Set Environment Variables 132| 133|bash 134|# Required: Wallet private key 135|export PRIVATE_KEY="0x..." 136| 137|# Required: At least one LLM provider key 138|export OPENAI_API_KEY="sk-..." # OpenAI 139|export ANTHROPIC_API_KEY="sk-ant-..." # Anthropic (best reasoning) 140|export GROQ_API_KEY="gsk_..." # Groq (fastest) 141|export DEEPSEEK_API_KEY="sk-..." # DeepSeek (cheapest) 142| 143|# Optional: Custom RPC endpoints (public defaults are provided) 144|export ETH_RPC="https://..." 145|export BASE_RPC="https://..." 146| 147| 148|### 3. Write Your First Agent 149| 150|python 151|from web3_agent_kit import Agent, Wallet, Chain, ChainManager 152|from web3_agent_kit.defi import Uniswap 153| 154|# Setup 155|chain_manager = ChainManager(chains=[Chain.BASE]) 156|wallet = Wallet.from_env("PRIVATE_KEY", chain_manager=chain_manager) 157|uniswap = Uniswap(chain_manager=chain_manager) 158| 159|# Create agent with LLM reasoning 160|agent = Agent( 161| wallet=wallet, 162| chains=[Chain.BASE], 163| tools=[uniswap], 164|) 165| 166|# Natural language swap โ€” that's it! 167|result = agent.run("Swap 0.1 ETH to USDC on Base") 168|print(result) 169| 170| 171|### 4. Run It 172| 173|bash 174|python my_agent.py 175| 176| 177|> ๐Ÿ’ก Tip: Start with a small amount on a testnet or use dry_run=True mode to validate behavior before going live. 178| 179|--- 180| 181|## โœจ Features 182| 183|### ๐Ÿค– Core 184|- ๐Ÿ”— Multi-chain support โ€” Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, BSC 185|- ๐Ÿง  LLM-powered reasoning โ€” Multi-provider cascade (OpenAI, Anthropic, Groq, DeepSeek, OpenRouter, Kimi) 186|- ๐ŸŽฏ Natural language goals โ€” Tell the agent what to do in plain English 187|- ๐Ÿ” Governed signing โ€” Safety caps, kill-switch, operator confirmation 188| 189|### ๐Ÿ’ฐ DeFi 190|- ๐Ÿ’ฑ Uniswap V2 swaps โ€” Actual token swaps with quotes, approvals, slippage protection 191|- ๐ŸŒ‰ Cross-chain bridges โ€” Li.Fi + Socket aggregators for best routes 192|- ๐Ÿ“Š Portfolio tracking โ€” Real-time balances, P&L across all chains 193| 194|### ๐Ÿ”ซ Sniper 195|- ๐ŸŽฏ Token sniper โ€” Monitor new liquidity pools, auto-buy safe tokens 196|- ๐Ÿ›ก๏ธ Risk assessment โ€” Honeypot detection, liquidity checks, contract analysis 197|- โšก Live monitoring โ€” Background thread with callback alerts 198| 199|### ๐Ÿ“ˆ DCA Bot 200|- ๐Ÿ”„ Recurring buys โ€” Dollar-cost average into any token automatically 201|- โฐ Flexible intervals โ€” Hourly, daily, weekly, biweekly, monthly 202|- ๐Ÿ›‘ Spending limits โ€” Max buys, max total spend, auto-stop 203|- ๐Ÿ“Š Cost average analysis โ€” Track avg price, min/max, P&L 204|- ๐Ÿ’พ Persistent orders โ€” Survives restarts, stored on disk 205|- ๐Ÿ”” Callbacks โ€” Hook into execution events for notifications 206| 207|### ๐Ÿ”’ Security Module (NEW!) 208|- ๐Ÿฏ Honeypot detection โ€” Check if token can be sold before buying 209|- ๐Ÿงถ Rug pull checker โ€” Assess rug pull risk factors 210|- ๐Ÿ“ Contract audit โ€” Detect hidden mint, blacklist, pause, proxy patterns 211|- ๐Ÿ’ฐ Tax checker โ€” Buy/sell tax analysis 212|- ๐Ÿ’ง Liquidity analysis โ€” Locked %, lock duration 213|- ๐Ÿ‘ฅ Holder analysis โ€” Concentration, whale detection 214|- ๐Ÿ“Š Safety score โ€” 0-100 score with risk levels 215|- ๐ŸŒ GoPlus API โ€” Real-time token security data 216|- ๐Ÿ“ˆ DexScreener โ€” Liquidity data integration 217| 218|### ๐Ÿช‚ Airdrop Automation (NEW!) 219|- ๐Ÿ” Campaign Discovery โ€” Auto-scan 7 platforms (Galxe, Zealy, Layer3, QuestN, TaskOn, Intract, Port3) 220|- โ›“๏ธ On-chain Farming โ€” DeFi interactions for airdrops (Base, Ethereum, Arbitrum, Optimism, Scroll, Linea, zkSync) 221|- โฐ Daily Scheduler โ€” Automate recurring tasks with retry logic 222|- ๐Ÿ“Š Points Dashboard โ€” Track points across all platforms with history 223|- ๐Ÿ”— Referral Manager โ€” Generate, track, and optimize referral links 224|- ๐Ÿšฐ Faucet Claimer โ€” Auto-claim testnet tokens from 12+ faucets 225|- ๐Ÿค– Multi-wallet โ€” Sybil avoidance, wallet rotation 226|- ๐Ÿ”Œ Plugin System โ€” Extend with custom platform executors 227| 228|### ๐ŸŒ REST API 229|- ๐Ÿ“ก 18 endpoints โ€” Full HTTP API for all modules 230|- ๐Ÿ”‘ API key auth โ€” Secure access control 231|- ๐Ÿ“– Swagger UI โ€” Interactive API documentation 232|- ๐Ÿ”„ Auto-fallback โ€” Multi-provider LLM cascade 233| 234|### ๐Ÿ”Œ Plugin System 235|- ๐Ÿ“ฆ Plugin registry โ€” Discover and load plugins dynamically 236|- ๐Ÿ› ๏ธ Custom plugins โ€” Extend with your own tools 237|- ๐Ÿ”„ Hot reload โ€” Add plugins without restarting 238| 239|--- 240| 241|## ๐ŸŒ REST API 242| 243|Full HTTP API for all modules โ€” use from any language (JavaScript, curl, etc): 244| 245|bash 246|# Start the API server 247|python -m src.api 248| 249|# Or with API key 250|WEB3_API_KEY=your-secret python -m src.api 251| 252| 253|Endpoints: 254| 255|| Endpoint | Method | Description | 256||----------|--------|-------------| 257|| /wallet/info | GET | Wallet info + balance | 258|| /swap/quote | GET | Get swap quote | 259|| /swap/execute | POST | Execute token swap | 260|| /portfolio/ | GET | Portfolio dashboard | 261|| /gas/estimate | GET | Gas estimates (EIP-1559) | 262|| /gas/recommendation | GET | Gas timing recommendation | 263|| /watcher/list | GET | List watched wallets | 264|| /watcher/add | POST | Add wallet to watch | 265|| /approval/scan | GET | Scan token approvals | 266|| /approval/risk | GET | Risk report | 267|| /dca/orders | GET/POST | List/create DCA orders | 268|| /yield/opportunities | GET | Scan yield opportunities | 269|| /yield/best | GET | Find best yield | 270|| /bridge/quote | GET | Get bridge quote | 271|| /bridge/execute | POST | Execute bridge | 272|| /health | GET | Health check | 273|| /docs | GET | Swagger UI | 274|| /redoc | GET | ReDoc documentation | 275| 276|Example: 277|bash 278|# Get gas estimate 279|curl http://localhost:8000/gas/estimate?chain=ethereum 280| 281|# Get swap quote 282|curl "http://localhost:8000/swap/quote?token_in=ETH&token_out=USDC&amount_in=1.0" 283| 284|# Scan approvals 285|curl http://localhost:8000/approval/scan?chain=ethereum 286| 287| 288|--- 289| 290|## ๐ŸŽฏ Showcase 291| 292|### Telegram Bot 293|A full-featured Telegram bot built with web3-agent-kit: 294| 295|bash 296|cd showcase/telegram-bot 297|pip install -r requirements.txt 298|python bot.py 299| 300| 301|Features: balance check, token swap, portfolio tracking, token sniper, cross-chain bridge. 302| 303|Telegram Bot Demo 304| 305|--- 306| 307|## ๐Ÿ“ฆ Examples 308| 309|| Example | Description | 310||---------|-------------| 311|| examples/llm_swap_agent.py | LLM-powered natural language swapping | 312|| examples/direct_swap.py | Programmatic Uniswap swap without LLM | 313|| examples/token_sniper.py | Monitor new pairs, auto-buy safe tokens | 314|| examples/portfolio_dashboard.py | Real-time portfolio across chains | 315|| examples/bridge_agent.py | Cross-chain transfers via Li.Fi/Socket | 316|| examples/swap_agent.py | Autonomous token swapping | 317|| examples/yield_optimizer.py | Cross-protocol yield farming + auto-compound | 318|| examples/multi_wallet.py | Multi-wallet management + batch ops | 319|| examples/plugin_system.py | Plugin system usage + custom plugins | 320|| examples/dca_bot.py | Dollar-cost averaging bot with intervals & limits | 321|| examples/api_server.py | REST API server with Swagger docs | 322|| examples/airdrop_farmer.py | Multi-chain airdrop farming | 323|| examples/sniper_bot.py | Token launch sniper | 324|| examples/portfolio_tracker.py | Portfolio tracking & reporting | 325|| examples/airdrop_suite.py | Full airdrop automation suite | 326|| examples/security_analysis.py | Token security analysis | 327| 328|--- 329| 330|## ๐Ÿง  LLM Integration 331| 332|Multi-provider cascade with automatic fallback: 333| 334|python 335|from web3_agent_kit.agent import LLM, LLMConfig 336| 337|# Use any LLM provider with automatic fallback 338|llm = LLM(LLMConfig( 339| providers=["anthropic", "openai", "groq", "deepseek"], 340| model="claude-3-5-sonnet-20241022", 341|)) 342| 343|# Natural language โ†’ structured action 344|action = llm.parse("Swap 0.1 ETH to USDC on Base") 345|# โ†’ {"tool": "uniswap", "action": "swap", "params": {...}} 346| 347| 348|--- 349| 350|## ๐Ÿ”’ Security Module 351| 352|Analyze tokens before interacting: 353| 354|python 355|from web3_agent_kit.security import TokenAnalyzer, SecurityConfig 356| 357|analyzer = TokenAnalyzer(SecurityConfig(chain="base")) 358| 359|# Quick check 360|result = analyzer.quick_check("0x...") 361|print(f"Is Honeypot: {result['is_honeypot']}") 362| 363|# Full analysis 364|report = analyzer.analyze_token("0x...") 365|print(f"Safety Score: {report.safety_score}/100") 366|print(f"Risk Level: {report.risk_level.value}") 367| 368|if report.is_honeypot: 369| print("๐Ÿšจ HONEYPOT DETECTED!") 370|elif report.safety_score < 50: 371| print("โš ๏ธ HIGH RISK TOKEN") 372|else: 373| print("โœ“ Safe to trade") 374| 375| 376|--- 377| 378|## ๐Ÿช‚ Airdrop Automation 379| 380|Automate airdrop farming across multiple platforms: 381| 382|python 383|from web3_agent_kit.airdrop import ( 384| CampaignDiscovery, 385| OnChainAirdropFarmer, 386| AirdropScheduler, 387| PointsDashboard, 388| ReferralManager, 389| FaucetClaimer, 390|) 391| 392|# Discover new campaigns 393|discovery = CampaignDiscovery() 394|campaigns = discovery.discover_all() 395| 396|# On-chain farming (dry run) 397|farmer = OnChainAirdropFarmer(OnChainConfig(chain="base", dry_run=True)) 398|farmer.farm_plan("base_activity") 399| 400|# Schedule daily tasks 401|scheduler = AirdropScheduler() 402|scheduler.add_daily("galxe_checkin", "09:00", galxe_checkin_fn) 403| 404|# Track points 405|dashboard = PointsDashboard(DashboardConfig(wallet="0x...")) 406|dashboard.sync_all() 407| 408|# Generate referrals 409|manager = ReferralManager() 410|manager.generate_links(count=10) 411| 412|# Claim testnet tokens 413|claimer = FaucetClaimer() 414|claimer.claim_all(wallet="0x...") 415| 416| 417|--- 418| 419|## ๐Ÿ“Š Project Stats 420| 421|- Version: 1.2.0 422|- Modules: 20+ 423|- Tests: 565+ 424|- Examples: 18 425|- Chains: 7+ 426|- License: MIT 427| 428|--- 429| 430|## ๐Ÿค Contributing 431| 432|We welcome contributions! See CONTRIBUTING.md for guidelines. 433| 434|--- 435| 436|## ๐Ÿ“„ License 437| 438|MIT License โ€” see LICENSE for details. 439| 440|--- 441| 442|## ๐Ÿ™ Acknowledgments 443| 444|- Uniswap โ€” DEX protocol 445|- Li.Fi โ€” Bridge aggregator 446|- Socket โ€” Bridge aggregator 447|- GoPlus โ€” Token security API 448|- DexScreener โ€” DEX data 449| 450|--- 451| 452|

453| Made with โค๏ธ by @itseywacc 454|

455|

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

web3_agent_kit-1.5.0.tar.gz (210.1 kB view details)

Uploaded Source

Built Distribution

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

web3_agent_kit-1.5.0-py3-none-any.whl (209.2 kB view details)

Uploaded Python 3

File details

Details for the file web3_agent_kit-1.5.0.tar.gz.

File metadata

  • Download URL: web3_agent_kit-1.5.0.tar.gz
  • Upload date:
  • Size: 210.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for web3_agent_kit-1.5.0.tar.gz
Algorithm Hash digest
SHA256 437e3628896b986ccbbff81b4069026957ffd1b49cfc929fc438fec5087ad52f
MD5 c474c0218b1388b9983d836370bcd049
BLAKE2b-256 a0ba3499ad91988c6f9fccd5627ab7afb6bde3382514f0d79460876a4574412f

See more details on using hashes here.

File details

Details for the file web3_agent_kit-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: web3_agent_kit-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 209.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for web3_agent_kit-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fa5fdcc273d8500731a1b94de4005a25a7c82b746aee7b6b91d3f4d1652bb94
MD5 f613c13e62d7c25ebfaa97acf4001178
BLAKE2b-256 8c4e9d42016ac2d5fb50f6465a2bba360fabc84fbfcd205aae7c2079f27282f6

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