Skip to content

Suiware AI Tools is a Finalist of the Sui Agent Typhoon Hackaton

Published: at 01:00 AMSuggest Changes

My project has made it to the finals of the first Sui Agent Typhoon hackathon. Let me tell you what the project is about and how it can get you to the next level as a developer.

Motivation

While looking for ideas for the hackathon, I explored a few frameworks for building AI agents including ElizaOS, Coinbase AgentKit, and Inngest AgentKit.

Some of the frameworks were under super-active development, some were overloaded with features, some targeted to a specific blockchain, but one SDK caught my eye because it was easy to use and extendable. I’m talking about Vercel AI SDK (ai), which I decided to try out.

What are Vercel AI SDK Tools?

Vercel AI SDK (ai) has a concept of Tools (read plugins). The tools instruct your AI code to recognize specific commands in your prompts and perform certain actions.

Here is an example of such a tool which fetches current temperature in Sydney:

export const sydneyTemperatureTool = tool({
  description: 'Gets current temperature in Sydney',
  parameters: z.object({}),
  execute: async () => {
    const latitude = -33.8688 // Sydney's latitude
    const longitude = 151.2093 // Sydney's longitude
    const URL = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&current_weather=true`

    try {
      const response = await fetch(URL)
      if (!response.ok) {
        throw new Error(`API request failed with status: ${response.status}`)
      }

      const data = (await response.json()) as any
      const currentWeather = data.current_weather

      return {
        temperature: `${currentWeather.temperature}°C`,
      }
    } catch (error: any) {
      return { error: error.message }
    }
  },
})

Simple structure, isn’t it? Yet powerful once plugged in to an AI agent like so…

const { text } = await generateText({
  model: anthropic('claude-3-5-sonnet-latest'),
  prompt: 'I want to know the current temperature in Sydney',
  tools: {
    sydneyTemperature: sydneyTemperatureTool,
  },
  maxSteps: 5,
})

console.log(text)

The output of this code looks like this:

The current temperature in Sydney is 17.5°C.

I hope you get the idea. Now go and change your Linkedin title to “AI Solution Architect” and lesssgooo! But wait a minute, let me finish my post first ))

What is my hackathon project about?

For the Sui Agent Typhoon Hackathon, I’ve built a collection of pluggable tools for ai, which allow your AI assistants to interact with Sui Network (balance, transfer and swap) and also get some market data (VIX value). I called the project @suiware/ai-tools.

Project intro on Youtube

Basically with my tools plugged in, your AI assistant would be capable of processing the following prompt:

If my Sui balance is above 5 and VIX is below 20,
turn 1 sui into USDC and donate 0.1 SUI to @kkomelin ;)

Sounds cool? If you think so, play with the examples and share your feedback with me on X!

Next steps

There are a lot of opportunities to extend and improve the project, for example:

If you have your own ideas which you want to contribute to the project, ping me on Discord or create an issue on Github.

Let’s make @suiware/ai-tools the best AI toolkit for Sui!

Thank you

I want to shout out to all my buddies for their support and advice during development, and thank you for your interest in my stuff! I’ll keep building.


Next Post
Sui dApp Starter Updates, February 2025