Cortex: Local-First AI Agent Memory Engine & Bayesian Beliefs