Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAskUser ¶
func NewAskUser(_ AskUserConfig, _ AskUserDeps) (agentkit.ToolPack, error)
NewAskUser registers tool/ask-user: Ask the human one question (tool name: ask_user) whose answer changes what the agent does next.
Best practices:
- Routes through the inbound platform via permission.Broker; interactive CLI renders permission/request, IM platforms render cards/buttons.
- Headless platforms return answered=false immediately; it is never an error and never blocks the turn.
- Do not mount it on subagents: a child agent runs behind a delegate call, where nobody is watching its stdout.
Types ¶
type AskUserConfig ¶
type AskUserConfig struct{}
type AskUserDeps ¶
type AskUserDeps struct{}
type AskUserInput ¶
type AskUserInput struct {
Question string `json:"question" jsonschema:"required,description=One specific question whose answer changes what you do next"`
Options []string `json:"options,omitempty" jsonschema:"description=Offer concrete choices when the answer is one of a few known options"`
Default string `json:"default,omitempty" jsonschema:"description=Answer to assume when the user just presses enter"`
}
Click to show internal directories.
Click to hide internal directories.