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 ¶
- type AddObservationsTool
- func (t *AddObservationsTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *AddObservationsTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *AddObservationsTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *AddObservationsTool) Definition() tool.Definition
- func (t *AddObservationsTool) Description(_ context.Context) (string, error)
- func (t *AddObservationsTool) FormatResult(data any) string
- func (t *AddObservationsTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *AddObservationsTool) IsEnabled() bool
- func (t *AddObservationsTool) IsReadOnly(_ map[string]any) bool
- func (t *AddObservationsTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type CreateEntitiesTool
- func (t *CreateEntitiesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *CreateEntitiesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *CreateEntitiesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *CreateEntitiesTool) Definition() tool.Definition
- func (t *CreateEntitiesTool) Description(_ context.Context) (string, error)
- func (t *CreateEntitiesTool) FormatResult(data any) string
- func (t *CreateEntitiesTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *CreateEntitiesTool) IsEnabled() bool
- func (t *CreateEntitiesTool) IsReadOnly(_ map[string]any) bool
- func (t *CreateEntitiesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type OpenNodesTool
- func (t *OpenNodesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *OpenNodesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *OpenNodesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *OpenNodesTool) Definition() tool.Definition
- func (t *OpenNodesTool) Description(_ context.Context) (string, error)
- func (t *OpenNodesTool) FormatResult(data any) string
- func (t *OpenNodesTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *OpenNodesTool) IsEnabled() bool
- func (t *OpenNodesTool) IsReadOnly(_ map[string]any) bool
- func (t *OpenNodesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
- type SearchNodesTool
- func (t *SearchNodesTool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *SearchNodesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *SearchNodesTool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *SearchNodesTool) Definition() tool.Definition
- func (t *SearchNodesTool) Description(_ context.Context) (string, error)
- func (t *SearchNodesTool) FormatResult(data any) string
- func (t *SearchNodesTool) IsConcurrencySafe(_ map[string]any) bool
- func (t *SearchNodesTool) IsEnabled() bool
- func (t *SearchNodesTool) IsReadOnly(_ map[string]any) bool
- func (t *SearchNodesTool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
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 (*AddObservationsTool) Call ¶
func (t *AddObservationsTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
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 ¶
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 (*CreateEntitiesTool) Call ¶
func (t *CreateEntitiesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
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 ¶
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 (*OpenNodesTool) Call ¶
func (t *OpenNodesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
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 ¶
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 (*SearchNodesTool) Call ¶
func (t *SearchNodesTool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
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 ¶
Click to show internal directories.
Click to hide internal directories.