agentloop

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package agentloop implements an iterative agent loop that can call tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory builds agent iteration activities.

func NewFactory

func NewFactory(invokeLLMFactory executor.ActivityFactory[*draftcontent.Input, *draftcontent.Output]) (*Factory, error)

NewFactory creates a new agent iteration factory.

func (*Factory) NewActivity

func (f *Factory) NewActivity() executor.Activity[*Input, *Output]

NewActivity returns the agent iteration activity implementation.

type Input

type Input struct {
	ToolRegistry             *tools.Registry
	ToolDescriptionOverrides map[string]string
	Preset                   *preset.ResolvedPreset
	PriorSummaries           *[]string
	Goal                     *string
	SystemPrompt             *string
	MaxIterations            *int
	StepName                 string
	AllowedTools             []string
}

Input defines the agent iteration input parameters.

type Output

type Output struct {
	// Content is the full user-facing output for the step, including narration
	// emitted in tool-call iterations plus the final answer.
	Content string
	// FinalMessage is the message emitted in the first iteration with no tool calls.
	// This is typically what subsequent steps should use as the prior step output.
	FinalMessage string
	Summary      string
}

Output defines the agent iteration output.

Jump to

Keyboard shortcuts

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