New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@aibind/tanstack-start

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aibind/tanstack-start

AI SDK bindings for TanStack Start — hooks with defaults, server handlers, and agents

Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
14
16.67%
Maintainers
1
Weekly downloads
 
Created
Source

@aibind/tanstack-start

AI SDK bindings for TanStack Start. React hooks, server handlers, and agents — all wired up with sensible defaults.

Install

npm install @aibind/tanstack-start ai react

Peer dependencies: react ^18 || ^19, ai ^6.0.

Quick Start

1. Add the API route handler

// src/routes/api/ai/$.ts
import { createStreamHandler } from "@aibind/tanstack-start/server";
import { anthropic } from "@ai-sdk/anthropic";

const handler = createStreamHandler({
  model: anthropic("claude-sonnet-4-20250514"),
});

export async function POST({ request }: { request: Request }) {
  return handler(request);
}

2. Stream in a component

import { useState } from "react";
import { useStream } from "@aibind/tanstack-start";

export default function Chat() {
  const [prompt, setPrompt] = useState("");
  const { text, loading, send } = useStream({
    system: "You are a helpful assistant.",
  });

  return (
    <form
      onSubmit={(e) => {
        e.preventDefault();
        send(prompt);
        setPrompt("");
      }}
    >
      <input value={prompt} onChange={(e) => setPrompt(e.target.value)} />
      <button disabled={loading}>Send</button>
      <p>{text}</p>
    </form>
  );
}

Entry Points

Import PathWhat You Get
@aibind/tanstack-startuseStream, useStructuredStream, defineModels
@aibind/tanstack-start/servercreateStreamHandler, ServerAgent
@aibind/tanstack-start/agentuseAgent
@aibind/tanstack-start/historyChatHistory, MessageTree
@aibind/tanstack-start/markdownStreamMarkdown
@aibind/tanstack-start/projectProject

Documentation

Full documentation, API reference, and guides: aibind.dev

License

MIT

Keywords

tanstack

FAQs

Package last updated on 06 Mar 2026

Related posts