knowledge

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode added in v0.14.0

type Mode int

Mode controls which tool commands are available.

const (
	// ModeReadOnly provides search + tag list only (for plan/child agent).
	ModeReadOnly Mode = iota
	// ModeReadWrite provides search + save + delete + tag management (for reflection agent).
	ModeReadWrite
	// ModeSearchOnly provides search only (for child task agent).
	// Tag list is provided via prompt, so knowledge_tag_list is not needed.
	ModeSearchOnly
)

type Tool added in v0.14.0

type Tool struct {
	// contains filtered or unexported fields
}

Tool provides knowledge_* tool commands for LLM agents.

func New

func New(svc *svcknowledge.Service, category types.KnowledgeCategory, mode Mode) *Tool

New creates a new knowledge v2 tool. category is fixed per use case (e.g., "fact" for investigation context, "technique" for analysis procedures).

func (*Tool) Configure added in v0.14.0

func (x *Tool) Configure(_ context.Context) error

func (*Tool) Description added in v0.14.0

func (x *Tool) Description() string

func (*Tool) Flags added in v0.14.0

func (x *Tool) Flags() []cli.Flag

func (*Tool) Helper added in v0.14.0

func (x *Tool) Helper() *cli.Command

func (*Tool) ID added in v0.14.0

func (x *Tool) ID() string

func (*Tool) LogValue added in v0.14.0

func (x *Tool) LogValue() slog.Value

func (*Tool) Prompt added in v0.14.0

func (x *Tool) Prompt(_ context.Context) (string, error)

func (*Tool) Run added in v0.14.0

func (x *Tool) Run(ctx context.Context, name string, args map[string]any) (map[string]any, error)

func (*Tool) Specs added in v0.14.0

func (x *Tool) Specs(_ context.Context) ([]gollem.ToolSpec, error)

Jump to

Keyboard shortcuts

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