Subscribe to our Blog

Subscribe to Crossmint's blog to receive updates on the latest case studies, Web3 technical guides, and more.

Subscribe Crossmint Blog cover image
Dwight Torculas profile image Dwight Torculas

Building AI Agents: Shopping Assistant Developer Example

How to Build a Shopping Assistant AI Agent in 10 Lines of Code Using Open-Source Frameworks

Building AI Agents: Shopping Assistant Developer Example
AI Agent Tutorials, Guides, Implementations, and Walkthroughs by Crossmint

Welcome! In this guide, we will show you how to create a CLI-based AI agent that can purchase real world items from an onchain marketplace. This example will be using Vercel’s AI SDK, however you can switch it out for other popular AI agent frameworks such as Eliza, Langchain, Zerebro and more via the Goat SDK.

By the end of this guide, you will have a natural conversation interface for shopping, the ability to make an onchain purchase of real world items, order tracking and status updates.

For any assistance, reach out to us on Discord or X where we're happy to answer any question you may have!

Prerequisites for Creating an AI Delivery Agent

  • Node & pnpm installed
  • Have your wallet's private key ready (otherwise, generate new wallet via pnpm generate-wallet)
  • Hold USDC
  • OpenAI API key

Getting Started

1. Clone the repository:

git clone https://github.com/worldstore/delivery-agent.git
cd delivery-agent

2. Install dependencies:

pnpm install

3. Copy .env.template to .env to fill in the appropriate values.

cp .env.template .env

4. Configure your variables:

  • WALLET_PRIVATE_KEY: Your wallet's private key (will be used for payment)
  • OPENAI_API_KEY: Your OpenAI API key for AI interactions
  • RPC_PROVIDER_URL: Base network RPC endpoint for transaction processing

5. Start the agent:

pnpm start

6. Now that your agent is running in your CLI, let’s interact with it and initiate an order:

  • Tell the agent what you are looking for, e.g.
    • “I want to order some goodies for the weekend”
    • “Do you see any games available for sale?”
    • “I want cookies’
  • Specify which product you want to buy from the ones available
  • Provide your email to confirm payment
  • Ship the product to your address by providing your name and address

7. After you’ve made an order, you will receive a receipt in the email address that you provided. You will also receive an email over the next couple of days with shipping details

Next Steps

Now that we have an AI agent up and running, you can learn how to use the Goat SDK open-source framework to implement 200+ different tools that enable your agent to make bets on Polymarket, trade tokens on Uniswap or Jupiter and so much more.

Goat SDK also supports all wallets from Crossmint’s Smart Wallets to Coinbase Wallets and all chains (EVM-based and Solana).

Need Support?