Skip to content

Build your own onchain AI Agent from scratch using OpenAI Assistants and Viem for blockchain capabilities

Notifications You must be signed in to change notification settings

jarrodwatts/onchain-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onchain Agent

An AI-powered blockchain agent that can interact with the Abstract Testnet blockchain. Built with OpenAI's Assistant API and viem.

Features

  • AI Assistant powered by OpenAI's Assistant API with custom personality
  • Direct blockchain interactions through Viem
  • Support for:
    • ERC20 token deployments and interactions
    • Contract reading and writing
    • Balance checking
    • Transaction management
    • Uniswap V3 pool creation

Prerequisites

  • Node.js (v18 or higher)
  • TypeScript
  • An OpenAI API key
  • A wallet private key for the agent

Getting Started

  1. Clone the repository:
git clone https://github.com/jarrodwatts/onchain-agent.git

cd onchain-agent
  1. Install dependencies:
npm install
  1. Create the .env file and add your OpenAI API key and wallet private key:
OPENAI_API_KEY=your_openai_api_key
PRIVATE_KEY=your_wallet_private_key
  1. Run the agent:
npm start

About

Build your own onchain AI Agent from scratch using OpenAI Assistants and Viem for blockchain capabilities

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published