Expand description
§TraitClaw Test Utilities
Shared test utilities for the TraitClaw AI Agent Framework.
This crate provides reusable mock implementations and helpers for testing agents without hitting real LLM APIs:
MockProvider— Deterministic LLM provider returning pre-defined responsesMockMemory— In-memory session-based memory backendEchoTool— Tool that echoes its input for tool-calling testsFailTool— Tool that always returns an errormake_runtime— One-callAgentRuntimesetup for strategy tests
§Quick Start
use traitclaw_test_utils::provider::MockProvider;
use traitclaw_test_utils::runtime::make_runtime;
let runtime = make_runtime(MockProvider::text("hello"), vec![]);
// Use runtime with any AgentStrategy for deterministic testing