TanStack AI — not adopted
Decision (owner, 2026-10-03): the web app does not adopt TanStack AI now. Revisit when it reaches 1.0, or if a chat feature is born outside the session thread. No ADR: nothing structural changes.
What it is
A family of packages (@tanstack/ai, @tanstack/ai-client,
@tanstack/ai-react, MIT) for building chat UIs: a client ChatClient with
streaming, a message queue, and a server chat() that talks to LLM providers.
What was measured (2026-10-03)
apps/webhas no@tanstack/ai*dependency — only React Query and Router.- Versions on that day:
@tanstack/ai0.64.0,@tanstack/ai-client0.36.1,@tanstack/ai-react0.29.4. The project page marks it Alpha, with a new version almost every day. - A custom connection is possible (
ConnectConnectionAdapter/SubscribeConnectionAdapterinai-client'sconnection-adapters.d.ts). Using only the client, no LLM call would leave the Harness, the router or the metering.
Why not
- The Phoenix channel does not speak AG-UI: it carries
agent.delta,agent.done,agent.statusandtool.call(apps/web/src/lib/session-channel.ts). Adopting would need a translator or changing the seven conversational servers. - The click answers on accept, and the end of the turn comes through the
channel and the log (RN-578,
ADR 0163,
acompanharTurnoPeloLoginapps/web/src/lib/session-turno.ts). - The
ChatClientmessage queue (whenBusy: 'queue') conflicts with the queue that lives in the log (RN-673, ADR 0191). - One assistant per conversation, against a thread with several agents and an explicit recipient (RN-584, RN-631).
- The activity strip and the turn's steps come from the log (RN-460, AT-395).
- The per-token isolation of RN-639
(
SessionPage.streaming-isolado.test.tsx) would be at risk. - The thread cut and rehydration from the log (RN-644, RN-580) gain nothing.
The only gain would be replacing the store in
apps/web/src/lib/streaming-do-turno.ts.
Forbidden in any future adoption
- The TanStack server
chat(): it talks to the provider directly, bypassing the Harness, the router and the metering. - The package's BYOK: an API key in the browser violates RN-058 (the agent spends the workspace owner's key, held encrypted by the api).
Revisit when
- TanStack AI reaches 1.0; or
- a chat feature is needed outside the session thread.