
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@tanstack/ai-react-ui
Advanced tools
A powerful, type-safe AI SDK for building AI-powered applications.
Import only the functionality you need for smaller bundle sizes:
// Only chat functionality - no summarization code bundled
import { openaiText } from '@tanstack/ai-openai/adapters'
import { generate } from '@tanstack/ai'
const textAdapter = openaiText()
const result = generate({
adapter: textAdapter,
model: 'gpt-4o',
messages: [{ role: 'user', content: [{ type: 'text', content: 'Hello!' }] }],
})
for await (const chunk of result) {
console.log(chunk)
}
Available adapters: openaiText, openaiEmbed, openaiSummarize, anthropicText, geminiText, ollamaText, and more.
TanStack AI works with any framework (Next.js, Express, Remix, etc.).
With TanStack Start, you get a bonus: share implementations between AI tools and server functions with createServerFnTool:
import { createServerFnTool } from '@tanstack/ai-react'
// Define once, get AI tool AND server function (TanStack Start only)
const getProducts = createServerFnTool({
name: 'getProducts',
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => db.products.search(query),
})
// Use in AI chat
chat({ tools: [getProducts.server] })
// Call directly from components (no API endpoint needed!)
const products = await getProducts.serverFn({ query: 'laptop' })
No duplicate logic, full type safety, automatic validation. The serverFn feature requires TanStack Start. See docs for details.
|
|
|
We're looking for TanStack AI Partners to join our mission! Partner with us to push the boundaries of TanStack AI and build amazing things together.
LET'S CHAT… and more at TanStack.com »
FAQs
Headless React components for building AI chat interfaces
We found that @tanstack/ai-react-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.