pub struct AutoMemoryBridge { /* private fields */ }Expand description
Bridge between Oxios memory and external memory systems.
Bridges Oxios MemoryManager (agent session memory) and optional KnowledgeBase (markdown knowledge base) with external MEMORY.md files. Supports bidirectional sync with Claude Code and similar external tools.
RFC-003: KnowledgeBase is the single source of truth for markdown. MemoryManager stores agent session memory. The bridge can sync from either source or both.
Implementations§
Source§impl AutoMemoryBridge
impl AutoMemoryBridge
Sourcepub fn new(auto_memory_dir: PathBuf, oxios_memory: Arc<MemoryManager>) -> Self
pub fn new(auto_memory_dir: PathBuf, oxios_memory: Arc<MemoryManager>) -> Self
Create a new bridge.
§Arguments
auto_memory_dir- Path to directory containing MEMORY.md filesoxios_memory- Oxios MemoryManager instance
Sourcepub fn with_knowledge_base(self, kb: Arc<dyn MarkdownSource>) -> Self
pub fn with_knowledge_base(self, kb: Arc<dyn MarkdownSource>) -> Self
Set the optional markdown knowledge base.
When set, export_knowledge_to_auto() can read directly from
.md files instead of relying on MemoryManager entries.
Sourcepub async fn import_from_auto(&self) -> Result<ImportResult>
pub async fn import_from_auto(&self) -> Result<ImportResult>
Import memories from external format into Oxios.
Reads MEMORY.md files from the auto_memory_dir, parses them into structured insights, and stores them via MemoryManager.
Sourcepub async fn export_to_auto(
&self,
patterns: &[GuidancePattern],
) -> Result<ExportResult>
pub async fn export_to_auto( &self, patterns: &[GuidancePattern], ) -> Result<ExportResult>
Export Oxios patterns to external MEMORY.md format.
Reads patterns from Oxios memory and writes them as structured markdown files in the auto_memory_dir.
Sourcepub async fn sync_session(&self, direction: SyncDirection) -> Result<SyncResult>
pub async fn sync_session(&self, direction: SyncDirection) -> Result<SyncResult>
Perform a bidirectional sync.
Sourcepub fn auto_memory_dir(&self) -> &Path
pub fn auto_memory_dir(&self) -> &Path
Returns the auto-memory directory path.