Documentation
¶
Index ¶
- Constants
- func BuildAgent(cfg Config) (*agent.Agent, error)
- func DefaultConfigPath() string
- func MemoryAgentOption(cfg Config) (agent.Option, error)
- func ParseMemoryStoreMode(raw string) (memory.StoreMode, error)
- func RegisterMockTools(count int, cfg ToolConfig, rng *rand.Rand) agent.ToolRegistry
- type Config
- type FileAgentConfig
- type FileConfig
- type FileMemoryConfig
- type LLMConfig
- type MemoryConfig
- type MockLLMClient
- func (m *MockLLMClient) Generate(ctx context.Context, request *interfaces.LLMRequest) (*interfaces.LLMResponse, error)
- func (m *MockLLMClient) GenerateStream(ctx context.Context, request *interfaces.LLMRequest) (interfaces.LLMStream, error)
- func (m *MockLLMClient) GetModel() string
- func (m *MockLLMClient) GetProvider() interfaces.LLMProvider
- func (m *MockLLMClient) IsStreamSupported() bool
- type MockTool
- type Runtime
- type TemporalConfig
- type ToolConfig
Constants ¶
const ( DefaultAgentName = "eval-agent" DefaultToolCount = 3 DefaultMockTokens = 500 DefaultSystemPrompt = "You are an evaluation agent. Use available tools when helpful, then answer concisely." DefaultRuntime = RuntimeLocal DefaultMemoryUserID = "eval-user" DefaultMemoryStoreMode = memory.StoreModeOnDemand MemoryScenarioStoreRecall = "store_recall" )
Variables ¶
This section is empty.
Functions ¶
func BuildAgent ¶
BuildAgent constructs an agent from cfg using mock LLM and tools when not overridden.
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the default eval-harness config file path.
func MemoryAgentOption ¶
MemoryAgentOption returns WithMemory when memory is enabled.
func ParseMemoryStoreMode ¶
ParseMemoryStoreMode parses eval harness store mode strings.
func RegisterMockTools ¶
func RegisterMockTools(count int, cfg ToolConfig, rng *rand.Rand) agent.ToolRegistry
RegisterMockTools registers count mock tools on a new registry.
Types ¶
type Config ¶
type Config struct {
UserPrompt string
Runtime Runtime
Temporal TemporalConfig
AgentName string
SystemPrompt string
LLM LLMConfig
Tool ToolConfig
ToolCount int
Memory MemoryConfig
LLMClient interfaces.LLMClient
ToolRegistry agent.ToolRegistry
Logger logger.Logger
}
Config holds settings for a single eval agent run.
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills unset config fields.
func (*Config) MemoryEnabled ¶
MemoryEnabled reports whether memory is wired for this run.
func (*Config) UseTemporal ¶
UseTemporal reports whether cfg selects the Temporal runtime.
func (*Config) UsesMemoryScenario ¶
UsesMemoryScenario reports whether the runner executes a multi-step memory scenario.
func (*Config) ValidateMemory ¶
ValidateMemory checks memory-related config when enabled.
type FileAgentConfig ¶
type FileAgentConfig struct {
Name string `yaml:"name"`
SystemPrompt string `yaml:"system_prompt"`
ToolCount int `yaml:"tool_count"`
}
FileAgentConfig holds agent fields from YAML.
type FileConfig ¶
type FileConfig struct {
Runtime string `yaml:"runtime"`
UserPrompt string `yaml:"user_prompt"`
Agent FileAgentConfig `yaml:"agent"`
Memory FileMemoryConfig `yaml:"memory"`
Temporal TemporalConfig `yaml:"temporal"`
}
FileConfig is the YAML configuration for eval-harness runs.
func LoadConfig ¶
func LoadConfig(path string) (*FileConfig, error)
LoadConfig reads and validates eval-harness config from a YAML file.
func (*FileConfig) Config ¶
func (f *FileConfig) Config() Config
Config returns a runner Config from the file config.
type FileMemoryConfig ¶
type FileMemoryConfig struct {
Enabled bool `yaml:"enabled"`
StoreMode string `yaml:"store_mode"`
UserID string `yaml:"user_id"`
Scenario string `yaml:"scenario"`
StorePrompt string `yaml:"store_prompt"`
RecallPrompt string `yaml:"recall_prompt"`
}
FileMemoryConfig holds memory fields from YAML.
type LLMConfig ¶
type LLMConfig struct {
MockTokens int
}
LLMConfig configures the built-in mock LLM (internal defaults, not in YAML).
type MemoryConfig ¶
type MemoryConfig struct {
Enabled bool
StoreMode memory.StoreMode
UserID string
Scenario string
StorePrompt string
RecallPrompt string
}
MemoryConfig configures long-term memory for eval harness runs.
func (*MemoryConfig) ApplyMemoryDefaults ¶
func (m *MemoryConfig) ApplyMemoryDefaults()
ApplyMemoryDefaults fills unset memory config fields.
type MockLLMClient ¶
type MockLLMClient struct {
// contains filtered or unexported fields
}
MockLLMClient is a deterministic mock LLM for eval harness runs.
func NewMockLLMClient ¶
func NewMockLLMClient(cfg LLMConfig, rng *rand.Rand) *MockLLMClient
NewMockLLMClient builds a mock LLM client from cfg.
func (*MockLLMClient) Generate ¶
func (m *MockLLMClient) Generate(ctx context.Context, request *interfaces.LLMRequest) (*interfaces.LLMResponse, error)
func (*MockLLMClient) GenerateStream ¶
func (m *MockLLMClient) GenerateStream(ctx context.Context, request *interfaces.LLMRequest) (interfaces.LLMStream, error)
func (*MockLLMClient) GetModel ¶
func (m *MockLLMClient) GetModel() string
func (*MockLLMClient) GetProvider ¶
func (m *MockLLMClient) GetProvider() interfaces.LLMProvider
func (*MockLLMClient) IsStreamSupported ¶
func (m *MockLLMClient) IsStreamSupported() bool
type MockTool ¶
type MockTool struct {
// contains filtered or unexported fields
}
MockTool is a mock tool for eval harness runs.
func (*MockTool) Description ¶
func (*MockTool) DisplayName ¶
func (*MockTool) Parameters ¶
func (t *MockTool) Parameters() interfaces.JSONSchema
type TemporalConfig ¶
type TemporalConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Namespace string `yaml:"namespace"`
TaskQueue string `yaml:"task_queue"`
}
TemporalConfig configures Temporal when Runtime is temporal.
type ToolConfig ¶
type ToolConfig struct{}
ToolConfig configures mock tools (internal defaults, not in YAML).