Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

TanStack AI custom backends

Connects TanStack AI's useChat to your own backend with custom adapters, so chat streams work with any server.

Claude's review

7/10 Good worked adapter patterns and the mutually exclusive connect or subscribe trap for TanStack AI; very library and version specific.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe/send). Customize fetchServerSentEvents() and fetchHttpStream() with auth headers, custom URLs, and request options. Import from framework package, not @tanstack/ai-client.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: ai-core/custom-backend-integration
description: >
  Connect useChat to a non-TanStack-AI backend through custom connection
  adapters. ConnectConnectionAdapter (single async iterable) vs
  SubscribeConnectionAdapter (separate subscribe/send). Customize
  fetchServerSentEvents() and fetchHttpStream() with auth headers,
  custom URLs, and request options. Import from framework package,
  not @tanstack/ai-client.
type: composition
library: tanstack-ai
library_version: '0.42.0'
sources:
  - 'TanStack/ai:docs/transports/sse.md'
  - 'TanStack/ai:docs/transports/http-stream.md'
  - 'TanStack/ai:docs/transports/request-options.md'
  - 'TanStack/ai:docs/transports/custom.md'
---

# Custom Backend Integration

This skill builds on ai-core and ai-core/chat-experience. Read them first.

## Setup

Connect `useChat` to a custom SSE backend with auth headers:

```tsx
import { useChat, fetchServerSentEvents } from '@tanstack/ai-react'
import { token } from './auth'

function Chat() {
  const { messages, sendMessage, isLoading } = useChat({
    connection: fetchServerSentEvents('https://my-api.com/chat', {
      headers: {
        Authorization: `Bearer ${token}`,
      },
    }),
    threadId: 'support-42',
  })
...

From TanStack's repository, MIT licence.

Related skills

  • Checked

    Council of AI models

    Asks several AI models the same question separately, compares their answers and gives you the best one.

    by alfredfrancis 2.2k
    7/101 credit
  • Checked

    RAG evaluation

    Measures how well a RAG system retrieves and answers, with test questions, metrics and chunking advice.

    by ai-evals-course 1.9k
    8/101 credit
  • Checked

    AI automation planner

    Works out which manual work in your business to automate first, then designs the system, tools and safeguards.

    by cbrock84 2.6k
    7/101 credit
  • Checked

    LangGraph agent design

    Guides LangGraph builds through topology, checkpoint and human review choices so agents survive failures.

    by agentsope 513
    7/101 credit
  • Checked

    Agent system design

    Asks staged questions to design agent pipelines and sub agents, so you only add agents where they help.

    by ooiyeefei 505
    7/101 credit
  • Checked

    Subagent model routing

    Chooses the model, effort level and cascade for each subagent by cost per finished task, keeping loops safe.

    by oaustegard 421
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added