Skip to content

suiware/ai-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 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 Sui wallet balance.

Examples:

  • get my sui wallet balance
  • my sui balance

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)

Swaps SUI for USDC or vice versa.
Uses Navi SDK for swapping.

Examples:

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

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

Future vision

  • Improve suiTransferTool: add support for SuiNS names
  • Improve suiTransferTool: add support for other tokens
  • Add more tools: staking, lending, pools, etc.
  • Add more services: Suilend, Bluefin, Cetus, DefiLlama, etc.
  • Add more model providers: Atoma, local models
  • Implement Command scheduling
  • Add Web UI examples
  • Create automated tests

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.