All docs

Storage and privacy

Munin is designed so core assistant behavior works locally. This page documents storage locations and network boundaries from the app code.

SQLite chat store

ChatDb stores conversations and messages in munin.db through sqflite.

Tables:

  • conversations: id, title, created_at, updated_at.
  • messages: id, conversation_id, sender, text, thinking, image_path, sources, created_at.

Foreign keys are enabled. Deleting a conversation cascades to its messages.

ChatRepository wraps ChatDb, mints UUID ids, derives local titles, persists assistant replies, and deletes attached image files when chats are removed.

Attached images

Images attached to messages are saved through ImageStore. Message rows store only the image path. When a conversation is deleted, the repository asks ImageStore to delete image files referenced by that conversation.

If the active model does not support vision, ChatController refuses the image and persists a normal assistant note explaining the limitation.

Vector memory store

FlutterGemmaMemoryService creates munin_memory.db in the application documents directory. It stores embeddings and metadata for semantic recall.

The vector memory database is local. Embedding generation is local. Similarity search is local.

Profile facts

Durable user facts are stored in SharedPreferences under StorageKeys.memoryFacts. These facts are always injected into the prompt because they represent stable personalization.

The user can add, remove, search, or clear these facts on the Memory settings page.

Settings

SharedPreferences stores small app state:

  • Onboarding complete.
  • Model installed state and download progress.
  • Cellular download preference.
  • Web search default.
  • Thinking mode default.
  • Autonomous search.
  • Deep reasoning.
  • Performance mode.
  • Haptics.
  • Wake word state and phrase.
  • Agent tools default.
  • MCP server configs.
  • Selected skills.
  • Custom skills.

Storage keys are centralized in StorageKeys.

Workspace files

WorkspaceStore writes workspaces to normal files under application documents. Each workspace has metadata, plan JSON, README markdown, append-only logs, and generated artifacts.

File writes sanitize artifact names with path.basename so a generated file name cannot escape the workspace folder.

Network boundaries

The app reaches the network in these areas:

  • Model downloads from configured model URLs.
  • DuckDuckGo web search when search is enabled or routed.
  • Page fetches for search grounding.
  • Update checks and release links from the About area.
  • Fetching a custom SKILL.md from a user-provided URL.
  • MCP server calls for user-configured servers and enabled tools.

Chat history and memory are not sent to DuckDuckGo. Search sends query text. MCP tools receive the input passed to that tool by the agent after the user has configured and enabled the tool.

Device actions

Native device actions use platform channels. Many actions open system UI for user confirmation:

  • Email.
  • SMS.
  • WhatsApp.
  • Calendar event creation.
  • Share sheet.

This avoids silent sending for communication workflows.

Destructive actions

Settings exposes destructive actions:

  • Clear all chats: deletes conversations and attached chat data.
  • Wipe memory: clears learned profile facts and memory as wired by the controller.
  • Delete model: removes model files and sends the user back through model setup.

Each destructive action is grouped in the Data section and uses confirmation UI.