Setting up your Agent

Prerequisites

Before getting started, make sure you have the following installed:

Project Setup

1

Clone This Repo

git clone https://github.com/Supra-Labs/Supra-agents-hub.git
2
cd Supra-agents-hub
cd Agents
cd SupraOnChainAgent
3

Install Dependencies

npm install
4

Running Your Agent

npx tsx agent.ts

You should see a welcome message with your generated account address and list of available commands. Sample Output below:

$ npx tsx agent.ts

*** Welcome to SupraOnChainAgent ***

Initializing Supra Client...
Connected to network with chain ID: _ChainId { value: 6 }
Loaded existing account from account.json
Your Supra Account Address: 0x26b58df6a3716bc16de96d6aa5fa60c1cf12e0854e8983b4a6d0a4a9548c218d

Available commands:
 - 'what is the balance of my account'     : Fetch account info & balance
 - 'please fund my account'                 : Fund account via faucet
 - 'show me transaction details for <TX_HASH>': Fetch transaction details
 - 'what is my transaction history'         : Retrieve transaction history
 - 'show my account resources'              : Fetch resource data
 - 'help'                                   : Show this help message
 - 'exit'                                   : Quit the agent

SupraOnChainAgent>

Last updated