← All examples

Streaming Agent

Agent with real-time SSE streaming responses. Token-by-token output for responsive user experiences.

agentstreamingsse

An agent that streams responses in real time using Server-Sent Events (SSE). Each token is delivered as it's generated, giving users immediate feedback instead of waiting for the full response.

What's included

  • SSE streaming — token-by-token output over a persistent connection
  • Backpressure handling — flow control when the consumer is slower than the producer
  • Reconnection logic — automatic recovery when the connection drops
  • Streamer agent — configured for incremental response delivery

When to use this

Pick the Streaming Agent example when you want to:

  • Build chat interfaces that feel responsive and live
  • Deliver long-form content without blocking the UI
  • Understand how SSE and streaming work in Reminix

Project structure

├── src/
│   ├── index.ts                # Entry point — serve({ agents })
│   └── agents/
│       └── streamer.ts         # Streaming agent with SSE
├── package.json
├── tsconfig.json
└── reminix.config.ts

Quick start

Deploy the project and call the streaming agent endpoint. Responses will arrive as an SSE stream, with each token emitted as it's generated.