Pluggable tools for Vercel AI SDK which allow AI assistants to interact with Sui Network and perform various actions.
-
@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.
Gets Sui wallet balance.
Examples:
get my sui wallet balance
my sui balance
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
Swaps SUI for USDC or vice versa.
Uses Navi SDK for swapping.
Examples:
swap 1 sui for usdc
convert 10 usdc to sui
Gets the current CBOE Volatility Index (VIX) index value.
Examples:
get current cboe vix
get vix
Check the source code of the tools.
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 |
pnpm install
cp packages/examples/.env.example packages/examples/.env
Then update the environment variables in the packages/examples/.env
file.
pnpm start:anthropic:simple:balance
# or
pnpm start || pnpm start:anthropic:streaming
# or
pnpm start:openai:streaming
# or
pnpm start:openai:generating
- 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
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.