Documentation
¶
Overview ¶
Package simple provides a general LLM-loop strategy: generate, run any tool calls, feed the results back, repeat until the model answers with no more tool calls. It does at most one LLM Generate per transition (checkpointing between rounds), which keeps replay cheap and avoids relying on intra-transition determinism (agentkit is at-least-once, D44).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶
type Input struct {
Prompt string `json:"prompt"`
}
Input is the launch input (required; empty prompt is rejected by Init).
type Option ¶
type Option func(*config)
Option configures the strategy.
func WithLimiter ¶
WithLimiter sets this agent's execution budget, which Strategy.Limit answers with. Default: none, i.e. LimitPass at every check.
This is a different question from WithMaxIterations: that one bounds this strategy's own loop and is counted in checkpointed state, while a limiter sees the kernel's counters — including every terminated child, so on a Process that spawns, it is a budget for the subtree.
func WithMaxIterations ¶
WithMaxIterations caps the number of LLM rounds. Default: 32. Exceeding it finalizes as Fail(strategy_error).
func WithOnFinish ¶
func WithOnFinish(h agentkit.FinishHandler[Output]) Option
WithOnFinish wires a completion handler for this agent. Delivery is best-effort; see agentkit.WithOnFinish.
func WithSystemPrompt ¶
WithSystemPrompt sets the system prompt. Default: "".