Vity Toolkit
TelegramTwitterGithubRequest new tool
  • Introduction
    • Vity Toolkit
    • ๐Ÿš€Quick Start - Langchain
    • ๐Ÿš€Quick Start - Vercel AI
  • Features
    • Apps and Actions
    • How can I use Action directly?
    • Agent Authentication
    • Extensions
  • Tools
    • Superteam Earn
    • Solana Wallet
    • Reddit
    • Gibwork
    • Twitter
  • EXAMPLES
    • AI Bounty Finder
Powered by GitBook
On this page
  1. Introduction

Quick Start - Vercel AI

Fetch top 5 bounties from superteam earn with the help of Vercel AI and Vity Toolkit in less than 15 lines

PreviousQuick Start - LangchainNextApps and Actions

Last updated 5 months ago

In this guide you'll learn how to implement and use Vity Toolkit with VercelAI in just a few lines of code. For the purpose of this example, we'll create an assistant that can fetch top 5 bounties from .

Fetch top 5 bounties from Superteam Earn

In this example, we will use Vercel AI to fetch top 5 bounties from Superteam Earn using Vity Toolkit.

1

Install the package.

npm install vity-toolkit ai @ai-sdk/openai
2

Initialize Vity Toolkit.

import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
import { App, VercelAIToolkit } from "vity-toolkit";

const toolKit = new VercelAIToolkit();
3

Get the required tools.

const tools = toolKit.getTools({ apps: [App.EARN] });
4

Define the Agent.

const { text } = await generateText({
    model: openai("gpt-4o"),
    tools,
    maxSteps: 5,
    prompt: "What is top 5 bounties in superteam earn?",
});
5

Execute the Agent.

console.log(text);

๐Ÿš€
Superteam Earn
vity-toolkit/code-samples/agent/vercel.ts at main ยท apneduniya/vity-toolkitGitHub
Full code
Logo