Skip to main content

make_runtime

Function make_runtime 

Source
pub fn make_runtime(
    provider: impl Provider + 'static,
    tools: Vec<Arc<dyn ErasedTool>>,
) -> AgentRuntime
Expand description

Create a minimal AgentRuntime with the given provider and tools.

All other components use default no-op implementations:

ยงExample

use std::sync::Arc;
use traitclaw_test_utils::provider::MockProvider;
use traitclaw_test_utils::runtime::make_runtime;

let rt = make_runtime(MockProvider::text("hello"), vec![]);
assert_eq!(rt.config.max_iterations, 20);