llmagent

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent is a minimal model-tool loop agent.

func New

func New(cfg Config) (*Agent, error)

func (*Agent) Name

func (a *Agent) Name() string

func (*Agent) Run

type Config

type Config struct {
	Name              string
	SystemPrompt      string
	StreamModel       bool
	Reasoning         model.ReasoningConfig
	EmitPartialEvents bool
	ToolTruncation    tool.TruncationPolicy
	// ToolResultSanitizer controls how tool results are transformed before
	// being sent back to model context. Nil uses default sanitizer.
	ToolResultSanitizer func(map[string]any) map[string]any
}

Config controls behavior of LLMAgent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL