A deterministic, in-process model for development and tests.
Drop-in replacement for a real provider: it never hits the network and returns
scripted (or default) Message.Responses. This is the workhorse that lets the
agent loop be developed and unit-tested offline.
Configuration:
%Test{}— always replies with a generic text response.%Test{label: "x"}— replies with the fixed string"x"as text.%Test{script: [...]}— returns each item in order; an item may be aMessage.Response, a string (wrapped as a text part), a{:tool_calls, [ToolCall]}tuple, or a functionfn messages, params -> item.
When the script is exhausted, it falls back to the default response.
Summary
Types
@type script_item() :: ExAgent.Message.Response.t() | String.t() | {:tool_calls, [ExAgent.Message.Part.ToolCall.t()]} | (ExAgent.Message.t(), ExAgent.ModelRequestParameters.t() -> script_item())
@type t() :: %ExAgent.Models.Test{ index: non_neg_integer(), label: String.t() | nil, received: [term()], script: [script_item()] }