Primitives
Fullstack building blocks for AI applications. Each primitive includes a UI component and an API route using the Vercel AI SDK. Easy to install with the shadcn registry.
Enter your OpenRouter API key to test the primitives. Using model: z-ai/glm-4.5-air:free
Optional: Enter your OpenRouter API key to test the primitives. If not provided, the server's default key will be used. Get your key at openrouter.ai/keys
Full chatbot
A complete chat application with streaming responses, tool calling, and error handling. Built with the Vercel AI SDK and OpenRouter.
+server.ts
routes/api/primitives/full-chat-app/+server.ts
Tool calling chatbot
A chatbot with tool execution capabilities. Demonstrates how to integrate AI function calling with timezone and date/time tools using the Vercel AI SDK and OpenRouter.
- what's the current date?
- what time is it in Tokyo?
- give me the current time in Europe/Paris
+server.ts
routes/api/primitives/tool-call/+server.ts
Looking for UI-only components?
Check out our Blocks collection for ready-to-use UI components without API integration.
View Blocks