ai-core/custom-backend-integration SKILL.md skillA
ai-core/custom-backend-integration from tanstack/ai is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add tanstack/ai/ai-core/custom-backend-integration@git:20261022.f1b3f65Pins git:20261022.f1b3f65 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- tanstack/ai
- Path
packages/ai/skills/ai-core/custom-backend-integration/SKILL.md- Versions recorded
- 5
- Latest version
- git:20261022.f1b3f65, committed Oct 22, 2026
- First version recorded
- May 26, 2026
- Size
- 15,475 bytes
- Repository stars
- 3,337
- License
- MIT
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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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',
})
return (
<div>
{messages.map((msg) => (
<div key={msg.id}>
<strong>{msg.role}:</strong>
{msg.parts.map((part, i) => {
if (part.type === 'text') {
return <p key={i}>{part.content}</p>
}
return null
})}
</div>
))}
<button onClick={() => sendMessage('Hello')}>Send</button>
</div>
)
}
```
Both `fetchServerSentEvents` and `fetchHttpStream` accept a static URL string
or a function returning a string (evaluated per request), and a static options
object or a sync/async function returning options (also evaluated per request).
…Read the whole file at its exact version.
How to install
mdr add tanstack/ai/ai-core/custom-backend-integration@sha256:cdfd3e14fd02a206The line at the top of this page pins the label git:20261022.f1b3f65, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_cupcz2lvyvqiuus6)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between May 26, 2026 and Oct 22, 2026, about one every 37 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261022.f1b3f65 latest | 2026-10-22 | f1b3f65 | 15,475 B | A | view · diff |
| git:20261008.f687c54 | 2026-10-08 | f687c54 | 14,462 B | A | view · diff |
| git:20260909.53e2ec0 | 2026-09-09 | 53e2ec0 | 14,333 B | A | view · diff |
| git:20260804.d9d1e1f | 2026-08-04 | d9d1e1f | 13,189 B | A | view · diff |
| git:20260526.2c0ebb3 | 2026-05-26 | 2c0ebb3 | 13,189 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (15475 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
tanstack/ai · 3,337 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_cupcz2lvyvqiuus6 GET https://markdownregistry.com/api/v1/resolve?ref=tanstack/ai/ai-core/custom-backend-integration GET https://markdownregistry.com/api/v1/blob/cdfd3e14fd02a2062a0f066085b6cc12ae876b3dde1142f985c9f95120293766
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.