[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-tanstack-ai-core":3,"mdc-e6q9zz-key":51,"related-repo-tanstack-ai-core":910,"related-org-tanstack-ai-core":1005},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":46,"sourceUrl":49,"mdContent":50},"ai-core","configure TanStack AI agent features","Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging, plus the skills shipped by companion packages (@tanstack\u002Fai-persistence, @tanstack\u002Fai-code-mode). Use chat() not streamText(), openaiText() not createOpenAI(), toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"tanstack","TanStack","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftanstack.png",[12,16,19],{"name":13,"slug":14,"type":15},"AI","ai","tag",{"name":17,"slug":18,"type":15},"Agents","agents",{"name":20,"slug":21,"type":15},"Middleware","middleware",2884,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Fai","2026-07-30T05:26:10.404565",null,269,[14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,8,42,43,44,45],"ai-agents","ai-sdk","anthropic","chatbot","function-calling","gemini","generative-ai","llm","multimodal","openai","react","solidjs","streaming","svelte","tool-calling","typescript","typescript-sdk","vue",{"repoUrl":23,"stars":22,"forks":26,"topics":47,"description":48},[14,28,29,30,31,32,33,34,35,36,37,38,39,40,41,8,42,43,44,45],"🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.","https:\u002F\u002Fgithub.com\u002FTanStack\u002Fai\u002Ftree\u002FHEAD\u002Fpackages\u002Fai\u002Fskills\u002Fai-core","---\nname: ai-core\ndescription: >\n  Entry point for TanStack AI skills. Routes to chat-experience, tool-calling,\n  media-generation, structured-outputs, adapter-configuration, ag-ui-protocol,\n  middleware, locks, custom-backend-integration, and debug-logging, plus the skills\n  shipped by companion packages (@tanstack\u002Fai-persistence, @tanstack\u002Fai-code-mode).\n  Use chat() not streamText(), openaiText() not createOpenAI(),\n  toServerSentEventsResponse() not manual SSE, middleware hooks not onEnd callbacks.\ntype: core\nlibrary: tanstack-ai\nlibrary_version: '0.10.0'\n---\n\n# TanStack AI — Core Concepts\n\nTanStack AI is a type-safe, provider-agnostic AI SDK. Server-side functions\nlive in `@tanstack\u002Fai` and provider adapter packages. Client-side hooks live\nin framework packages (`@tanstack\u002Fai-react`, `@tanstack\u002Fai-solid`, etc.).\nAlways import from the framework package on the client — never from\n`@tanstack\u002Fai-client` directly (unless vanilla JS).\n\n## Sub-Skills\n\n| Need to...                                        | Read                                          |\n| ------------------------------------------------- | --------------------------------------------- |\n| Build a chat UI with streaming                    | ai-core\u002Fchat-experience\u002FSKILL.md              |\n| Survive a browser reload (no extra package)       | ai-core\u002Fclient-persistence\u002FSKILL.md           |\n| Add tool calling (server, client, or both)        | ai-core\u002Ftool-calling\u002FSKILL.md                 |\n| Generate images, video, speech, or transcriptions | ai-core\u002Fmedia-generation\u002FSKILL.md             |\n| Get typed JSON responses from the LLM             | ai-core\u002Fstructured-outputs\u002FSKILL.md           |\n| Choose and configure a provider adapter           | ai-core\u002Fadapter-configuration\u002FSKILL.md        |\n| Implement AG-UI streaming protocol server-side    | ai-core\u002Fag-ui-protocol\u002FSKILL.md               |\n| Add analytics, logging, or lifecycle hooks        | ai-core\u002Fmiddleware\u002FSKILL.md                   |\n| Coordinate multi-instance work with locks         | ai-core\u002Flocks\u002FSKILL.md                        |\n| Connect to a non-TanStack-AI backend              | ai-core\u002Fcustom-backend-integration\u002FSKILL.md   |\n| Turn on\u002Foff debug logging, pipe into pino\u002Fwinston | ai-core\u002Fdebug-logging\u002FSKILL.md                |\n| Persist chats server-side (history, runs)         | See `@tanstack\u002Fai-persistence` package skills |\n| Set up Code Mode (LLM code execution)             | See `@tanstack\u002Fai-code-mode` package skills   |\n\n## Companion packages\n\nSome capabilities live in their own package and ship their own skills. Install\nthe package, then read its skills — do not guess the API from this file.\n\n### `@tanstack\u002Fai-persistence` — durable chat state\n\nMakes a conversation survive a reload, a server restart, a second device, or a\npaused tool approval. It ships the **store contracts** (`MessageStore`,\n`RunStore`, `InterruptStore`, `MetadataStore`), the `withPersistence` \u002F\n`withGenerationPersistence` middleware, `reconstructChat` for server-side\nhydrate, an in-memory reference backend, and a conformance testkit. Multi-instance\nlocks are **not** in this package — `LockStore` \u002F `withLocks` ship in\n`@tanstack\u002Fai\u002Flocks`; see ai-core\u002Flocks.\n\nIt does **not** ship a backend for your database — you implement the stores\nagainst Postgres, SQLite, D1, Mongo, or whatever you run, and the package's\nskills walk you through it (including Drizzle, Prisma, and Cloudflare recipes).\n\n```bash\npnpm add @tanstack\u002Fai-persistence\nnpx @tanstack\u002Fintent@latest install\n```\n\nThe skills ship **inside** the package, so they only exist on disk once it is\ninstalled — the second command re-scans `node_modules` and wires them into the\nagent config. Until then the paths below resolve to nothing.\n\nEntry point: `node_modules\u002F@tanstack\u002Fai-persistence\u002Fskills\u002Fai-persistence\u002FSKILL.md`\n\n| Need to...                                      | Read                                    |\n| ----------------------------------------------- | --------------------------------------- |\n| Wire server-side chat history, runs, interrupts | ai-persistence\u002Fserver\u002FSKILL.md          |\n| Implement the store interfaces for your DB      | ai-persistence\u002Fstores\u002FSKILL.md          |\n| Write the adapter for the DB your app runs      | ai-persistence\u002Fbuild-*-adapter\u002FSKILL.md |\n\nBrowser-side persistence is **not** in this package — it ships with the\nframework packages, so read **ai-core\u002Fclient-persistence** instead.\n\n### `@tanstack\u002Fai-code-mode` — LLM code execution\n\nSee the `ai-code-mode` skill in that package.\n\n## Quick Decision Tree\n\n- Setting up a chatbot? → ai-core\u002Fchat-experience\n- Adding function calling? → ai-core\u002Ftool-calling\n- Generating media (images, audio, video)? → ai-core\u002Fmedia-generation\n- Need structured JSON output? → ai-core\u002Fstructured-outputs\n- Choosing\u002Fconfiguring a provider? → ai-core\u002Fadapter-configuration\n- Building a server-only AG-UI backend? → ai-core\u002Fag-ui-protocol\n- Adding analytics or post-stream events? → ai-core\u002Fmiddleware\n- Surviving reloads \u002F multi-device \u002F durable approvals? → `@tanstack\u002Fai-persistence` skills\n- Connecting to a custom backend? → ai-core\u002Fcustom-backend-integration\n- Turning on debug logging to trace chunks\u002Ftools\u002Fmiddleware? → ai-core\u002Fdebug-logging\n- Debugging mistakes? → Check Common Mistakes in the relevant sub-skill\n\n## Critical Rules\n\n1. **This is NOT the Vercel AI SDK.** Use `chat()` not `streamText()`. Use `openaiText()` not `createOpenAI()`. Import from `@tanstack\u002Fai`, not `ai`.\n2. **Import from framework package on client.** Use `@tanstack\u002Fai-react` (or solid\u002Fvue\u002Fsvelte\u002Fpreact), not `@tanstack\u002Fai-client`.\n3. **Use `toServerSentEventsResponse()`** to convert streams to HTTP responses. Never implement SSE manually.\n4. **Use middleware for lifecycle events.** No `onEnd`\u002F`onFinish` callbacks on `chat()` — use `middleware: [{ onFinish: ... }]`.\n5. **Ask the user which adapter and model** they want. Suggest the latest model. Also ask if they want Code Mode.\n6. **Tools must be passed to both server and client.** Server gets the tool in `chat({ tools })`, client gets the definition in `useChat({ clientTools })`.\n\n## Version\n\nTargets TanStack AI v0.10.0.\n",{"data":52,"body":56},{"name":4,"description":6,"type":53,"library":54,"library_version":55},"core","tanstack-ai","0.10.0",{"type":57,"children":58},"root",[59,68,107,114,325,331,336,348,446,457,510,530,541,600,618,629,642,648,715,721,893,899,904],{"type":60,"tag":61,"props":62,"children":64},"element","h1",{"id":63},"tanstack-ai-core-concepts",[65],{"type":66,"value":67},"text","TanStack AI — Core Concepts",{"type":60,"tag":69,"props":70,"children":71},"p",{},[72,74,81,83,89,91,97,99,105],{"type":66,"value":73},"TanStack AI is a type-safe, provider-agnostic AI SDK. Server-side functions\nlive in ",{"type":60,"tag":75,"props":76,"children":78},"code",{"className":77},[],[79],{"type":66,"value":80},"@tanstack\u002Fai",{"type":66,"value":82}," and provider adapter packages. Client-side hooks live\nin framework packages (",{"type":60,"tag":75,"props":84,"children":86},{"className":85},[],[87],{"type":66,"value":88},"@tanstack\u002Fai-react",{"type":66,"value":90},", ",{"type":60,"tag":75,"props":92,"children":94},{"className":93},[],[95],{"type":66,"value":96},"@tanstack\u002Fai-solid",{"type":66,"value":98},", etc.).\nAlways import from the framework package on the client — never from\n",{"type":60,"tag":75,"props":100,"children":102},{"className":101},[],[103],{"type":66,"value":104},"@tanstack\u002Fai-client",{"type":66,"value":106}," directly (unless vanilla JS).",{"type":60,"tag":108,"props":109,"children":111},"h2",{"id":110},"sub-skills",[112],{"type":66,"value":113},"Sub-Skills",{"type":60,"tag":115,"props":116,"children":117},"table",{},[118,137],{"type":60,"tag":119,"props":120,"children":121},"thead",{},[122],{"type":60,"tag":123,"props":124,"children":125},"tr",{},[126,132],{"type":60,"tag":127,"props":128,"children":129},"th",{},[130],{"type":66,"value":131},"Need to...",{"type":60,"tag":127,"props":133,"children":134},{},[135],{"type":66,"value":136},"Read",{"type":60,"tag":138,"props":139,"children":140},"tbody",{},[141,155,168,181,194,207,220,233,246,259,272,285,306],{"type":60,"tag":123,"props":142,"children":143},{},[144,150],{"type":60,"tag":145,"props":146,"children":147},"td",{},[148],{"type":66,"value":149},"Build a chat UI with streaming",{"type":60,"tag":145,"props":151,"children":152},{},[153],{"type":66,"value":154},"ai-core\u002Fchat-experience\u002FSKILL.md",{"type":60,"tag":123,"props":156,"children":157},{},[158,163],{"type":60,"tag":145,"props":159,"children":160},{},[161],{"type":66,"value":162},"Survive a browser reload (no extra package)",{"type":60,"tag":145,"props":164,"children":165},{},[166],{"type":66,"value":167},"ai-core\u002Fclient-persistence\u002FSKILL.md",{"type":60,"tag":123,"props":169,"children":170},{},[171,176],{"type":60,"tag":145,"props":172,"children":173},{},[174],{"type":66,"value":175},"Add tool calling (server, client, or both)",{"type":60,"tag":145,"props":177,"children":178},{},[179],{"type":66,"value":180},"ai-core\u002Ftool-calling\u002FSKILL.md",{"type":60,"tag":123,"props":182,"children":183},{},[184,189],{"type":60,"tag":145,"props":185,"children":186},{},[187],{"type":66,"value":188},"Generate images, video, speech, or transcriptions",{"type":60,"tag":145,"props":190,"children":191},{},[192],{"type":66,"value":193},"ai-core\u002Fmedia-generation\u002FSKILL.md",{"type":60,"tag":123,"props":195,"children":196},{},[197,202],{"type":60,"tag":145,"props":198,"children":199},{},[200],{"type":66,"value":201},"Get typed JSON responses from the LLM",{"type":60,"tag":145,"props":203,"children":204},{},[205],{"type":66,"value":206},"ai-core\u002Fstructured-outputs\u002FSKILL.md",{"type":60,"tag":123,"props":208,"children":209},{},[210,215],{"type":60,"tag":145,"props":211,"children":212},{},[213],{"type":66,"value":214},"Choose and configure a provider adapter",{"type":60,"tag":145,"props":216,"children":217},{},[218],{"type":66,"value":219},"ai-core\u002Fadapter-configuration\u002FSKILL.md",{"type":60,"tag":123,"props":221,"children":222},{},[223,228],{"type":60,"tag":145,"props":224,"children":225},{},[226],{"type":66,"value":227},"Implement AG-UI streaming protocol server-side",{"type":60,"tag":145,"props":229,"children":230},{},[231],{"type":66,"value":232},"ai-core\u002Fag-ui-protocol\u002FSKILL.md",{"type":60,"tag":123,"props":234,"children":235},{},[236,241],{"type":60,"tag":145,"props":237,"children":238},{},[239],{"type":66,"value":240},"Add analytics, logging, or lifecycle hooks",{"type":60,"tag":145,"props":242,"children":243},{},[244],{"type":66,"value":245},"ai-core\u002Fmiddleware\u002FSKILL.md",{"type":60,"tag":123,"props":247,"children":248},{},[249,254],{"type":60,"tag":145,"props":250,"children":251},{},[252],{"type":66,"value":253},"Coordinate multi-instance work with locks",{"type":60,"tag":145,"props":255,"children":256},{},[257],{"type":66,"value":258},"ai-core\u002Flocks\u002FSKILL.md",{"type":60,"tag":123,"props":260,"children":261},{},[262,267],{"type":60,"tag":145,"props":263,"children":264},{},[265],{"type":66,"value":266},"Connect to a non-TanStack-AI backend",{"type":60,"tag":145,"props":268,"children":269},{},[270],{"type":66,"value":271},"ai-core\u002Fcustom-backend-integration\u002FSKILL.md",{"type":60,"tag":123,"props":273,"children":274},{},[275,280],{"type":60,"tag":145,"props":276,"children":277},{},[278],{"type":66,"value":279},"Turn on\u002Foff debug logging, pipe into pino\u002Fwinston",{"type":60,"tag":145,"props":281,"children":282},{},[283],{"type":66,"value":284},"ai-core\u002Fdebug-logging\u002FSKILL.md",{"type":60,"tag":123,"props":286,"children":287},{},[288,293],{"type":60,"tag":145,"props":289,"children":290},{},[291],{"type":66,"value":292},"Persist chats server-side (history, runs)",{"type":60,"tag":145,"props":294,"children":295},{},[296,298,304],{"type":66,"value":297},"See ",{"type":60,"tag":75,"props":299,"children":301},{"className":300},[],[302],{"type":66,"value":303},"@tanstack\u002Fai-persistence",{"type":66,"value":305}," package skills",{"type":60,"tag":123,"props":307,"children":308},{},[309,314],{"type":60,"tag":145,"props":310,"children":311},{},[312],{"type":66,"value":313},"Set up Code Mode (LLM code execution)",{"type":60,"tag":145,"props":315,"children":316},{},[317,318,324],{"type":66,"value":297},{"type":60,"tag":75,"props":319,"children":321},{"className":320},[],[322],{"type":66,"value":323},"@tanstack\u002Fai-code-mode",{"type":66,"value":305},{"type":60,"tag":108,"props":326,"children":328},{"id":327},"companion-packages",[329],{"type":66,"value":330},"Companion packages",{"type":60,"tag":69,"props":332,"children":333},{},[334],{"type":66,"value":335},"Some capabilities live in their own package and ship their own skills. Install\nthe package, then read its skills — do not guess the API from this file.",{"type":60,"tag":337,"props":338,"children":340},"h3",{"id":339},"tanstackai-persistence-durable-chat-state",[341,346],{"type":60,"tag":75,"props":342,"children":344},{"className":343},[],[345],{"type":66,"value":303},{"type":66,"value":347}," — durable chat state",{"type":60,"tag":69,"props":349,"children":350},{},[351,353,359,361,367,369,375,376,382,383,389,391,397,399,405,407,413,415,420,422,428,430,436,438,444],{"type":66,"value":352},"Makes a conversation survive a reload, a server restart, a second device, or a\npaused tool approval. It ships the ",{"type":60,"tag":354,"props":355,"children":356},"strong",{},[357],{"type":66,"value":358},"store contracts",{"type":66,"value":360}," (",{"type":60,"tag":75,"props":362,"children":364},{"className":363},[],[365],{"type":66,"value":366},"MessageStore",{"type":66,"value":368},",\n",{"type":60,"tag":75,"props":370,"children":372},{"className":371},[],[373],{"type":66,"value":374},"RunStore",{"type":66,"value":90},{"type":60,"tag":75,"props":377,"children":379},{"className":378},[],[380],{"type":66,"value":381},"InterruptStore",{"type":66,"value":90},{"type":60,"tag":75,"props":384,"children":386},{"className":385},[],[387],{"type":66,"value":388},"MetadataStore",{"type":66,"value":390},"), the ",{"type":60,"tag":75,"props":392,"children":394},{"className":393},[],[395],{"type":66,"value":396},"withPersistence",{"type":66,"value":398}," \u002F\n",{"type":60,"tag":75,"props":400,"children":402},{"className":401},[],[403],{"type":66,"value":404},"withGenerationPersistence",{"type":66,"value":406}," middleware, ",{"type":60,"tag":75,"props":408,"children":410},{"className":409},[],[411],{"type":66,"value":412},"reconstructChat",{"type":66,"value":414}," for server-side\nhydrate, an in-memory reference backend, and a conformance testkit. Multi-instance\nlocks are ",{"type":60,"tag":354,"props":416,"children":417},{},[418],{"type":66,"value":419},"not",{"type":66,"value":421}," in this package — ",{"type":60,"tag":75,"props":423,"children":425},{"className":424},[],[426],{"type":66,"value":427},"LockStore",{"type":66,"value":429}," \u002F ",{"type":60,"tag":75,"props":431,"children":433},{"className":432},[],[434],{"type":66,"value":435},"withLocks",{"type":66,"value":437}," ship in\n",{"type":60,"tag":75,"props":439,"children":441},{"className":440},[],[442],{"type":66,"value":443},"@tanstack\u002Fai\u002Flocks",{"type":66,"value":445},"; see ai-core\u002Flocks.",{"type":60,"tag":69,"props":447,"children":448},{},[449,451,455],{"type":66,"value":450},"It does ",{"type":60,"tag":354,"props":452,"children":453},{},[454],{"type":66,"value":419},{"type":66,"value":456}," ship a backend for your database — you implement the stores\nagainst Postgres, SQLite, D1, Mongo, or whatever you run, and the package's\nskills walk you through it (including Drizzle, Prisma, and Cloudflare recipes).",{"type":60,"tag":458,"props":459,"children":464},"pre",{"className":460,"code":461,"language":462,"meta":463,"style":463},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add @tanstack\u002Fai-persistence\nnpx @tanstack\u002Fintent@latest install\n","bash","",[465],{"type":60,"tag":75,"props":466,"children":467},{"__ignoreMap":463},[468,491],{"type":60,"tag":469,"props":470,"children":473},"span",{"class":471,"line":472},"line",1,[474,480,486],{"type":60,"tag":469,"props":475,"children":477},{"style":476},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[478],{"type":66,"value":479},"pnpm",{"type":60,"tag":469,"props":481,"children":483},{"style":482},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[484],{"type":66,"value":485}," add",{"type":60,"tag":469,"props":487,"children":488},{"style":482},[489],{"type":66,"value":490}," @tanstack\u002Fai-persistence\n",{"type":60,"tag":469,"props":492,"children":494},{"class":471,"line":493},2,[495,500,505],{"type":60,"tag":469,"props":496,"children":497},{"style":476},[498],{"type":66,"value":499},"npx",{"type":60,"tag":469,"props":501,"children":502},{"style":482},[503],{"type":66,"value":504}," @tanstack\u002Fintent@latest",{"type":60,"tag":469,"props":506,"children":507},{"style":482},[508],{"type":66,"value":509}," install\n",{"type":60,"tag":69,"props":511,"children":512},{},[513,515,520,522,528],{"type":66,"value":514},"The skills ship ",{"type":60,"tag":354,"props":516,"children":517},{},[518],{"type":66,"value":519},"inside",{"type":66,"value":521}," the package, so they only exist on disk once it is\ninstalled — the second command re-scans ",{"type":60,"tag":75,"props":523,"children":525},{"className":524},[],[526],{"type":66,"value":527},"node_modules",{"type":66,"value":529}," and wires them into the\nagent config. Until then the paths below resolve to nothing.",{"type":60,"tag":69,"props":531,"children":532},{},[533,535],{"type":66,"value":534},"Entry point: ",{"type":60,"tag":75,"props":536,"children":538},{"className":537},[],[539],{"type":66,"value":540},"node_modules\u002F@tanstack\u002Fai-persistence\u002Fskills\u002Fai-persistence\u002FSKILL.md",{"type":60,"tag":115,"props":542,"children":543},{},[544,558],{"type":60,"tag":119,"props":545,"children":546},{},[547],{"type":60,"tag":123,"props":548,"children":549},{},[550,554],{"type":60,"tag":127,"props":551,"children":552},{},[553],{"type":66,"value":131},{"type":60,"tag":127,"props":555,"children":556},{},[557],{"type":66,"value":136},{"type":60,"tag":138,"props":559,"children":560},{},[561,574,587],{"type":60,"tag":123,"props":562,"children":563},{},[564,569],{"type":60,"tag":145,"props":565,"children":566},{},[567],{"type":66,"value":568},"Wire server-side chat history, runs, interrupts",{"type":60,"tag":145,"props":570,"children":571},{},[572],{"type":66,"value":573},"ai-persistence\u002Fserver\u002FSKILL.md",{"type":60,"tag":123,"props":575,"children":576},{},[577,582],{"type":60,"tag":145,"props":578,"children":579},{},[580],{"type":66,"value":581},"Implement the store interfaces for your DB",{"type":60,"tag":145,"props":583,"children":584},{},[585],{"type":66,"value":586},"ai-persistence\u002Fstores\u002FSKILL.md",{"type":60,"tag":123,"props":588,"children":589},{},[590,595],{"type":60,"tag":145,"props":591,"children":592},{},[593],{"type":66,"value":594},"Write the adapter for the DB your app runs",{"type":60,"tag":145,"props":596,"children":597},{},[598],{"type":66,"value":599},"ai-persistence\u002Fbuild-*-adapter\u002FSKILL.md",{"type":60,"tag":69,"props":601,"children":602},{},[603,605,609,611,616],{"type":66,"value":604},"Browser-side persistence is ",{"type":60,"tag":354,"props":606,"children":607},{},[608],{"type":66,"value":419},{"type":66,"value":610}," in this package — it ships with the\nframework packages, so read ",{"type":60,"tag":354,"props":612,"children":613},{},[614],{"type":66,"value":615},"ai-core\u002Fclient-persistence",{"type":66,"value":617}," instead.",{"type":60,"tag":337,"props":619,"children":621},{"id":620},"tanstackai-code-mode-llm-code-execution",[622,627],{"type":60,"tag":75,"props":623,"children":625},{"className":624},[],[626],{"type":66,"value":323},{"type":66,"value":628}," — LLM code execution",{"type":60,"tag":69,"props":630,"children":631},{},[632,634,640],{"type":66,"value":633},"See the ",{"type":60,"tag":75,"props":635,"children":637},{"className":636},[],[638],{"type":66,"value":639},"ai-code-mode",{"type":66,"value":641}," skill in that package.",{"type":60,"tag":108,"props":643,"children":645},{"id":644},"quick-decision-tree",[646],{"type":66,"value":647},"Quick Decision Tree",{"type":60,"tag":649,"props":650,"children":651},"ul",{},[652,658,663,668,673,678,683,688,700,705,710],{"type":60,"tag":653,"props":654,"children":655},"li",{},[656],{"type":66,"value":657},"Setting up a chatbot? → ai-core\u002Fchat-experience",{"type":60,"tag":653,"props":659,"children":660},{},[661],{"type":66,"value":662},"Adding function calling? → ai-core\u002Ftool-calling",{"type":60,"tag":653,"props":664,"children":665},{},[666],{"type":66,"value":667},"Generating media (images, audio, video)? → ai-core\u002Fmedia-generation",{"type":60,"tag":653,"props":669,"children":670},{},[671],{"type":66,"value":672},"Need structured JSON output? → ai-core\u002Fstructured-outputs",{"type":60,"tag":653,"props":674,"children":675},{},[676],{"type":66,"value":677},"Choosing\u002Fconfiguring a provider? → ai-core\u002Fadapter-configuration",{"type":60,"tag":653,"props":679,"children":680},{},[681],{"type":66,"value":682},"Building a server-only AG-UI backend? → ai-core\u002Fag-ui-protocol",{"type":60,"tag":653,"props":684,"children":685},{},[686],{"type":66,"value":687},"Adding analytics or post-stream events? → ai-core\u002Fmiddleware",{"type":60,"tag":653,"props":689,"children":690},{},[691,693,698],{"type":66,"value":692},"Surviving reloads \u002F multi-device \u002F durable approvals? → ",{"type":60,"tag":75,"props":694,"children":696},{"className":695},[],[697],{"type":66,"value":303},{"type":66,"value":699}," skills",{"type":60,"tag":653,"props":701,"children":702},{},[703],{"type":66,"value":704},"Connecting to a custom backend? → ai-core\u002Fcustom-backend-integration",{"type":60,"tag":653,"props":706,"children":707},{},[708],{"type":66,"value":709},"Turning on debug logging to trace chunks\u002Ftools\u002Fmiddleware? → ai-core\u002Fdebug-logging",{"type":60,"tag":653,"props":711,"children":712},{},[713],{"type":66,"value":714},"Debugging mistakes? → Check Common Mistakes in the relevant sub-skill",{"type":60,"tag":108,"props":716,"children":718},{"id":717},"critical-rules",[719],{"type":66,"value":720},"Critical Rules",{"type":60,"tag":722,"props":723,"children":724},"ol",{},[725,780,802,818,858,868],{"type":60,"tag":653,"props":726,"children":727},{},[728,733,735,741,743,749,751,757,758,764,766,771,773,778],{"type":60,"tag":354,"props":729,"children":730},{},[731],{"type":66,"value":732},"This is NOT the Vercel AI SDK.",{"type":66,"value":734}," Use ",{"type":60,"tag":75,"props":736,"children":738},{"className":737},[],[739],{"type":66,"value":740},"chat()",{"type":66,"value":742}," not ",{"type":60,"tag":75,"props":744,"children":746},{"className":745},[],[747],{"type":66,"value":748},"streamText()",{"type":66,"value":750},". Use ",{"type":60,"tag":75,"props":752,"children":754},{"className":753},[],[755],{"type":66,"value":756},"openaiText()",{"type":66,"value":742},{"type":60,"tag":75,"props":759,"children":761},{"className":760},[],[762],{"type":66,"value":763},"createOpenAI()",{"type":66,"value":765},". Import from ",{"type":60,"tag":75,"props":767,"children":769},{"className":768},[],[770],{"type":66,"value":80},{"type":66,"value":772},", not ",{"type":60,"tag":75,"props":774,"children":776},{"className":775},[],[777],{"type":66,"value":14},{"type":66,"value":779},".",{"type":60,"tag":653,"props":781,"children":782},{},[783,788,789,794,796,801],{"type":60,"tag":354,"props":784,"children":785},{},[786],{"type":66,"value":787},"Import from framework package on client.",{"type":66,"value":734},{"type":60,"tag":75,"props":790,"children":792},{"className":791},[],[793],{"type":66,"value":88},{"type":66,"value":795}," (or solid\u002Fvue\u002Fsvelte\u002Fpreact), not ",{"type":60,"tag":75,"props":797,"children":799},{"className":798},[],[800],{"type":66,"value":104},{"type":66,"value":779},{"type":60,"tag":653,"props":803,"children":804},{},[805,816],{"type":60,"tag":354,"props":806,"children":807},{},[808,810],{"type":66,"value":809},"Use ",{"type":60,"tag":75,"props":811,"children":813},{"className":812},[],[814],{"type":66,"value":815},"toServerSentEventsResponse()",{"type":66,"value":817}," to convert streams to HTTP responses. Never implement SSE manually.",{"type":60,"tag":653,"props":819,"children":820},{},[821,826,828,834,836,842,844,849,851,857],{"type":60,"tag":354,"props":822,"children":823},{},[824],{"type":66,"value":825},"Use middleware for lifecycle events.",{"type":66,"value":827}," No ",{"type":60,"tag":75,"props":829,"children":831},{"className":830},[],[832],{"type":66,"value":833},"onEnd",{"type":66,"value":835},"\u002F",{"type":60,"tag":75,"props":837,"children":839},{"className":838},[],[840],{"type":66,"value":841},"onFinish",{"type":66,"value":843}," callbacks on ",{"type":60,"tag":75,"props":845,"children":847},{"className":846},[],[848],{"type":66,"value":740},{"type":66,"value":850}," — use ",{"type":60,"tag":75,"props":852,"children":854},{"className":853},[],[855],{"type":66,"value":856},"middleware: [{ onFinish: ... }]",{"type":66,"value":779},{"type":60,"tag":653,"props":859,"children":860},{},[861,866],{"type":60,"tag":354,"props":862,"children":863},{},[864],{"type":66,"value":865},"Ask the user which adapter and model",{"type":66,"value":867}," they want. Suggest the latest model. Also ask if they want Code Mode.",{"type":60,"tag":653,"props":869,"children":870},{},[871,876,878,884,886,892],{"type":60,"tag":354,"props":872,"children":873},{},[874],{"type":66,"value":875},"Tools must be passed to both server and client.",{"type":66,"value":877}," Server gets the tool in ",{"type":60,"tag":75,"props":879,"children":881},{"className":880},[],[882],{"type":66,"value":883},"chat({ tools })",{"type":66,"value":885},", client gets the definition in ",{"type":60,"tag":75,"props":887,"children":889},{"className":888},[],[890],{"type":66,"value":891},"useChat({ clientTools })",{"type":66,"value":779},{"type":60,"tag":108,"props":894,"children":896},{"id":895},"version",[897],{"type":66,"value":898},"Version",{"type":60,"tag":69,"props":900,"children":901},{},[902],{"type":66,"value":903},"Targets TanStack AI v0.10.0.",{"type":60,"tag":905,"props":906,"children":907},"style",{},[908],{"type":66,"value":909},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":911,"total":1004},[912,929,935,950,963,977,990],{"slug":639,"name":639,"fn":913,"description":914,"org":915,"tags":916,"stars":22,"repoUrl":23,"updatedAt":928},"execute sandboxed TypeScript code with LLMs","LLM-generated TypeScript execution in sandboxed environments: createCodeModeTool() with isolate drivers (createNodeIsolateDriver, createQuickJSIsolateDriver, createCloudflareIsolateDriver), codeModeWithSkills() for persistent skill libraries, trust strategies, skill storage (FileSystem, LocalStorage, InMemory, Mongo), client-side execution progress via code_mode:* custom events in useChat.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[917,919,922,925,926],{"name":918,"slug":29,"type":15},"AI SDK",{"name":920,"slug":921,"type":15},"Code Execution","code-execution",{"name":923,"slug":924,"type":15},"Sandboxing","sandboxing",{"name":9,"slug":8,"type":15},{"name":927,"slug":43,"type":15},"TypeScript","2026-07-16T06:04:13.597905",{"slug":4,"name":4,"fn":5,"description":6,"org":930,"tags":931,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[932,933,934],{"name":17,"slug":18,"type":15},{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"slug":936,"name":937,"fn":938,"description":939,"org":940,"tags":941,"stars":22,"repoUrl":23,"updatedAt":949},"ai-coreadapter-configuration","ai-core\u002Fadapter-configuration","configure AI provider adapters","Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, openaiCompatible. Per-model type safety with modelOptions, reasoning\u002Fthinking configuration, runtime adapter switching, extendAdapter() for custom models, createModel(). Generic OpenAI-compatible providers (DeepSeek, Together, Fireworks, etc.) via openaiCompatible({ baseURL, apiKey, models }) from @tanstack\u002Fai-openai\u002Fcompatible. API key env vars: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY\u002FGEMINI_API_KEY, XAI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, OLLAMA_HOST, BEDROCK_API_KEY (or AWS_BEARER_TOKEN_BEDROCK).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[942,943,946,948],{"name":918,"slug":29,"type":15},{"name":944,"slug":945,"type":15},"Configuration","configuration",{"name":947,"slug":35,"type":15},"LLM",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:17.82075",{"slug":951,"name":952,"fn":953,"description":954,"org":955,"tags":956,"stars":22,"repoUrl":23,"updatedAt":962},"ai-coreag-ui-protocol","ai-core\u002Fag-ui-protocol","implement TanStack AI streaming protocol","Server-side AG-UI streaming protocol implementation: StreamChunk event types (RUN_STARTED, TEXT_MESSAGE_START\u002FCONTENT\u002FEND, TOOL_CALL_START\u002FARGS\u002FEND, RUN_FINISHED, RUN_ERROR, STEP_STARTED\u002FSTEP_FINISHED, STATE_SNAPSHOT\u002FDELTA, CUSTOM), toServerSentEventsStream() for SSE format, toHttpStream() for NDJSON format. For backends serving AG-UI events without client packages.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[957,960,961],{"name":958,"slug":959,"type":15},"API Development","api-development",{"name":947,"slug":35,"type":15},{"name":9,"slug":8,"type":15},"2026-07-16T06:04:10.093367",{"slug":964,"name":965,"fn":966,"description":967,"org":968,"tags":969,"stars":22,"repoUrl":23,"updatedAt":976},"ai-corechat-experience","ai-core\u002Fchat-experience","implement chat experiences with TanStack AI","End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content, thinking\u002Freasoning display. Covers streaming states, connection adapters, and message format conversions. NOT Vercel AI SDK — uses chat() not streamText().\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[970,971,974,975],{"name":958,"slug":959,"type":15},{"name":972,"slug":973,"type":15},"Frontend","frontend",{"name":947,"slug":35,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:11.505241",{"slug":978,"name":615,"fn":979,"description":980,"org":981,"tags":982,"stars":22,"repoUrl":23,"updatedAt":989},"ai-coreclient-persistence","implement browser chat persistence for TanStack AI","Browser chat persistence on useChat \u002F ChatClient: localStoragePersistence, sessionStoragePersistence, indexedDBPersistence. Client-authoritative (adapter, full transcript) vs server-authoritative (persistence: true, no client cache). Reload restore, pending interrupts, mid-stream rejoin with delivery durability. Use for SPA reload durability — NOT server history alone. No extra package: the adapters ship in the framework packages.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[983,984,985,988],{"name":13,"slug":14,"type":15},{"name":972,"slug":973,"type":15},{"name":986,"slug":987,"type":15},"Persistence","persistence",{"name":9,"slug":8,"type":15},"2026-07-30T05:53:35.503176",{"slug":991,"name":992,"fn":993,"description":994,"org":995,"tags":996,"stars":22,"repoUrl":23,"updatedAt":1003},"ai-corecustom-backend-integration","ai-core\u002Fcustom-backend-integration","integrate custom backends with TanStack AI","Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe\u002Fsend). Customize fetchServerSentEvents() and fetchHttpStream() with auth headers, custom URLs, and request options. Import from framework package, not @tanstack\u002Fai-client.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[997,998,999,1002],{"name":13,"slug":14,"type":15},{"name":958,"slug":959,"type":15},{"name":1000,"slug":1001,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},"2026-07-17T06:06:39.855351",27,{"items":1006,"total":1145},[1007,1021,1033,1045,1060,1072,1082,1092,1105,1115,1126,1136],{"slug":1008,"name":1008,"fn":1009,"description":1010,"org":1011,"tags":1012,"stars":1018,"repoUrl":1019,"updatedAt":1020},"aggregation","perform data aggregation in TanStack Table","Aggregate TanStack Table columns independently of grouping, including grand totals, caller-selected row totals, multiple keyed aggregations, custom context-based definitions, grouped merges, manual values, and worker constraints.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1013,1016,1017],{"name":1014,"slug":1015,"type":15},"Data Analysis","data-analysis",{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},28175,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Ftable","2026-07-30T05:25:59.429787",{"slug":1022,"name":1022,"fn":1023,"description":1024,"org":1025,"tags":1026,"stars":1018,"repoUrl":1019,"updatedAt":1032},"api-not-found","diagnose TanStack Table API errors","Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1027,1030,1031],{"name":1028,"slug":1029,"type":15},"Debugging","debugging",{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:05.418735",{"slug":1034,"name":1034,"fn":1035,"description":1036,"org":1037,"tags":1038,"stars":1018,"repoUrl":1019,"updatedAt":1044},"cell-selection","select rectangular cell ranges in tables","Select rectangular cell ranges with cellSelectionFeature: two-corner range state keyed by row and column id, mousedown\u002Fmouseenter handlers, selection edges, render-order resolution under pinning, and autoResetCellSelection. Load when ranges widen unexpectedly after sorting or column reordering, when a drag re-renders the whole table, or when building copy-to-clipboard from a selection.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1039,1040,1041],{"name":1014,"slug":1015,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"UI Components","ui-components","2026-07-30T05:25:38.403427",{"slug":1046,"name":1046,"fn":1047,"description":1048,"org":1049,"tags":1050,"stars":1018,"repoUrl":1019,"updatedAt":1059},"client-vs-server","manage TanStack Table data pipelines","Choose client or server ownership for filtering, grouping, sorting, expanding, and pagination in TanStack Table v9. Load for manual* flags, mixed pipelines, server counts, or deciding which dataset each row-model stage receives.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1051,1054,1055,1058],{"name":1052,"slug":1053,"type":15},"Data Pipeline","data-pipeline",{"name":972,"slug":973,"type":15},{"name":1056,"slug":1057,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-07-30T05:25:45.400104",{"slug":1061,"name":1061,"fn":1062,"description":1063,"org":1064,"tags":1065,"stars":1018,"repoUrl":1019,"updatedAt":1071},"column-faceting","build faceted filter UIs","Build faceted filter UIs with columnFacetingFeature, facetedRowModel, facetedUniqueValues, and facetedMinMaxValues. Load for facet counts, numeric ranges, own-filter exclusion, or server-page facet completeness.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1066,1069,1070],{"name":1067,"slug":1068,"type":15},"Data Visualization","data-visualization",{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:41.397257",{"slug":1073,"name":1073,"fn":1074,"description":1075,"org":1076,"tags":1077,"stars":1018,"repoUrl":1019,"updatedAt":1081},"column-filtering","implement column filtering in TanStack Table","Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client\u002Fserver ownership.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1078,1079,1080],{"name":1014,"slug":1015,"type":15},{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:53.391632",{"slug":1083,"name":1083,"fn":1084,"description":1085,"org":1086,"tags":1087,"stars":1018,"repoUrl":1019,"updatedAt":1091},"column-ordering","manage TanStack Table column ordering","Control TanStack Table v9 leaf columnOrder with stable IDs while accounting for pinning regions, visibility, and groupedColumnMode precedence. Load for drag-and-drop columns or rendered order that differs from state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1088,1089,1090],{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:26:03.37801",{"slug":1093,"name":1093,"fn":1094,"description":1095,"org":1096,"tags":1097,"stars":1018,"repoUrl":1019,"updatedAt":1104},"column-pinning","configure column pinning in TanStack Table","Pin columns into logical start, center, and end regions with columnPinningFeature and renderer-owned sticky CSS. Load for RTL offsets, z-index, backgrounds, overflow, widths, gaps, or overlaps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1098,1101,1102,1103],{"name":1099,"slug":1100,"type":15},"CSS","css",{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:25:55.377366",{"slug":1106,"name":1106,"fn":1107,"description":1108,"org":1109,"tags":1110,"stars":1018,"repoUrl":1019,"updatedAt":1114},"column-resizing","implement column resizing in TanStack Table","Wire columnResizingFeature, header.getResizeHandler, resize mode and direction, pointer or touch events, and performant CSS-variable updates. Load when resize state changes but widths do not, or large tables resize slowly.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1111,1112,1113],{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:25:51.400011",{"slug":1116,"name":1116,"fn":1117,"description":1118,"org":1119,"tags":1120,"stars":1018,"repoUrl":1019,"updatedAt":1125},"column-sizing","configure column sizing in TanStack Table","Use columnSizingFeature numeric size, minSize, maxSize, getSize, getStart, getAfter, and total-size APIs in table, grid, or flex CSS. Load for auto or percentage misconceptions and sizing\u002Fpinning layout mismatch.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1121,1122,1123,1124],{"name":1099,"slug":1100,"type":15},{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:25:48.703799",{"slug":1127,"name":1127,"fn":1128,"description":1129,"org":1130,"tags":1131,"stars":1018,"repoUrl":1019,"updatedAt":1135},"column-visibility","manage column visibility in TanStack Table","Hide columns with columnVisibilityFeature while rendering visibility-aware header, column, and cell collections. Load when hidden columns remain in the DOM, false-versus-absent state is confused, or enableHiding is misunderstood.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1132,1133,1134],{"name":972,"slug":973,"type":15},{"name":9,"slug":8,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:25:47.367943",{"slug":53,"name":53,"fn":1137,"description":1138,"org":1139,"tags":1140,"stars":1018,"repoUrl":1019,"updatedAt":1144},"build data grids with TanStack Table","Use TanStack Table v9 as a headless data-grid state and row-processing engine. Load for first-table architecture, stable data and columns, row numbering with getDisplayIndex, semantic rendering, framework adapter choice, or deciding what Table owns versus the renderer.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1141,1142,1143],{"name":1014,"slug":1015,"type":15},{"name":972,"slug":973,"type":15},{"name":1042,"slug":1043,"type":15},"2026-07-30T05:25:52.366295",125]