MeghaOS remembers. After each conversation, the agent extracts durable facts and stores them in a local vector database, then injects relevant ones into the model’s prompt on future queries, so responses stay personal and contextual across sessions.

Storage

Memory is backed by ChromaDB, an embedded vector database with a SQLite backend, stored on your device. The agent’s memory manager wraps it and manages two collections:
The memory store is initialized when the agent starts. If ChromaDB fails to initialize, the agent exits with a clear error in its logs rather than hanging during startup.

The retrieval loop

  1. On each /chat, memory.get_context(query) runs a semantic search over stored facts.
  2. The most relevant facts are injected into the LLM system prompt.
  3. After responding, a background task asks the LLM to extract new facts from the exchange and writes them back to the vector store.
Because retrieval is semantic (embedding similarity), the agent surfaces relevant memories even when the wording differs from how they were originally stored. The store itself stays on your device. The model calls go to the model selected in Settings → Configuration: with a hosted model selected, the facts added to a prompt travel with that request, and the background extraction is a request to that model too.

Fuzzy recall

“What’s my sister’s birthday?” matches a stored fact phrased entirely differently.

Scales quietly

Facts accumulate over time; only the top matches enter the prompt, keeping it small.
  • LongTermMemory: higher-level memory orchestration.
  • WorkflowContext: the per-workflow shared variable context used for step-to-step $variable substitution (distinct from long-term memory).