10 releases
| 0.2.6 | Feb 20, 2026 |
|---|---|
| 0.2.5 | Feb 17, 2026 |
| 0.1.5 | Jan 27, 2026 |
#1245 in Asynchronous
181 downloads per month
Used in 5 crates
(3 directly)
380KB
9K
SLoC
serdes-ai-streaming
Streaming support for serdes-ai (SSE, WebSocket, async streams)
This crate provides streaming capabilities for SerdesAI:
AgentStreamEventenum 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