Stream-First
Every AI call returns an Observable. Compose with retry, timeout, takeUntil, switchMap, debounceTime, merge, race and 100+ more RxJS operators.
Stream-First
Every AI call returns an Observable. Compose with retry, timeout, takeUntil, switchMap, debounceTime, merge, race and 100+ more RxJS operators.
Cancel in One Call
unsubscribe() cancels everything. No AbortController ceremony, no cleanup callbacks. RxJS handles it.
Framework Agnostic
Core works everywhere: Node.js, browser, any framework. Optional hooks for React, Vue, Svelte, and Angular.
Ergonomic Primitives
createStore and createCommandBus are thin layers on top of RxJS — the reactive patterns you’d write yourself, without the boilerplate.
import { of } from "rxjs";import { createChatController } from "rxjs-ai";
const model = { complete: ({ messages }) => { const last = messages[messages.length - 1]; return of(`Echo: ${last?.content ?? ""}`); },};
const chat = createChatController(model);
chat.status$.subscribe((status) => console.log("Status:", status));chat.messages$.subscribe((msgs) => console.log("Messages:", msgs.length));
chat.send("Hello, AI!");npm install rxjs-ai rxjs