curator

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package curator runs a reflection pass after a substantial exchange. It reads what just happened, decides what is worth keeping, and writes or updates long-term memory, stamping each fact with where it came from. This is the trick that makes tomo get better at your workflows over time: the working conversation stays lean, and the durable parts settle into memory on their own.

A curator is a small agent of its own. It wields only the memory tools, so a reflection can never do more than curate memory, and it runs unattended with no gate to prompt.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Worthwhile

func Worthwhile(turn []provider.Message) bool

Worthwhile reports whether a finished turn did enough to reflect on. A quick exchange with no tools and little said rarely hides a durable fact, and a model call per "thanks" is waste. A turn that reached for a tool, or that ran long, is worth a look.

Types

type Curator

type Curator struct {
	Provider  provider.Provider
	Model     string
	Memory    *memory.Memory
	MaxTokens int
	// Skills is the installed skill store, read here only so the curator can
	// avoid drafting one that already exists. Drafts is where a proposed skill
	// is written. Both nil means the curator only curates memory; installing a
	// draft is always a separate, explicit user act, never something a
	// reflection does.
	Skills *skill.Store
	Drafts *skill.Store
	// Now supplies the date stamped onto a memory's provenance. Injectable so
	// tests are deterministic; nil means time.Now.
	Now func() time.Time
}

Curator reflects on finished turns and curates memory from them.

func (*Curator) Reflect

func (c *Curator) Reflect(ctx context.Context, source string, history, turn []provider.Message) error

Reflect runs one curation pass over a finished exchange. source names where it happened (a session key), and rides into each memory's provenance so a later reader can tell an inferred fact from one the user stated outright. history is the prior context; turn is what just happened. Reflect returns only on a real failure; the common outcome is that nothing durable came up and no memory changes.

Jump to

Keyboard shortcuts

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