

Resumable streaming, a transcript in your own database, and a human who can take over mid-answer — without owning the Redis stream and the reconnect logic. One SDK, drops into the Vercel AI SDK. Managed, or in your VPC.
@pingerchips/ai is a drop-in ChatTransport for the Vercel AI SDK. The component body doesn't change — the conversation becomes resumable, persisted in your own database, and multi-device. The API mirrors @ably/ai-transport, so moving over is three imports and an auth endpoint.
'use client';
import { useChat } from '@ai-sdk/react';
import { useClientSession } from '@pingerchips/ai/react';
import { createChatTransport } from '@pingerchips/ai/vercel';
export function Chat({ threadId }) {
const { session } = useClientSession();
const transport = useMemo(() =>
session ? createChatTransport(session, { api: '/api/chat' }) : null,
[session]);
// exactly the useChat you already wrote
const { messages, sendMessage, status, stop } = useChat({
id: threadId, transport,
});
}
// reload the tab mid-answer → the stream picks up where it left offnpm i @pingerchips/ai ai @ai-sdk/reactAddress it by type and key. Read and write named slots. Every write is logged and serialized against every other write to that object; every change streams to every subscriber. Reconnect with a logId and you get exactly what you missed. No class to extend, no handler to register, no deploy step — Chat and Sessions are built on this.
const run = pingerchips.object('run', 'run-abc123');
// atomic read-modify-write — the object serialises it
await run.transaction(async (obj) => {
if (await obj.get('status') === 'streaming') {
await obj.set('status', 'done');
await obj.append('history', { at: Date.now() });
}
});
// a client resumes from where it left off
const run = await client.object('run', 'run-abc123', {
afterLogId: loadCheckpoint(),
});a thread is an object of type thread; messages are append('messages', …)
current step, partial results, which worker owns it — checkpointed every step
per-entity state your frontend watches without polling
The conversation that persists. The stream that resumes. The automation that fires on an event. The pub/sub under it all. Built by hand, that's SSE plus a Redis stream plus a job queue plus a socket server — roughly a sprint to stand up, then yours forever.
// stream tokens as they generate
const run = await thread.startRun();
for await (const chunk of llm) {
await run.pushToken(chunk.text);
}
await run.end({ content });
// committed. survives reload.my invoice shows two charges
msg_9f2c · committed
Checking your billing history now…
run 3a1b · streaming
took over — refunding the duplicate
msg_a04e · handoff
import { useChat } from 'ai/react';
// + one transport → durable, persisted, multiplayerflow.on('message.created', { channel: 'support-*' })
.post('/triage') // → replyconst ch = await pc.subscribe('orders');
// durability is per-channel server configAbly gets tokens to a browser through a disconnect — and stops there. The DIY column is the Vercel Chat SDK template: a messages table, a Redis stream, and reconnect logic you own and maintain.
“If anything happens during the stream — internet disconnecting, shutting the laptop lid, a network hiccup — the entire generation is lost and you need to start over.”
“Load balancers with aggressive idle timeouts can drop connections after 60 seconds, and reconnecting with WebSockets requires manual logic.”
“Resumable LLM streaming isn't hard. It's just annoying — Redis, a stream ID in the session, cleanup on completion, and reconnect handling you write yourself.”
“Long-running autonomy still breaks on state handoff, context decay, and cold-start re-reading. Agents need to be treated less like one-off chats and more like addressable workers.”
Most teams start on our managed cloud. When compliance or data residency demands it, the same stack runs on your servers under an enterprise or on-prem plan — same SDK, same primitives, no rewrite.
The full cluster deploys on your infrastructure — nothing leaves your network.
No outbound calls required. On-prem installs run fully isolated.
Threads and objects live in your Postgres. Export or purge on your schedule.
SLAs, a dedicated cluster, SSO/SAML, and a shared Slack channel.
$ pc deploy --license $KEY
$ docker compose up
> cluster up · localhost:4000
> dashboard · localhost:4000/admin
> 0 outbound connectionsCloud pricing lands after beta with 30 days' notice. Early teams lock the best rate.
We run the cluster. You build on it. No card required.
The full stack in your VPC or air-gapped, under license.
Dedicated infrastructure with a contracted uptime SLA.
Streaming that survives a reload, a transcript in your own database, a human who can step in — from one npm install. Run it on our cloud or your own.