AgentSea.Memory.Buffer (agentsea_core v0.1.0)

Copy Markdown

A simple in-memory conversation buffer backed by a GenServer.

Stores a rolling window of messages per conversation id. A single buffer process serves many conversations (keyed by id); pass :max_messages to cap the window per conversation.

Summary

Functions

Append messages to a conversation (respecting the window cap).

Returns a specification to start this module under a supervisor.

Start a buffer. Options: :name (default AgentSea.Memory.Buffer), :max_messages.

Functions

append(conversation_id, messages)

Append messages to a conversation (respecting the window cap).

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

Start a buffer. Options: :name (default AgentSea.Memory.Buffer), :max_messages.