summary_buffer

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package summary_buffer provides an inline auto-compacting memory.history provider. It keeps the most recent N messages verbatim and replaces older ones with an LLM-generated summary, emitted in place as a system message at the head of the buffer.

Unlike nexus.memory.compaction — which is an external coordinator that emits memory.compacted for a separate history plugin to adopt — this plugin serves memory.history directly, so the summarised view is what the ReAct agent sees on each request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() engine.Plugin

New creates a new summary_buffer memory plugin.

Types

type Plugin

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

Plugin implements inline auto-compaction for the memory.history buffer.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() []engine.Capability

Capabilities advertises both memory.history (direct history provider) and memory.compaction (since triggering-plus-summarising is this plugin's core behaviour). Running alongside nexus.memory.compaction is a misconfiguration — both would advertise memory.compaction and the engine warns on the ambiguity.

func (*Plugin) ConfigSchema

func (p *Plugin) ConfigSchema() []byte

ConfigSchema implements engine.ConfigSchemaProvider.

func (*Plugin) Dependencies

func (p *Plugin) Dependencies() []string

func (*Plugin) Emissions

func (p *Plugin) Emissions() []string

func (*Plugin) GetHistory

func (p *Plugin) GetHistory() []events.Message

GetHistory returns a copy of the current buffer for in-process callers.

func (*Plugin) ID

func (p *Plugin) ID() string

func (*Plugin) Init

func (p *Plugin) Init(ctx engine.PluginContext) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Ready

func (p *Plugin) Ready() error

func (*Plugin) Requires

func (p *Plugin) Requires() []engine.Requirement

func (*Plugin) Shutdown

func (p *Plugin) Shutdown(_ context.Context) error

func (*Plugin) Subscriptions

func (p *Plugin) Subscriptions() []engine.EventSubscription

func (*Plugin) Version

func (p *Plugin) Version() string

Jump to

Keyboard shortcuts

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