Help us shape the future of Go! Take the 2026 Go Developer Survey

agent

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package agent provides the core reasoning loop and tool execution logic.

Index

Constants

This section is empty.

Variables

View Source
var ErrModel = errors.New("model failure")

ErrModel failure originating from model transport/stream/provider layers.

Functions

This section is empty.

Types

type GraphRunner

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

GraphRunner executes the LLM/tool graph. Field order is kept for readability; padding is acceptable.

func NewGraphRunner

func NewGraphRunner(
	llm domain.LLM,
	registry toolRegistry,
	waiter actionWaiter,
	maxIterations int,
	events eventSender,
	notifier taskNotifier,
	summarizer transcriptSummarizer,
	permission permissionAsker,
) (*GraphRunner, error)

func (*GraphRunner) Run

func (r *GraphRunner) Run(ctx context.Context, session *domain.Session, input string) error

type Summarizer

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

Summarizer compresses message history into a single summary message using Eino.

func NewSummarizer

func NewSummarizer(llm domain.LLM) *Summarizer

NewSummarizer creates a new summarizer using the provided LLM.

func (*Summarizer) Summarize

func (s *Summarizer) Summarize(ctx context.Context, msgs []*schema.Message) (*schema.Message, error)

Summarize takes a list of messages and returns a single summary message.

Jump to

Keyboard shortcuts

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