#llm #sse #streaming

serdes-ai-streaming

Streaming support for serdes-ai (SSE, WebSocket, async streams)

10 releases

0.2.6 Feb 20, 2026
0.2.5 Feb 17, 2026
0.1.5 Jan 27, 2026

#1245 in Asynchronous

Download history 51/week @ 2026-01-17 216/week @ 2026-01-24 52/week @ 2026-01-31 22/week @ 2026-02-07 39/week @ 2026-02-14 62/week @ 2026-02-21 50/week @ 2026-02-28 27/week @ 2026-03-07 33/week @ 2026-03-14

181 downloads per month
Used in 5 crates (3 directly)

MIT license

380KB
9K SLoC

serdes-ai-streaming

Crates.io Documentation License: MIT

Streaming support for serdes-ai (SSE, WebSocket, async streams)

This crate provides streaming capabilities for SerdesAI:

  • AgentStreamEvent enum for stream events
  • SSE (Server-Sent Events) support
  • WebSocket streaming
  • Async stream utilities with backpressure

Installation

[dependencies]
serdes-ai-streaming = "0.1"

Usage

use serdes_ai_streaming::AgentStreamEvent;
use futures::StreamExt;

let mut stream = agent.run_stream("Write a poem", ()).await?;

while let Some(event) = stream.next().await {
    match event {
        AgentStreamEvent::TextDelta { content, .. } => {
            print!("{}", content);
        }
        AgentStreamEvent::End { .. } => break,
        _ => {}
    }
}

Part of SerdesAI

This crate is part of the SerdesAI workspace.

For most use cases, you should use the main serdes-ai crate which re-exports these types.

License

MIT License - see LICENSE for details.

Dependencies

~12–18MB
~230K SLoC