beam_memory
beam_memory stores memory in named scopes and loads several scopes as one conversation history.
beam_memory = { path = "../riverbeam/crates/beam_memory" }
| Item | Role |
|---|---|
MemoryScope | new(name, id), system(), session(id), key() |
MemoryItem | A stored turn (turn(scope, messages)) or fact (fact(scope, kind, text)) |
MemoryBackend | Storage trait: load_layer, append_layer, forget |
InMemoryBackend | The shipped backend, keyed by scope |
ContextStrategy | Trimming trait: apply(messages, max_tokens) |
TokenLimitStrategy | Keeps the newest messages that fit, at about four characters per token |
MemoryManager | new(backend, strategy), load_context(scopes, max_tokens), save_turn, remember, forget |
There are no feature flags.
How the pipeline chooses scopes is in Memory.
InMemoryBackend lives in the process, so memory does not survive restarts and is not shared
between workers.