MemoAI: The Cognitive OS for the Future of Work

The Spark: From Chaos to Augmented Cognition

We live in an era of information entropy. The modern knowledge worker navigates a fragmented landscape of 30+ disparate tools—Slack for comms, Jira for tasks, Notion for docs. Our brains, evolved for the savanna, are drowning in the digital flood.

MemoAI was born from a singular, radical question: What if software didn't just store your data, but actually understood it?

I wasn't interested in building another "chatbot". I wanted to engineer a Second Brain—a persistent, agentic extension of the user's mind that adheres to the Principal of Cognitive Continuity. The goal was to solve the fundamental optimization problem of productivity:

$$ \text{Efficiency} = \int_{t=0}^{T} \frac{\alpha \cdot \text{Context}(t) \times \text{Action}(t)}{\text{Friction}(t) + \epsilon} dt $$

Where $\alpha$ is the semantic relevance coefficient. MemoAI minimizes $\text{Friction}(t)$ via voice interfaces while maximizing $\text{Context}(t)$ through its proprietary 3-layer memory architecture.


Technical Architecture: Engineering the "Liquid" Backend

MemoAI interacts as a Unified Agent, but under the hood, it is a distributed system built on the Raindrop Framework (Liquid Metal).

1. The Neural Core: Raindrop Framework (Liquid Metal)

The backbone of MemoAI is the Raindrop Framework. We chose Raindrop for its "Liquid Metal" architecture, which allowed us to deploy a distributed microservices mesh without managing a single server.

  • Type-Safe Infrastructure: Raindrop's Service<Env> pattern provided robust, type-safe bindings for our environment variables, ensuring that critical secrets like OPENAI_API_KEY and WORKOS_API_KEY were securely injected at runtime.
  • Microservices Orchestration:
    • api-gateway: As the central cortex, it uses Hono-based routing to dispatch requests.
    • memory-manager: A dedicated Raindrop service managing our Vector-Hybrid retrieval logic.
    • task-manager: Handles ACID-compliant transaction states for user tasks.
    • file-processor: Scales independently to handle heavy file operations (audio/PDF ingestion).
  • Zero-Ops Deployment: Raindrop's instant build-and-deploy pipeline meant we could iterate on backend logic in seconds, not minutes.

2. The Holographic Interface (Frontend)

Built with React 18 + TypeScript + Vite, the frontend is designed for "Thought-Speed" interaction.

  • Glassmorphism UI: We utilized backdrop-filter and advanced CSS variables to create a depth-based interface that feels distinct from standard SaaS flat design.
  • Real-time State Sync: Leveraged reactive patterns to ensure that when a task is created via Voice in the AssistantTab, it instantly propagates to the CalendarTab without a full page refresh.

3. Identity & Trust: Powered by WorkOS

Security for a "Second Brain" is non-negotiable. Instead of rolling a fragile implementation, we integrated WorkOS to provide battle-hardened authentication.

  • AuthKit Integration: We utilized WorkOS AuthKit to drop in a fully hosted, high-conversion login UI. This instantly gave us support for Google OAuth and Email Magic Links without writing complex provider logic.
  • Session Security: By offloading session handling to WorkOS's secure OIDC infrastructure, we eliminated the risks associated with manual JWT management.
  • Enterprise Readiness: WorkOS allows us to theoretically flip a switch and support SAML/SSO for enterprise clients, positioning MemoAI not just as a consumer toy, but a B2B productivity platform.
  • "Build vs Buy": Choosing WorkOS saved us an estimated 40+ hours of dev time, allowing us to focus entirely on the AI Memory architecture.

Deep Dive: The Tri-Layer Memory Architecture

Standard RAG (Retrieval Augmented Generation) applications suffer from "goldfish memory"—they forget context the moment it leaves the context window. MemoAI implements a Cognitive Architecture inspired by human neuroscience:

$$ Memory_{\text{total}} = \sum (w_e E + w_s S + w_p P) $$

  1. $E$ - Episodic Memory (The Narrative):

    • Stores linear, time-stamped interaction logs.
    • Implementation: High-speed key-value stores with time-decay indices.
    • Usage: "What did we talk about just now?"
  2. $S$ - Semantic Memory (The Facts):

    • Stores synthesized truths and user axioms.
    • Algorithm: An intelligent extractor runs in the background (post-processing), analyzing chat streams to crystallize "Facts" (e.g., User is a Frontend Engineer, Project deadline is Dec 25).
    • Usage: Personalization and context injection for every subsequent query.
  3. $P$ - Procedural Memory (The Skills):

    • Stores workflows and habits.
    • Innovation: The system learns that "Deployment" implies specific sub-tasks (Build -> Test -> Push) and suggests them automatically.

Challenges & Breakthroughs

The "Diarization" Heuristic

We faced a critical challenge in the AI Labs Meeting Processor: How to distinguish speakers in a browser-based recording without accessing expensive, high-latency server-side pyannote models?

  • The Breakthrough: We engineered a Linguistic Pattern Recognition prompt pipeline. By feeding the raw speech-to-text output into gpt-4o-mini with a specialized system instruction set, we force the model to infer speaker turns based on semantic context (Questions vs. Answers) and syntactic markers.
  • Result: A "Virtual Diarization" that outputs a script-like format (**Speaker A:** ...) with 90% accuracy for 1:1 meetings, running at a fraction of the cost of dedicated audio models.

Agentic Recursive Extraction

Simple regex ($R(x)$) failed to handle complex user intents like: "Plan a launch party for Friday and remind me to buy snacks."

  • The Logic Gate: We implemented a recursive intent classifier.
    1. L1 Analysis: Detect compound intents.
    2. Decomposition: Split the payload into Atomic Units (Task A, Task B).
    3. Entity Resolution: Map "Friday" to 2025-12-19 using relative date parsing relative to user's timezone.
    4. Transaction: Execute $TaskManager.createMany([...]).

The Future: Towards AGI-Lite

We are currently pushing the boundaries of what this MVP can do. The roadmap includes:

  • Local-First Vector Compute: Moving embedding generation to the client side (WASM) for privacy-preserving RAG.
  • Active Graph Connections: Visualizing the links between your Tasks, Notes, and Memories in a 3D knowledge graph.

MemoAI is not just a tool. It is the beginning of Symbiotic Computing—where the line between the user's mind and the machine's memory begins to blur.

Built With

  • claude
  • claudecli
  • claudecodeapi
  • css3
  • elevenlabs-api
  • framer-motion
  • gpt-4o
  • gpt-4o-mini
  • hono
  • html5
  • netlify
  • openai-api
  • raindrop
  • raindrop-framework
  • raindrop-kv
  • raindrop-smartbucket
  • raindrop-smartsql
  • react-18
  • smartbucket
  • smartmemory
  • speech
  • sql
  • tailwind-css
  • typescript
  • vite
  • vultr
  • web
  • workos
+ 117 more
Share this project:

Updates