Member-only story
AI, Coinbase SDK, AI Agents
Let’s Code a Coinbase SDK AgentKit Tool that Empowers an Open AI Chatbot to Examine Smart Contracts!
… and then let’s use the AI to explore our own creation.
What if you could create a chatbot that not only answers your questions but also interacts directly with Ethereum smart contracts? Let’s dive into building a tool using the Coinbase SDK to make this a reality! Our sample will reach out to the Etherscan API and fetch, and then run, various functions that exist on the target contract.
I’ll share and discuss the code for this tool below. But first, I think the result is worth sharing. So, here’s a conversation I just had with the newly empowered chatbot. It reveals much about how the tool works, and about how the information it learned is incorporated into the response:
👤ME: Can you fetch me info on this contract: https://etherscan.io/address/0xdaa3d1a810322003248e22ed739762e3e0bce7a9
🤖 AI Chatbot: Here is the information on the contract `0xdaa3d1a810322003248e22ed739762e3e0bce7a9`: — **Name**: LOOPIE-LOO — **Symbol**: LDOGS — **Owner**: `0x0F198105A26902df2a16FA0b1209265Fc437E462` — **Total Supply**: 9663 — **Max Supply**: 9663 — **Mint Price**: 0 ETH — **Sale is Live**: Yes — **Wallet Limit**: 25 NFTs — **Reserved NFTs**: 0 — **Total Released**: 0…