agentloop

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package agentloop exposes TARS' reusable LLM tool-calling loop. It turns a provider-normalized llm.Client plus a tools.Registry into an iterative agent loop that calls tools, appends tool results, detects repeated tool-call patterns, and emits audit hooks.

Index

Constants

View Source
const (
	EventLoopStart      = internal.EventLoopStart
	EventBeforeLLM      = internal.EventBeforeLLM
	EventAfterLLM       = internal.EventAfterLLM
	EventBeforeTool     = internal.EventBeforeTool
	EventAfterTool      = internal.EventAfterTool
	EventProviderTool   = internal.EventProviderTool
	EventLoopEnd        = internal.EventLoopEnd
	EventLoopError      = internal.EventLoopError
	DefaultMaxLoopIters = internal.DefaultMaxLoopIters
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditEntry

type AuditEntry = internal.AuditEntry

type AuditHook

type AuditHook = internal.AuditHook

func NewAuditHook

func NewAuditHook(maxEntries int) *AuditHook

type CounterHook

type CounterHook = internal.CounterHook

func NewCounterHook

func NewCounterHook() *CounterHook

type Event

type Event = internal.Event

type EventType

type EventType = internal.EventType

type Hook

type Hook = internal.Hook

type HookFunc

type HookFunc = internal.HookFunc

type Loop

type Loop = internal.Loop

func New

func New(client llm.Client, registry *tools.Registry, hooks ...Hook) *Loop

type RunOptions

type RunOptions = internal.RunOptions

Jump to

Keyboard shortcuts

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