memory

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package memory provides an in-process agent.History backend.

Suitable for single-replica deployments and tests; messages are lost when the process restarts.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySessionID = errors.New("aikido/agent/history/memory: empty sessionID")

ErrEmptySessionID is returned by Append/Read when sessionID is empty.

Functions

This section is empty.

Types

type History

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

History is the in-memory implementation.

func NewHistory

func NewHistory() *History

NewHistory returns an empty in-memory History.

func (*History) Append

func (h *History) Append(ctx context.Context, sessionID string, msgs ...llm.Message) error

func (*History) Read

func (h *History) Read(ctx context.Context, sessionID string) ([]llm.Message, error)

Jump to

Keyboard shortcuts

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