npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sui-agent-tools

v0.1.1

Published

Tools for Sui blockchain agents

Readme

Sui Agent Tools

A collection of tools for interacting with various protocols on the Sui blockchain.

These tools are designed to be used with AI tools seemlessly and are interchangebly used with vercel AI SDK, atoma network, openai, anthropic, bitte.ai, sui-agent-kit

Installation

pnpm i sui-agent-tools

| Tool | Description | Key Functions | |------|-------------|---------------| | Swap Tool (Aftermath) | DEX trading interface | Get quotes, execute swaps, slippage protection, token support | | NAVI Protocol | Lending/borrowing operations | Supply, withdraw, borrow, repay, claim rewards | | Liquid Staking (Spring) | Spring protocol integration | Mint/redeem sSUI, manage staking positions | | Cetus DEX | Full DEX functionality | Pool, liquidity, swap and position management | | Bluefin DEX | Spot trading interface | Execute trades with slippage protection, pool management | | Balance Tools | Account management | Get balances, transfer SUI tokens | | Price Tools | Market data access | Current prices, changes, market data | | Query Tool | Blockchain data access | Chain info, address and transaction data | | List Coins | Token reference | Supported tokens, pairs, addresses |

import { generateText } from 'ai';
import { swapTool } from './swapTool';
import { listCoinsTool } from './listCoinsTool'; // Assuming you have this tool
import { z } from 'zod';

async function runSuiAgent() {
  try {
    const result = await generateText({
      model: openai('gpt-4'),
      system: `You are a helpful assistant that helps users trade tokens on the Sui blockchain using Aftermath DEX.
        Always follow these steps:
        1. When a user wants to swap, first get a quote using getQuote
        2. Show the quote details to the user and ask for confirmation
        3. Only execute the swap after user confirmation with executeSwap
        4. Always use proper decimal conversion for token amounts`,
      prompt: "I want to swap 0.1 SUI for USDC",
      tools: {
        swap: swapTool,
        listCoins: listCoinsTool
      },
      // Enable multiple steps to allow quote -> confirm -> execute flow
      maxSteps: 3
    });

  }}

Getting all tools


import { generateText } from 'ai';
import { getTools, tools } from '../src/index';

// Example 1: Basic tool selection
const allTools = getTools();
console.log('Available tools:', Object.keys(allTools));

async function swapTokensExample() {
    
    try {
        const result = await generateText({
            model: openai('gpt-4'),
            system: `I'm a Sui blockchain assistant.
                My responses should be organic, friendly and focused on providing clear transaction outcomes.
                When executing transactions, I will always provide the transaction digest and offer to look up additional details if the query tool is available.
                I can help you with the tools you've selected. Just let me know what you'd like to do and I'll help guide you through using them.`,
            prompt: "I want to swap 0.1 SUI for USDC",
            tools: getTools();
            maxSteps: 3
        });
        
        console.log('AI Response:', result);
    } catch (error) {
        console.error('Error during swap:', error);
    }
}

```