memory

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package memory provides agent tools for the long-term memory knowledge graph. The four tools mirror the core operations of the MCP memory server reference: create_entities, add_observations, search_nodes, open_nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddObservationsTool

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

AddObservationsTool implements memory_add_observations.

func NewAddObservationsTool

func NewAddObservationsTool(s longterm.Store) *AddObservationsTool

func (*AddObservationsTool) BackfillInput

func (t *AddObservationsTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*AddObservationsTool) Call

func (*AddObservationsTool) CheckPermissions

func (t *AddObservationsTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*AddObservationsTool) Definition

func (t *AddObservationsTool) Definition() tool.Definition

func (*AddObservationsTool) Description

func (t *AddObservationsTool) Description(_ context.Context) (string, error)

func (*AddObservationsTool) FormatResult

func (t *AddObservationsTool) FormatResult(data any) string

func (*AddObservationsTool) IsConcurrencySafe

func (t *AddObservationsTool) IsConcurrencySafe(_ map[string]any) bool

func (*AddObservationsTool) IsEnabled

func (t *AddObservationsTool) IsEnabled() bool

func (*AddObservationsTool) IsReadOnly

func (t *AddObservationsTool) IsReadOnly(_ map[string]any) bool

func (*AddObservationsTool) ValidateInput

func (t *AddObservationsTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

type CreateEntitiesTool

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

CreateEntitiesTool implements memory_create_entities.

func NewCreateEntitiesTool

func NewCreateEntitiesTool(s longterm.Store) *CreateEntitiesTool

func (*CreateEntitiesTool) BackfillInput

func (t *CreateEntitiesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*CreateEntitiesTool) Call

func (*CreateEntitiesTool) CheckPermissions

func (t *CreateEntitiesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*CreateEntitiesTool) Definition

func (t *CreateEntitiesTool) Definition() tool.Definition

func (*CreateEntitiesTool) Description

func (t *CreateEntitiesTool) Description(_ context.Context) (string, error)

func (*CreateEntitiesTool) FormatResult

func (t *CreateEntitiesTool) FormatResult(data any) string

func (*CreateEntitiesTool) IsConcurrencySafe

func (t *CreateEntitiesTool) IsConcurrencySafe(_ map[string]any) bool

func (*CreateEntitiesTool) IsEnabled

func (t *CreateEntitiesTool) IsEnabled() bool

func (*CreateEntitiesTool) IsReadOnly

func (t *CreateEntitiesTool) IsReadOnly(_ map[string]any) bool

func (*CreateEntitiesTool) ValidateInput

func (t *CreateEntitiesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

type OpenNodesTool

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

OpenNodesTool implements memory_open_nodes.

func NewOpenNodesTool

func NewOpenNodesTool(s longterm.Store) *OpenNodesTool

func (*OpenNodesTool) BackfillInput

func (t *OpenNodesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*OpenNodesTool) Call

func (*OpenNodesTool) CheckPermissions

func (t *OpenNodesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*OpenNodesTool) Definition

func (t *OpenNodesTool) Definition() tool.Definition

func (*OpenNodesTool) Description

func (t *OpenNodesTool) Description(_ context.Context) (string, error)

func (*OpenNodesTool) FormatResult

func (t *OpenNodesTool) FormatResult(data any) string

func (*OpenNodesTool) IsConcurrencySafe

func (t *OpenNodesTool) IsConcurrencySafe(_ map[string]any) bool

func (*OpenNodesTool) IsEnabled

func (t *OpenNodesTool) IsEnabled() bool

func (*OpenNodesTool) IsReadOnly

func (t *OpenNodesTool) IsReadOnly(_ map[string]any) bool

func (*OpenNodesTool) ValidateInput

func (t *OpenNodesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

type SearchNodesTool

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

SearchNodesTool implements memory_search_nodes.

func NewSearchNodesTool

func NewSearchNodesTool(s longterm.Store) *SearchNodesTool

func (*SearchNodesTool) BackfillInput

func (t *SearchNodesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*SearchNodesTool) Call

func (*SearchNodesTool) CheckPermissions

func (t *SearchNodesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*SearchNodesTool) Definition

func (t *SearchNodesTool) Definition() tool.Definition

func (*SearchNodesTool) Description

func (t *SearchNodesTool) Description(_ context.Context) (string, error)

func (*SearchNodesTool) FormatResult

func (t *SearchNodesTool) FormatResult(data any) string

func (*SearchNodesTool) IsConcurrencySafe

func (t *SearchNodesTool) IsConcurrencySafe(_ map[string]any) bool

func (*SearchNodesTool) IsEnabled

func (t *SearchNodesTool) IsEnabled() bool

func (*SearchNodesTool) IsReadOnly

func (t *SearchNodesTool) IsReadOnly(_ map[string]any) bool

func (*SearchNodesTool) ValidateInput

func (t *SearchNodesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

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