traitclaw-test-utils 1.0.0

Shared test utilities for the TraitClaw AI Agent Framework
Documentation

traitclaw-test-utils

crates.io docs.rs

Shared test utilities for the TraitClaw AI Agent Framework.

Provides reusable mock implementations and helpers for testing agents without hitting real LLM APIs:

  • MockProvider — Deterministic LLM provider returning pre-defined responses
  • MockMemory — In-memory session-based memory backend
  • EchoTool — Tool that echoes its input for tool-calling tests
  • FailTool — Tool that always returns an error
  • make_runtime — One-call AgentRuntime setup for strategy tests

Usage

[dev-dependencies]
traitclaw-test-utils = "1.0"
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

Documentation

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.