MCPcopy Create free account
hub / github.com/AI45Lab/Code / with_checkpoint_sink

Method with_checkpoint_sink

core/src/agent/loop_builder.rs:41–44  ·  view source on GitHub ↗

Attach a per-tool-round checkpoint sink. After each completed tool round the loop will call `sink.save_checkpoint(...)`. The sink is independent from the run id: call [`AgentLoop::set_checkpoint_run`] before executing to bind the run id this execution will use.

(mut self, sink: Arc<dyn LoopCheckpointSink>)

Source from the content-addressed store, hash-verified

39 /// [`AgentLoop::set_checkpoint_run`] before executing to bind the
40 /// run id this execution will use.
41 pub fn with_checkpoint_sink(mut self, sink: Arc<dyn LoopCheckpointSink>) -> Self {
42 self.checkpoint_sink = Some(sink);
43 self
44 }
45
46 /// Bind the run id used by per-tool-round checkpoints. Called per
47 /// execution so a single `AgentLoop` (which is cheap to clone) can

Callers 1

build_agent_loopFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected