Description
River is a library for working with AI agent streams. Building a streaming agent is hard, and River aims to make it simple: you get full-stack type safety on the chunks in a stream, a client API that feels like tRPC for consuming a stream, and a server API for creating and writing to a stream. It is not tied to one AI framework and works with the AI SDK, Mastra, custom streams or anything else you want to use. Streams can be resumed, and resumable, durable streams work out of the box with the Redis provider. TanStack Start and SvelteKit are supported now, with getting started guides and example projects for each that include instructions for running and deploying them locally. The README walks through a basic custom stream that counts vowels, consonants and special characters in a message. The author notes that full documentation is still coming soon, and a roadmap is listed in the README. The source is public on GitHub.…
Highlights
- Type safety on each stream chunk
- Client and server APIs in the style of tRPC
- Resumable and durable streams with Redis
- Works with the AI SDK, Mastra and custom streams
- TanStack Start and SvelteKit guides
Ratings & Reviews
No ratings yet
Be the first to rate River.
People also visit
River FAQ
What problem does River solve?
It makes streaming responses from AI agents easier to build, with type safety on the chunks and a way to resume a stream.
Which frameworks are supported?
The README lists TanStack Start and SvelteKit, with getting started guides and example projects for each.
Does it work with the AI SDK?
Yes. The README says River is library-agnostic and works with the AI SDK, Mastra, custom streams and other sources.
How do resumable streams work?
Resumable, durable streams work out of the box with the Redis provider, according to the README.
Is there full documentation?
Not yet. The README says full documentation is coming soon, and points to the getting started guides and examples in the meantime.
What are the best River alternatives?
Popular alternatives to River include Scoopika, Muxi and Instrukt. See all River alternatives



