memory

package
v1.61.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolNameAddMemory      = "add_memory"
	ToolNameGetMemories    = "get_memories"
	ToolNameDeleteMemory   = "delete_memory"
	ToolNameSearchMemories = "search_memories"
	ToolNameUpdateMemory   = "update_memory"
)

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet(toolset latest.Toolset, parentDir string, runConfig *config.RuntimeConfig, configName string) (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type AddMemoryArgs

type AddMemoryArgs struct {
	Memory   string `json:"memory" jsonschema:"The memory content to store"`
	Category string `json:"category,omitempty" jsonschema:"Optional category to organize the memory (e.g. preference, fact, project)"`
}

type DB

type DB interface {
	AddMemory(ctx context.Context, memory database.UserMemory) error
	GetMemories(ctx context.Context) ([]database.UserMemory, error)
	DeleteMemory(ctx context.Context, memory database.UserMemory) error
	SearchMemories(ctx context.Context, query, category string) ([]database.UserMemory, error)
	UpdateMemory(ctx context.Context, memory database.UserMemory) error
}

type DeleteMemoryArgs

type DeleteMemoryArgs struct {
	ID string `json:"id" jsonschema:"The ID of the memory to delete"`
}

type SearchMemoriesArgs

type SearchMemoriesArgs struct {
	Query    string `json:"query,omitempty" jsonschema:"Keywords to search for in memory content (space-separated, all must match)"`
	Category string `json:"category,omitempty" jsonschema:"Optional category to filter by"`
}

type ToolSet added in v1.60.0

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

func New added in v1.60.0

func New(manager DB) *ToolSet

func NewWithPath added in v1.60.0

func NewWithPath(manager DB, dbPath string) *ToolSet

NewWithPath creates a ToolSet and records the database path for user-visible identification in warnings and error messages.

func (*ToolSet) Describe added in v1.60.0

func (t *ToolSet) Describe() string

Describe returns a short, user-visible description of this toolset instance.

func (*ToolSet) Instructions added in v1.60.0

func (t *ToolSet) Instructions() string

func (*ToolSet) Tools added in v1.60.0

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

type UpdateMemoryArgs

type UpdateMemoryArgs struct {
	ID       string `json:"id" jsonschema:"The ID of the memory to update"`
	Memory   string `json:"memory" jsonschema:"The new memory content"`
	Category string `json:"category,omitempty" jsonschema:"Optional new category for the memory"`
}

Jump to

Keyboard shortcuts

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