Agent TUI: browse, search, inspect, and remove Mentra memories #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add an operator-only TUI memory browser for the agent's durable Mentra memories. It must support complete browsing, text search, record inspection, and deletion without asking the conversational model to administer its own storage.
Current state and Mentra discovery
MetaCrate currently gives authorized avatar agents Mentra's
memory_search,memory_pin, andmemory_forgettools, but the TUI has no memory view.Mentra 0.18.3 already provides the correct record and mutation semantics:
MemorySearchRequestscopes every query to anagent_idand supports query, result limit, character budget, and search mode.MemoryHitexposes record ID, kind, content, source revision, creation time, metadata, source, retrieval reason, and score.MemoryEngine::forget(agent_id, record_id)performs a namespace-checked tombstone; the model-facingmemory_forgetuses the same behavior.HybridRuntimeStoreis cloneable, so MetaCrate can retain a host-side handle while giving a clone toRuntime::builder().with_store(...).The missing Mentra capability is a host-facing list/browse API.
MemoryStorecan search and tombstone records, but it cannot enumerate an agent's records with stable cursor pagination or filters; an empty/full-text query is not a reliable substitute. Do not query Mentra's SQLite schema directly. Add or adopt a Mentra API such as boundedlist_records(agent_id, cursor, filters)and keep the storage schema owned by Mentra.Design
agent_id; do not infer identity from versioned agent names.HybridRuntimeStore/Mentra memory facade in the runtime owner and expose bounded operator methods through MetaCrate's control plane.episode,summary,fact), pinned/source, and creation range, plus stable sort by newest/oldest/relevance as applicable.Acceptance criteria
No implementation is part of this issue creation pass.
Implemented in
360203dand pushed to main.Completed the operator-only Mentra memory administration loop: vendored Mentra 0.18.3 now owns bounded stable list/detail/count and filtered-search APIs across its hybrid, SQLite, and volatile stores; MetaCrate persists an explicit authenticated-avatar/logical-agent/Mentra-ID mapping; control requests cover aggregate health, agent paging, browse/search/filter/sort/detail/forget; observer content access fails closed; forget is namespaced, confirmed, content-free audited, and immediately refreshes the active TUI page. The Ratatui Memory screen exposes agent selection, stable paging, arbitrary/empty/punctuation search, kind/pinned/source/time filters, provenance, bounded details, and deletion.
Focused gates green:
The pre-existing default-feature dead_code warning in vision.rs is outside this issue; the required live-grid strict Clippy gate is clean.