TanStack Start
07 Deploy
Check TanStack Start runtime, environment, and streaming behavior before deployment.
Runtime Checklist
| Area | Check |
|---|---|
| Server placement | Provider clients, agents, and tools stay in server modules |
| Secrets | Provider keys are available only to server code |
| Streaming | Host and proxy support long-lived response bodies |
| Timeouts | Route timeouts exceed expected model and tool duration |
| Storage | Conversations, memory, retrieval indexes, and traces use durable stores |
Prefer Server Routes For HTTP Surfaces
Server functions are useful inside the app. Server routes are the clearest contract for external clients and streaming endpoints because they return Response directly.
Add Trace Metadata
const response = await supportAgent
.prompt(message)
.withTrace({
name: "support-route",
userId,
sessionId: conversationId,
tags: ["tanstack-start"],
})
.send();Attach observers for logs, metrics, Langfuse, or OpenTelemetry.
Deployment Smoke Test
curl -X POST "$APP_URL/api/support" \
-H "Content-Type: application/json" \
-d '{"message":"Say hello"}'Next
Use Troubleshooting for common failures. Related guides: Observers, Langfuse, and OpenTelemetry.
