memory

package
v0.0.0-...-9ee283c Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package memory implements the gram://memory/* platform tools that wrap the MemoryService for use by assistant agents at runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForgetTool

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

ForgetTool implements gram://memory/forget.

func NewForgetTool

func NewForgetTool(svc Service) *ForgetTool

func (*ForgetTool) Call

func (t *ForgetTool) Call(ctx context.Context, _ toolconfig.ToolCallEnv, payload io.Reader, wr io.Writer) error

func (*ForgetTool) Descriptor

func (t *ForgetTool) Descriptor() core.ToolDescriptor

type RecallTool

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

RecallTool implements gram://memory/recall.

func NewRecallTool

func NewRecallTool(svc Service) *RecallTool

func (*RecallTool) Call

func (t *RecallTool) Call(ctx context.Context, _ toolconfig.ToolCallEnv, payload io.Reader, wr io.Writer) error

func (*RecallTool) Descriptor

func (t *RecallTool) Descriptor() core.ToolDescriptor

type RememberTool

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

RememberTool implements gram://memory/remember.

func NewRememberTool

func NewRememberTool(svc Service) *RememberTool

func (*RememberTool) Call

func (t *RememberTool) Call(ctx context.Context, _ toolconfig.ToolCallEnv, payload io.Reader, wr io.Writer) error

func (*RememberTool) Descriptor

func (t *RememberTool) Descriptor() core.ToolDescriptor

type Service

type Service interface {
	Remember(ctx context.Context, assistantID uuid.UUID, projectID uuid.UUID, organizationID string, content string, tags []string) (memory.RememberResult, error)
	Recall(ctx context.Context, assistantID uuid.UUID, organizationID string, query string, limit int, tags []string) ([]memory.RecallResult, error)
	Forget(ctx context.Context, assistantID uuid.UUID, projectID uuid.UUID, organizationID string, query string, tags []string) (memory.ForgetResult, error)
}

Service is the surface of the assistant memory service that the platform memory tools use. *memory.MemoryService satisfies it; tests substitute a fake.

Jump to

Keyboard shortcuts

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