Superteam Earn
Guide to use superteam earn tool on your AI agent using Vity Toolkit
Quick Start
2
Initialize Vity Toolkit and Langchain.
import { ChatOpenAI } from "@langchain/openai";
import { App, LangchainToolkit } from "vity-toolkit";
import { createOpenAIFunctionsAgent, AgentExecutor } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
const llm = new ChatOpenAI({ model: "gpt-4o" });
const toolKit = new LangchainToolkit({
userPrivateKey: "<private_key>",
});4
Define the Agent.
const prompt = ChatPromptTemplate.fromMessages([
["system", "You are a helpful assistant"],
["placeholder", "{chat_history}"],
["human", "{input}"],
["placeholder", "{agent_scratchpad}"],
]);
const agent = await createOpenAIFunctionsAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({ agent, tools, verbose: true });
Supported Actions
Action
Description
Action.EARN_ACTIVITY_FEEDAction.EARN_FETCH_FEEDAction.EARN_FETCH_GRANT_DETAILSAction.EARN_FETCH_EXCLUSIVE_SPONSOR_GRANTSAction.EARN_FETCH_USER_POWSAction.EARN_BOUNTY_LISTINGSAction.EARN_GRANT_LISTINGSAction.EARN_SEARCH_USERSAction.EARN_SUBMISSION_DETAILSAction.EARN_TOTAL_USER_COUNTAction.EARN_FETCH_USER_PUBLIC_STATSLast updated