Skip to content

suiware/ai-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sui tools for Vercel AI SDK (monorepo)

Pluggable tools for Vercel AI SDK which allow AI assistants to interact with Sui Network and perform various actions.

Packages

  • @suiware/ai-tools - a collection of pluggable tools for Vercel AI SDK, which allow AI assistants to interact with Sui Network and perform various actions.

  • Examples - examples of AI assistants, demonstrating @suiware/ai-tools in action.

Available tools

suiWalletBalanceTool

Gets non-zero wallet balances.

Examples:

  • get my wallet balances
  • my balances

suiTransferTool

Transfers the specified amount of SUI to the specified address.

Examples:

  • transfer 1 sui to 0x1234567890abcdef
  • send 10 sui to 0x1234567890abcdef
  • donate 1 sui to @abcdef1234567890
  • throw 1 sui to abcdef1234567890.sui

suiSwapTool (mainnet only)

Performs token swaps. Supported tokens are listed here

Examples:

  • swap 1 sui for usdc
  • convert 10 usdc to sui
  • swap 1 sui for weth

vixTool

Gets the current CBOE Volatility Index (VIX) index value.

Examples:

  • get current cboe vix
  • get vix

Check the source code of the tools.

Available examples

Example Model Description
Simple balance tool Anthropic: claude-3-5-sonnet-latest Gets Sui wallet balance, no interactivity
Interactive agent (text streaming) Anthropic: claude-3-5-sonnet-latest Portfolio management agent with all tools enabled
Interactive agent (text streaming) OpenAI: gpt-3.5-turbo Portfolio management agent with all tools enabled
Interactive agent (text generating) OpenAI: gpt-3.5-turbo Portfolio management agent with all tools enabled

How to use examples

1. Install dependencies

pnpm install

2. Configure environment variables

cp packages/examples/.env.example packages/examples/.env

Then update the environment variables in the packages/examples/.env file.

3. Run examples

pnpm start:anthropic:simple:balance
# or
pnpm start || pnpm start:anthropic:streaming
# or 
pnpm start:openai:streaming
# or
pnpm start:openai:generating

How to contribute

Learn the simple packages/tools package and contribute your own tool by sending a PR to this repository. It can be an integration with pools, lending protocols, or any other services that can be beneficial for building AI assistants for Sui.