AI apps with live state.
Call a model from a server function, stream the result into rows your UI is already subscribed to, and run long agent loops as durable workflows that survive restarts. The model, the state, and the realtime layer live in one server.
AI products are mostly plumbing: a model call, a place to stream tokens, a way to push partial results to the client, durable state for multi-step agents, and background jobs for the slow parts. Stitched together from a model SDK, a queue, a websocket service, and a database, it's a lot of moving parts to keep coherent.
Models from a server function
ctx.llm calls a model from inside a Pylon function, with the same typed context — db, auth, schedule — as the rest of your backend. The call sits right next to the data it reads and the rows it writes.
Stream into live state
Write partial results to a row as they arrive and every db.useQuery watching it re-renders live — token-by-token output, status updates, intermediate steps — without a bespoke streaming channel. The sync engine is already pushing diffs; AI output is just more diffs.
Durable agent loops
Multi-step agents run as durable workflows: call a tool, wait for a result, sleep, retry, continue — checkpointed at every step so a deploy or crash doesn't lose the run. Background jobs handle the slow work without blocking the request.
Ship it on Pylon.
Scaffold an app in seconds, deploy free on Cloud, scale when you need to.