Help us shape the future of Go! Take the 2026 Go Developer Survey

agentmemory

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package agentmemory attaches Orb's bounded persistent memory to a plain engine.Agent. The bundled memory plugin delegates to the same runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(ctx context.Context, target *engine.Agent, store memorysdk.Store) error

Attach loads a frozen snapshot and adds memory's tools to a plain Agent. Call it before the agent begins processing prompts.

Types

type Runtime

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

Runtime owns one session's view of an agent's memory and the four memory tools. The view is a frozen snapshot, so the prompt prefix stays cacheable, plus the changes made elsewhere since, which Changes hands over turn by turn. Different runtimes never share a lock; callers must pass a tenant-scoped, concurrent Store when multiple sessions share the same durable backend.

func New

func New(store memorysdk.Store) (*Runtime, error)

New creates a memory runtime over one tenant-scoped Store.

func (*Runtime) Changes added in v0.17.3

func (runtime *Runtime) Changes(ctx context.Context) (string, error)

Changes lists what the agent's memory gained, replaced or lost since this session last saw it, made by its other sessions on any front or process, and counts it as seen; empty when nothing changed.

func (*Runtime) Load

func (runtime *Runtime) Load(ctx context.Context) error

Load freezes the current bounded profile for the next agent session.

func (*Runtime) SystemPrompt

func (runtime *Runtime) SystemPrompt(base string) string

SystemPrompt appends the frozen profile to base.

func (*Runtime) Tools

func (runtime *Runtime) Tools() []engine.AgentTool

Tools returns remember, recall, replace, and forget bound to the runtime.

Jump to

Keyboard shortcuts

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