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>,
) -> AutoMemoryBridge
pub fn new( auto_memory_dir: PathBuf, oxios_memory: Arc<MemoryManager>, ) -> AutoMemoryBridge
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>,
) -> AutoMemoryBridge
pub fn with_knowledge_base( self, kb: Arc<dyn MarkdownSource>, ) -> AutoMemoryBridge
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, Error>
pub async fn import_from_auto(&self) -> Result<ImportResult, Error>
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, Error>
pub async fn export_to_auto( &self, patterns: &[GuidancePattern], ) -> Result<ExportResult, Error>
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, Error>
pub async fn sync_session( &self, direction: SyncDirection, ) -> Result<SyncResult, Error>
Perform a bidirectional sync.
Sourcepub fn auto_memory_dir(&self) -> &Path
pub fn auto_memory_dir(&self) -> &Path
Returns the auto-memory directory path.
Sourcepub async fn sync_sqlite_to_auto(
&self,
store: &SqliteMemoryStore,
) -> Result<ExportResult, Error>
pub async fn sync_sqlite_to_auto( &self, store: &SqliteMemoryStore, ) -> Result<ExportResult, Error>
Sync learned patterns from SQLite to external MEMORY.md (Phase 7).
Reads patterns from the SQLite patterns table and exports
them as structured markdown to the auto-memory directory.
Sourcepub async fn sync_auto_to_sqlite(
&self,
store: &SqliteMemoryStore,
) -> Result<ImportResult, Error>
pub async fn sync_auto_to_sqlite( &self, store: &SqliteMemoryStore, ) -> Result<ImportResult, Error>
Import external MEMORY.md insights into SQLite patterns (Phase 7).
Reads from auto-memory directory and stores as patterns.