Skip to main content
Vercel AI SDK provides a robust framework for building AI applications with tool calling capabilities. This guide demonstrates how to integrate C1 by Thesys with Vercel AI SDK to build Generative UI agents.
This guide assumes you have basic knowledge of Vercel AI SDK and React. You’ll also need a Thesys API key from the C1 Console.
Integrating Thesys C1 with useCompletion from Vercel AI SDK allows you to easily create Generative UI based capabilities for your agent. useCompletion enables the streaming of text completions from your AI provider, manages the input state, and updates the UI automatically as new messages are received.
1

Create a new Vercel project

2

Initiate the backend endpoint

app/api/completion/route.ts
3

Render the response

app/page.tsx
4

Run the app

View the code

Find more examples and complete code on our GitHub repository.