StackOne tools integrate seamlessly with Vercel AI SDK to build AI applications using React, Next.js, and other frameworks.

Overview

  • Streaming responses with real-time tool execution
  • React hooks for building AI UIs
  • Multi-step tool calls with automatic handling
  • Framework compatibility with Next.js, React, Vue, and more
import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';
import { StackOneToolSet } from '@stackone/ai';

const toolset = new StackOneToolSet();
const tools = toolset.getStackOneTools('hris_get_*', accountId);
const aiSdkTools = tools.toAISDK();

const { text } = await generateText({
  model: openai('gpt-4o-mini'),
  tools: aiSdkTools,
  prompt: 'Get employee details for id: c28xIQaWQ6MzM5MzczMDA2NzMzMzkwNzIwNA',
  maxSteps: 3,
});

Complete Examples

GitHub Examples: For complete implementations including streaming responses, React components, and Next.js integration:→ View AI SDK Integration ExampleFor framework-specific patterns and UI components, see the Vercel AI SDK documentation.