Expand description
A transport that replays a scripted list of events.
Testing a client against a live agent is slow, flaky, and needs a model. It
is also unnecessary: the agent’s half of the conversation is just a list of
events. ReplayTransport serves one — and records the
RunAgentInputs it was handed, which is how a test asserts that a resume
carried the right answers.
use ag_ui::client::transport::ReplayTransport;
use ag_ui::Event;
let transport = ReplayTransport::new([
Event::run_started("thread-1", "run-1"),
Event::run_finished_success("thread-1", "run-1"),
]);Structs§
- Replay
Transport - A
Transportthat answers each run from a script.