Biryani Blocks – AI agent for real-time wallet token insights.
Biryani Blocks - AI-Powered Blockchain Agent
No more juggling raw blockchain queries. With AgentKit and CDP Data APIs, Biryani Blocks connects to your wallet, retrieves token balances instantly, and presents them in a sleek, user-friendly format. It’s your personal AI blockchain agent—ready to handle token data and Web3 ops with ease. The project features custom-optimized tools that deliver precise, formatted responses for better user experience when querying token balances and performing other Web3 operations.
Biryani Blocks is a Next.js web application that integrates Coinbase's AgentKit to create an AI-powered conversational interface for blockchain interactions. The project serves as an onchain agent that can perform various cryptocurrency and blockchain operations through natural language conversations.
Key Features AI Chat Interface: Clean, modern chat UI built with React and Tailwind CSS that allows users to interact with the blockchain agent through natural language Blockchain Integration: Powered by Coinbase's AgentKit and CDP (Coinbase Developer Platform) SDK for seamless blockchain operations Token Balance Queries: Custom tool for retrieving token balances for any wallet address, with optional filtering by specific token contracts Multi-Network Support: Configured to work with Base mainnet and other EVM-compatible networks Real-time Conversations: Interactive chat experience with thinking indicators and markdown support Technical Stack Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS AI/ML: OpenAI GPT integration via AgentKit, LangChain for agent orchestration Blockchain: Coinbase CDP SDK, Viem, Wagmi for Web3 interactions Additional: React Query for state management, React Markdown for rich text rendering Core Functionality The application's main capability revolves around the custom addressTokenBalances tool that:
Accepts wallet addresses and optional token contract addresses Queries the Coinbase CDP API for token balance information Returns formatted token balances with symbols and name as below The token balances for the address 0x1B88d879000aed2ad1f12f3677ed404DF9fe9d13 are as follows:
ETH: 0.0057248687936584 (Ether) LINK: 21.828612433134082 (ChainLink Token)
Handles Base network interactions specifically Architecture Agent System: Uses LangChain's ReAct agent pattern with memory persistence Custom Tools: Extensible tool system for adding new blockchain capabilities API Routes: Next.js API routes handle agent interactions and tool execution Environment Configuration: Secure handling of API keys for OpenAI, CDP, and other services