Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeEventData ¶
func EncodeEventData(v any) json.RawMessage
func IsStepLimitError ¶ added in v0.3.30
IsStepLimitError reports whether err ends a turn due to maxSteps.
func New ¶
New registers agent/coding: Default coding agent: runs one turn against session, LLM, tools and prompt.
Best practices:
- An interrupted turn is repaired on the next turn, so a crash mid-tool-call does not leave the session unusable.
- Autonomous continuation belongs in TurnStopping hooks (e.g. hook/turn-continue); per-turn step caps use maxSteps.
func StepLimitUserMessage ¶ added in v0.3.30
StepLimitUserMessage is the user-visible notice when maxSteps is reached.
Types ¶
type Config ¶
type Config struct {
// ID is agent id, referenced by loop.defaultAgent.
ID agentkit.AgentID `json:"id"`
// Model is model name passed to the LLM provider.
Model string `json:"model"`
// Modalities overrides provider input modalities when set (e.g. vision subagent with modalities: [image]).
Modalities []string `json:"modalities,omitempty"`
// Retry is per-step retry for transient provider failures.
Retry *RetryConfig `json:"retry,omitempty"`
// MaxSteps caps model steps per turn (all segments). Omitted defaults to 200;
// explicit 0 disables the cap.
MaxSteps *int `json:"maxSteps,omitempty"`
}
type Deps ¶
type Deps struct {
SessionStore agentkit.SessionStore `json:"sessionStore"`
LLM agentkit.LLMProvider `json:"llm"`
Tools agentkit.ToolRuntime `json:"tools"`
Prompt agentkit.PromptAssembler `json:"prompt"`
Policies []agentkit.Policy `json:"policies,omitempty"`
Hooks agentkit.HookRuntime `json:"hooks,omitempty"`
Compaction []compaction.Service `json:"compaction,omitempty"`
Workspace workspace.Service `json:"workspace,omitempty"`
}
type RetryConfig ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func (*Runtime) AgentCatalogEntry ¶ added in v0.1.5
AgentCatalogEntry describes this agent for the /agent catalog command.
func (*Runtime) ConfiguredModel ¶ added in v0.3.16
ConfiguredModel returns the model from agent config (before session override).
func (*Runtime) SessionStore ¶ added in v0.1.6
func (a *Runtime) SessionStore() agentkit.SessionStore
SessionStore returns the durable session backend used for turn history.
Click to show internal directories.
Click to hide internal directories.