Raxol.Agent.Conversation.Store.ETS (Raxol Agent v2.6.0)

Copy Markdown View Source

ETS-backed Raxol.Agent.Conversation.Store adapter.

Items live in a named ordered_set keyed on {conversation_id, seq}, so iteration is naturally sequence-ordered within a conversation. Sequence allocation uses a sibling set and :ets.update_counter/3 for atomic, 0-based per-conversation increments (the same pattern as Raxol.Agent.ThreadLog.Ets). A third set tracks known conversation ids for list_conversations/1.

Config

%{table: :my_conversation_items}

Defaults to :raxol_conversation_items. Conversations sharing a table name share its items; isolate by passing distinct names.

Lifetime

Tables live for the duration of the BEAM; not supervised, not persisted. A durable adapter is a follow-up.

Summary

Functions

Ensure the items, sequence-counter, and conversation-registry tables exist.

Functions

ensure_tables(config)

@spec ensure_tables(map()) :: {atom(), atom(), atom()}

Ensure the items, sequence-counter, and conversation-registry tables exist.