AgentSea.Memory.Summary (agentsea_core v0.1.0)

Copy Markdown

Conversation memory that keeps the most recent messages verbatim and compacts everything older into an LLM-generated summary once a conversation grows past a threshold — bounding context size on long chats.

load/1 returns [summary_system_message | recent_messages] (or just the messages while under the threshold). Summarization runs over any AgentSea.Provider. A singleton (like AgentSea.Memory.Buffer): start it once with the provider config.

Options: :provider ({module, opts}, required), :model, :keep_recent (verbatim tail, default 6), :threshold (default 12), :name.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)