Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. Exports
  2. The hook
  3. Without React
  4. Options
  5. assistantColumn
  6. Grouped row model
  7. Column meta.assistant
  8. What each answer needs
  9. GridsayError
  10. Limits
  11. Versions
  12. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

API reference

On this page

  1. Exports
  2. The hook
  3. Without React
  4. Options
  5. assistantColumn
  6. Grouped row model
  7. Column meta.assistant
  8. What each answer needs
  9. GridsayError
  10. Limits
  11. Versions
  12. Next

@gridsay/tanstack-table describes a TanStack Table v9 table to Gridsay, posts a question and applies the answer. It ships no interface. @gridsay/tanstack-table/react re-exports everything in the core entry and adds the useTableAssistant hook.

TypeScript
import {  assistantColumn,  assistantFilter,  assistantSort,  assistantGroupedRowModel,  createTableAssistant,  GridsayError,  CANNOT_APPLY_CODE,  RESET_CODE,} from '@gridsay/tanstack-table';import { useTableAssistant } from '@gridsay/tanstack-table/react';

Exports#

ExportEntryWhat it is
useTableAssistantEntry/reactWhat it isThe React hook.
createTableAssistantEntrybothWhat it isThe assistant without React.
assistantColumnEntrybothWhat it isColumn defaults: the plugin's filter and sort functions.
assistantFilterEntrybothWhat it isThe filter function.
assistantSortEntrybothWhat it isThe sort function.
assistantGroupedRowModelEntrybothWhat it isThe grouped row model the assistant groups with.
GridsayErrorEntrybothWhat it isThe error class every failure uses.
CANNOT_APPLY_CODE, RESET_CODE, CONNECTION_FAILED_CODE, NOT_JSON_CODE, INVALID_ANSWER_CODE, UNAUTHENTICATED_USER_CODE, UNEXPECTED_ERROR_CODEEntrybothWhat it isThe plugin's own error codes.
CANNOT_APPLY, RESET, CONNECTION_FAILED, NOT_JSON, INVALID_ANSWER, UNAUTHENTICATED_USEREntrybothWhat it isThe plugin's default messages. Do not compare them.
AssistantColumnMeta, AssistantTable, ColumnType, TableAssistant, TableAssistantOptionsEntrybothWhat it isTypes.
TableAssistantStateEntry/reactWhat it isThe hook's return type.

The hook#

useTableAssistant(table, options): pass your table and the options. The hook keeps one conversation while the component stays mounted, and reads the latest table and options for every question. It returns six fields:

FieldTypeBehaviour
askType(question: string) => Promise<boolean>BehaviourResolves true once the answer is on the table, false when it is not; error then says why, unless reset() was called. Questions go one at a time, in order.
undoType() => booleanBehaviourPuts back what the last answer changed and returns true. Returns false and does nothing when there is nothing to undo or a question is pending. Synchronous.
resetType() => voidBehaviourStarts a new conversation, forgets the answer to undo and clears error. The table stays as it is.
canUndoTypebooleanBehaviourtrue after an applied answer; false while a question is pending. A refusal leaves it as it was.
pendingTypebooleanBehaviourtrue while a question is being answered or waits its turn.
errorTypeGridsayError | nullBehaviourWhy the last question failed, or null. Clears when the next ask starts, when undo puts something back, and on reset().

There is no other field. Show error.message, not the error object.

Without React#

createTableAssistant(table, options) is for a table made by another v9 adapter. It returns four fields:

FieldTypeBehaviour
askType(question: string) => Promise<void>BehaviourResolves once the answer is on the table. Rejects with a GridsayError, with code reset when reset() came while it waited.
undoType() => booleanBehaviourAs the hook's.
resetType() => voidBehaviourAs the hook's.
canUndoTypereadonly booleanBehaviourRead assistant.canUndo when you need it; a destructured copy does not update.
TypeScript
import { createTableAssistant, GridsayError, RESET_CODE } from '@gridsay/tanstack-table'; // Inside your integration, `table` is the configured v9 table.const assistant = createTableAssistant(table, { url: '/api/tanstack-table' });try {  await assistant.ask('Orders over 500, biggest first');} catch (error) {  if (!(error instanceof GridsayError)) throw error;  if (error.code !== RESET_CODE) showMessage(error.message);}

showMessage stands for your own interface code. The core entry is tested with React's adapter only.

Options#

Both take the same options:

OptionTypeMeaning
urlTypestring, requiredMeaningWhere the question is posted: your route, or Gridsay's prompt endpoint with a publishable key.
headersTypean object, or a function returning one, sync or asyncMeaningExtra request headers, read for every question. If the function throws, nothing is sent and the code is unexpected_error.
publishableKeyTypestringMeaningFor calls from the browser: sent as x-api-key. Never a secret key.
getTokenType() => string | null | undefined, sync or asyncMeaningFor calls from the browser: the signed-in user's token, sent as a bearer token. null, undefined or an empty string means signed out: nothing is sent, and the code is unauthenticated_user.
additionalContextTypestringMeaningNotes about the table, up to 20,000 characters.
privateModeTypebooleanMeaningSent as options.privateMode.
referenceIdTypestringMeaningYour id for the end user, up to 127 characters.

Browser calls also need the key's allowed origins and an end-user sign-in method: see Browser keys.

assistantColumn#

Set it as the table's defaultColumn, or spread it into the columns the assistant may filter and sort. Its whole value:

TypeScript
{ filterFn: assistantFilter, sortFn: assistantSort, sortUndefined: false }
  • assistantFilter, (row, columnId, filterValue) => boolean, runs the filters an answer set and keeps every row for any other filter value. Its resolveFilterValue prepares a filter once rather than per row. The operators are listed on Filtering.
  • assistantSort, (rowA, rowB, columnId) => number, orders cells by type, empty first, ties in data order. See Sorting.
  • A column with its own filterFn cannot be filtered by the assistant, and one with its own sortFn cannot be sorted by it unless the table uses manualSorting.

Grouped row model#

assistantGroupedRowModel() takes no arguments. Register it as groupedRowModel beside columnGroupingFeature, in place of createGroupedRowModel(). Without it, grouping is off for the assistant unless the table uses manualGrouping. See Grouping.

Column meta.assistant#

FieldTypeMeaning
typeType'string' | 'number' | 'date' | 'dateTime' | 'boolean' | 'singleSelect'MeaningWins over the type read from the first 100 rows.
descriptionTypestringMeaningSent with every question.
optionsType(string | number | { value, label })[]MeaningA singleSelect's choices; at most 500 are sent.
examplesTypeunknown[] | trueMeaningA list sends its first 20; true sends up to five values from the rows. Off by default.

Details and what leaves your app: Describing columns.

What each answer needs#

AnswerNeeds on the tableChanges
FiltersNeeds on the tablecolumnFilteringFeature, filteredRowModel, assistantFilter on the column, no manualFilteringChangesReplaces columnFilters; clears globalFilter.
SortingNeeds on the tablerowSortingFeature with sortedRowModel and assistantSort, or manualSortingChangesReplaces sorting.
GroupingNeeds on the tablecolumnGroupingFeature with assistantGroupedRowModel(), or manualGroupingChangesReplaces grouping.
Top rows selectedNeeds on the tablerowSelectionFeature, enableRowSelection not falseChangesReplaces rowSelection.

An answer is applied in full or not at all, unless reset() comes while it is being applied. State you control must show it within one second: see Controlled state.

GridsayError#

FieldTypeUse
nameType'GridsayError'UseCheck with instanceof GridsayError.
messageTypestringUseThe sentence to show your user.
codeTypestring | undefinedUseWhat happened. Compare codes, never messages. A route of your own may send none.
statusTypenumber | undefinedUseThe HTTP status, when a response arrived.
retryAfterTypenumber | undefinedUseSeconds to wait, when Gridsay sets it.
detailTypestring | undefinedUseAn explanation for you. Never show it to users.
causeTypeunknownUseWhat was thrown, when something was.

Every code, its cause and whether it is charged: Refusals and errors.

Limits#

WhatLimit
QuestionLimit1 to 8,000 characters
additionalContextLimit20,000 characters
referenceIdLimit127 characters
Column idLimit255 characters; longer ids are not sent
Options per singleSelectLimit500; values and labels up to 255 characters
examplesLimitthe first 20 of a list, or five read from the rows
The column descriptions sent as contextLimit1,000,000 characters
Request bodyLimit2 MB
What reaches the model: instructions, columns, state, question and notesLimit73,728 bytes; earlier turns of the conversation are cut to fit
Controlled state taking an answerLimit1 second
UndoLimitone answer

Over a size limit, Gridsay answers 413 context_too_large before the model, and the question is not charged. Rate and usage limits are on Limits.

Versions#

PackageSupported
@tanstack/table-coreSupported^9.3.1: v9 from 9.3.1. Tested with 9.3.1.
@tanstack/react-tableSupportedv9 from 9.3.1. Tested with 9.3.1.
ReactSupported18 or later, for /react. Optional for the core entry.
TanStack Table v8SupportedNot supported, nor Material React Table and Mantine React Table, which are built on it.
Other v9 adaptersSupportedThe core entry works with any v9 table; tested with React only.

Before 1.0, a breaking change raises the minor version. Gridsay is an independent product, not affiliated with or endorsed by the TanStack Table project.

Next#

  • Quickstart
  • Refusals and errors
  • Describing columns