Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxTurns = 200 DefaultToolTimeout = 10 * time.Minute DefaultContextWindow = 400_000 DefaultReserveTokens = 32_000 )
Variables ¶
View Source
var ErrMaxTurnsExceeded = errors.New("agent: internal turn-loop safety bound exceeded — likely a runaway tool-call cycle")
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Config ¶
type Config struct {
Model func() string
Effort func() string
Tools func() []tool.Tool
Instructions func() string
Hooks hook.Hooks
MaxTurns int
ToolTimeout time.Duration
ContextWindow int
ReserveTokens int
// contains filtered or unexported fields
}
func DefaultConfig ¶
type Message ¶
type Message struct {
Role MessageRole `json:"role"`
Content []Content `json:"content"`
Hidden bool `json:"hidden,omitempty"`
}
type MessageRole ¶
type MessageRole string
const ( RoleUser MessageRole = "user" RoleAssistant MessageRole = "assistant" RoleSystem MessageRole = "system" )
type State ¶ added in v0.6.2
type ToolResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.