How to Setup Locally

To set up the Sui Agent Kit on your local machine, you’ll need to clone the repository, install the required dependencies, configure environment variables, and build the project. Follow the steps below to begin.

Prerequisites

  • Node: Ensure you have Node version 23.x or higher installed. You can download it from Node Official Website.
  • Package Manager: Node’s package manager comes bundled with Node. Verify installation by running npm -v.
  • Git: Ensure Git is installed and configured. Download from Git Official Website.

Step-by-Step

  1. Clone the Repository
git clone https://github.com/yourusername/sui-agent-kit.git
  1. Navigate to the Project Directory
cd sui-agent-kit
  1. Install Dependencies
pnpm install
  1. Configure Environment Variables Create a .env file in the project’s root directory to securely store your environment variables. Ensure the file includes the following variables:
OPENAI_API_KEY=your_openai_api_key
RPC_URL=your_rpc_url
SUI_PRIVATE_KEY=your_sui_private_key

OPENAI_API_KEY: Your OpenAI API key for generating images and interacting with OpenAI services. RPC_URL: Your RPC_URL for Sui blockchain interactions. SUI_PRIVATE_KEY: Your Sui wallet’s private key. Note: Ensure that the .env file is added to .gitignore to prevent exposing sensitive information. 5. Build the Project

 pnpm run build

This will generate the compiled files in the dist/ directory. 6. Generate Documentation (Optional)

pnpm run docs

The documentation will be available in the docs/ directory.