Real-Time AI Telemetry Streaming with Genkit and Angular Signals
How to stream multi-step Firebase Genkit AI pipeline progress straight into Angular Signals without database writes, replacing generic loading spinners with live status UI.
This piece presents an architecture for multi-step LLM features that replaces the typical long, opaque loading spinner with live, per-stage progress feedback. Using a resume-optimization pipeline (structure parsing, content review, tip generation) as the example, it wires Firebase Genkit's onCallGenkit wrapper to expose the flow as a type-safe Callable Cloud Function. Sequential Gemini calls emit status keys through a streamingCallback, while a Zod schema guarantees the final model output matches the exact contract the frontend expects.
On the client, Angular consumes the httpsCallable's asynchronous iterable stream via a for await...of loop, updating read-only Signals instead of relying on RxJS pipelines or async pipes. Combined with modern @switch and @for control-flow blocks, this yields a fully declarative UI. The key architectural win is avoiding intermediate database writes entirely — status updates flow directly from server memory to the browser, cutting both latency and complexity.
The source also flags a practical production concern: serverless cold starts can introduce noticeable delay, so the initial UI state should communicate that the engine is warming up rather than appearing frozen. Overall, the pattern gives engineers a concrete, low-overhead way to make complex AI pipelines feel responsive and transparent to end users.