askuser

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAskUser

func NewAskUser(_ AskUserConfig, _ AskUserDeps) (agentkit.Tool, 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:"One specific question whose answer changes what you do next"`
	Options  []string `json:"options,omitempty" jsonschema:"Offer concrete choices when the answer is one of a few known options"`
	Default  string   `json:"default,omitempty" jsonschema:"Answer to assume when the user just presses enter"`
}

type AskUserOutput

type AskUserOutput struct {
	Answered bool   `json:"answered"`
	Answer   string `json:"answer,omitempty"`
	Selected int    `json:"selected"`
	Reason   string `json:"reason,omitempty"`
	Guidance string `json:"guidance,omitempty"`
}

Jump to

Keyboard shortcuts

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