memory

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("memory: not found")

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Key   string          `json:"key"`
	Value json.RawMessage `json:"value"`
}

type Namespace

type Namespace struct {
	RunID     string `json:"run_id,omitempty"`
	SessionID string `json:"session_id,omitempty"`
	Agent     string `json:"agent,omitempty"`
	Scope     Scope  `json:"scope"`
}

func (Namespace) KeyPrefix

func (n Namespace) KeyPrefix() string

type Repository

type Repository interface {
	Get(ctx context.Context, ns Namespace, key string) (json.RawMessage, error)
	Set(ctx context.Context, ns Namespace, key string, value json.RawMessage) error
	Append(ctx context.Context, ns Namespace, key string, value json.RawMessage) error
	Delete(ctx context.Context, ns Namespace, key string) error
}

type Scope

type Scope string
const (
	ScopeConversation Scope = "conversation"
	ScopeSession      Scope = "session"
	ScopeLongTerm     Scope = "long_term"
	ScopeAudit        Scope = "audit"
)

Jump to

Keyboard shortcuts

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