SDK·GitHub·Other

Vercel AI SDK — Prediction Market Tools

Vercel AI SDK tools with zod schemas

Install

npm i @spfunctions/vercel-ai-prediction-markets

Vercel AI SDK-native tools with zod schemas, ready to pass to generateObject, streamText, generateText, or a custom agent loop. Works across every provider the Vercel AI SDK supports (Anthropic, OpenAI, Google, Groq, xAI, ...).

Quickstart

import { makeTools } from '@spfunctions/vercel-ai-prediction-markets'
import { streamText } from 'ai'
import { anthropic } from '@ai-sdk/anthropic'

const tools = makeTools({ apiKey: process.env.SF_API_KEY })
const stream = streamText({
  model: anthropic('claude-opus-4'),
  prompt: 'What does the market think about oil prices this quarter?',
  tools,
})

Tags

vercel-aisdkagenttypescriptzod

Related