Sui Agent Kit

An open-source toolkit for connecting AI agents to Sui chain. Now, any agent, using any model can autonomously perform Sui actions.

Quick start

npm install sui-agent-kit
Quick start
import { SuiAgentKit, createSuiTools } from "sui-agent-kit";

// Initialize with private key and optional RPC URL
const agent = new SuiAgentKit(
  "your_sui_private_key",
  "https://fullnode.mainnet.sui.io:443",
  "your-openai-api-key"
);

// Create LangChain tools
const tools = createSuiTools(agent);

Core features

Blockchain Operations

  • Token Operations
    • Deploy tokens
    • Transfer assets
    • Balance checks
    • Stake Sui native
  • DeFi Integration

AI Integration Features

  • LangChain Integration
    • Ready-to-use LangChain tools
    • Autonomous agent support with React
    • Memory management
    • Streaming responses
  • Autonomous Modes
    • Interactive chat mode
    • Autonomous mode
    • Configurable intervals
    • Error handling and recovery
  • AI Tools
    • DALL-E integration for NFTs
    • Natural language processing
    • Price feed integration
    • Automated decision-making

Example Usage

Deploy Tokens

Effortlessly deploy a new token using the provided metadata.

import { SuiAgentKit, deploy_token } from 'sui-agent-kit';

const agent = new SuiAgentKit(
  "your_sui_private_key",
  "https://fullnode.mainnet.sui.io:443",
  "your-openai-api-key"
);

const result = await deploy_token(agent, {
  name: 'TOKEN_NAME',
  symbol: 'TOKEN_SYMBOL',
  totalSupply: 'TOKEN_SUPPLY',
  description: 'TOKEN_DESCRIPTION',
  fixedSupply: true,
  imageUrl: 'TOKEN_IMAGE_URL',
  decimals: TOKEN_DECIMAL,
});

console.log('Token deployed:', result);

Check Your Wallet’s Assets

Easily view your wallet’s assets with a single message.

import { SuiAgentKit, get_holding } from 'sui-agent-kit';

const agent = new SuiAgentKit(
  "your_sui_private_key",
  "https://fullnode.mainnet.sui.io:443",
  "your-openai-api-key"
);

const assets = await get_holding(agent);

console.log('Wallet's assets:', assets);

Transfer Tokens

Just tell the Agent the token symbol, the amount, and the recipient address, and it will handle the transaction instantly.

import { SuiAgentKit, transfer_token } from 'sui-agent-kit';

const agent = new SuiAgentKit(
  "your_sui_private_key",
  "https://fullnode.mainnet.sui.io:443",
  "your-openai-api-key"
);

const result = await transfer_token(agent, SUI, destination_address, amount);

console.log('Transaction:', result);

AI Integrations

Leverage powerful AI tools like LangChain, OpenAI’s GPT, DALL-E, and more!