Mode Docs
  • Introduction
    • 🟡Introducing Mode
    • ✅AI Agent Dev Roadmap
  • AI AGENTS
    • Mode AI Terminal
    • 🤷What are AI Agents?
    • 🏗️Building your first agent
    • Tutorials
      • Quickstart
    • 🛠️AI Tooling
      • AI Audits
      • AI APIs
      • Frameworks
  • Tools
    • 🖥️RPC
    • 🪶Multisig wallets
    • 🔁Bridge
    • 🚰Testnet Faucets
    • 🕵️Block Explorers
    • 🗂️Data Indexers
    • 🧙‍♂️Oracles
    • ⛓️Interoperability
    • ⁉️Randomness
    • 🌎General Tooling
  • Tutorials
    • Interacting with Smart Contracts using ethers.js
    • Deploying a Smart Contract
      • Using Hardhat
      • Using Thirdweb
      • Using Foundry
      • Using Remix
    • Verifying your smart contract
      • Using Hardhat
      • Using Foundry
  • User Guides
    • ℹ️Network Details
    • 🦊Add Mode
    • 🏡Contract Addresses
      • Tokens
      • L1/L2 Mainnet Contracts
      • Testnet Contracts
    • 🌉Bridge
      • ➡️Bridge to Mode
      • ⬅️Bridge from Mode
      • 🏗️Bridging to Testnet
    • 📤Move to/from CEX
  • $MODE
    • 🟡MODE Tokenonomics
    • 1️⃣Season 1 (ended)
    • 2️⃣Season 2 (ended)
    • 3️⃣Governance Season 3 (ended)
      • Governance Contract Addresses
    • 4️⃣Mode Governance Season 4
    • 5️⃣Season 5
  • Other Docs
    • 🔓General Security
      • 🔓Mode L2 Security Model
      • ⛑️Optimism Bug Bounty
      • Security Upgrades
        • 01/08/2024 Bridge Upgrade Fund Rescue
        • 06/08/2024 Mode Mainnet Key Handover
      • 🔐Audits
    • 🔗Official Links
    • 🤘Branding Guidelines
    • ⌨️Node Operators
Powered by GitBook
On this page
  • How to Run Mode Plugin from GOAT
  • Prerequisites
  • Steps

Was this helpful?

Edit on GitHub
  1. AI AGENTS
  2. Tutorials

Quickstart

This is an example on how to run a basic agent that performs a task on Mode with GOAT

PreviousTutorialsNextAI Tooling

Last updated 3 months ago

Was this helpful?

How to Run Mode Plugin from GOAT

Prerequisites

  • or higher.

  • .

  • .

Steps

  1. Clone the GOAT repository:

git clone https://github.com/goat-sdk/goat.git
  1. Open the repository in your preferred code editor (we'll use VSCode in this example).

  2. Install dependencies and build the project:

  • Since we are going to test the Mode plugin, which is in the TypeScript folder, we first need to navigate to that directory:

cd goat/typescript
  • Then, run the following commands:

pnpm install
pnpm build
  1. Set up the Mode plugin:

  • Go to the plugin directory:

cd examples/vercel-ai/mode
  • Copy the environment configuration file:

cp .env.template .env
  • Fill in the .env file with the following values:

    • WALLET_PRIVATE_KEY: Your wallet's private key. It's important to ensure that the key starts with 0x to avoid execution errors.

  1. Rebuild the project:

  • Navigate back to the goat/typescript directory and run:

pnpm install
pnpm build
  1. Run the Mode plugin:

  • Navigate back to the plugin directory:

cd examples/vercel-ai/mode
  • Run the following command to start the plugin:

npx ts-node index.ts
  • You will see the message:

Enter your prompt (or "exit" to quit):

Ready! You can now interact with the Mode plugin in GOAT.

OPENAI_API_KEY: Obtained from .

Node.js v20.12.2
Turbo
PNPM
OpenAI