Skip to content
Dizzy918Public

About

Private, local-first AI assistant for macOS: chat with your documents, agents, voice and vision. No cloud, no telemetry.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

67 Commits

Folders and files

Repository files navigation

LocalMind

The private AI assistant that reads your documents, remembers your conversations, and works while you sleep β€” without a single byte leaving your Mac.

macOS Swift License Build

Download Β· Privacy Β· Roadmap Β· Changelog Β· vs. Alternatives Β· Community Packs

Why LocalMind

Plenty of apps run AI models on a Mac. LocalMind is what goes on top of them: a native assistant layer that makes local models genuinely useful.

  • πŸ“š Chat with your documents β€” drop in PDFs or watch a whole folder; answers come back with citations, OCR included, embedded entirely on-device
  • πŸ€– Agents, teams & debate β€” reusable specialist personas that can answer in parallel, critique each other over rounds, and chain into pipelines (draft β†’ review β†’ revise)
  • ⏰ Automations β€” "every morning at 9, summarize what's new in my documents" β€” results arrive as unread conversations
  • 🧠 Cross-chat memory β€” opt-in recall of your past conversations, embedded and searched locally
  • πŸŽ™οΈ Hands-free voice mode β€” speak, pause, hear the answer, repeat β€” recognition and speech are all on-device
  • ⌨️ Ask from anywhere β€” a global hotkey summons a floating bubble over any app; a Services menu entry sends selected text straight to a chat

It's a native Swift/SwiftUI app (no Electron), MIT-licensed, with no telemetry, no account, and no cloud fallback β€” every network connection the app can make is documented in PRIVACY.md. It works with the backends you already have: Ollama, LM Studio, Apple Intelligence, or any OpenAI-compatible server.

Full feature list

Expand β€” everything LocalMind does
  • Multiple AI Backends β€” Apple Intelligence, Ollama, LM Studio, and any OpenAI-compatible server
  • Auto-detection β€” automatically discovers running AI servers and connects
  • Modern Chat UI β€” centered content column, suggestion chips, hover actions, markdown rendering
  • Message Editing β€” edit past user messages to fork the conversation from that point
  • Regenerate Responses β€” get a different answer with one click
  • Pin & Archive β€” pin important conversations to the top, archive old ones
  • Multi-format Export β€” Markdown, JSON, HTML, or plain text
  • Token Counter β€” approximate token count shown per conversation
  • Voice Input β€” speech-to-text with live waveform visualization and auto-punctuation
  • Text-to-Speech β€” read AI responses aloud
  • Vision β€” drag & drop or paste images for analysis (requires a vision model like LLaVA)
  • File Attachments β€” drop PDFs and text files directly into the chat
  • Chat with Your Documents β€” add PDFs, Word/EPUB/HTML/RTF, source code, and images to a local knowledge base; relevant passages are retrieved, cited, and grounded into answers. Scanned PDFs and images are read with on-device OCR (Vision). Embeds on-device via Apple's NaturalLanguage by default, or via Ollama's nomic-embed-text for higher-quality retrieval β€” nothing is uploaded
  • Agents β€” create reusable AI personas, each with its own instructions, pinned backend & model, creativity level, and tool/knowledge-base access; assign one per conversation. Ships with starter agents (Researcher, Coder, Writer, Critic)
  • Projects β€” group conversations into workspaces that carry defaults: a project picks the agent, knowledge collections, and standing context every chat inside inherits
  • Agent Pipelines β€” chain agents into reusable workflows (Writer drafts β†’ Critic reviews β†’ Writer revises); each step transforms the previous step's output, and the run saves as a conversation
  • Automations β€” schedule a prompt to run daily or on weekdays; the answer arrives as an unread conversation ("every morning, summarize what's new in my documents")
  • Agent Team β€” send one prompt to up to 4 agents at once and watch them answer in parallel, side by side β€” even across different backends (Ollama next to Apple Intelligence); then synthesize their answers into one, or continue any answer as a normal chat
  • Auto-Routing β€” flip a conversation to "Auto" and each message is classified and routed to the best-fitting agent; every answer is labeled with the agent and model that produced it
  • Debate Mode β€” after a team run, agents read each other's answers, critique them, and revise over multiple rounds; an impartial moderator can declare a winner
  • Background Generation β€” switching conversations no longer cancels an answer; chats generate in parallel, with a spinner in the sidebar while streaming and an unread dot when a reply finished elsewhere
  • Visible Reasoning β€” thinking models' chain-of-thought streams into a collapsed πŸ’­ disclosure instead of being discarded, with a live "Thinking…" state
  • Smart Context β€” messages are selected by token budget (not just count), and a rolling summary keeps the gist of older messages in context on long conversations
  • Cross-Chat Memory β€” opt-in recall of relevant exchanges from your other conversations, embedded and searched entirely on-device
  • In-App Model Manager β€” pull Ollama models with a progress bar, delete them, and browse any backend's catalogue without touching a terminal (Settings β†’ Providers)
  • Hands-Free Voice Mode β€” a full spoken conversation loop: talk, pause, and the answer is read back to you, then it listens again β€” all on-device
  • Automation β€” Shortcuts actions that return the answer to your workflow, plus localmind://ask?prompt=…&agent=Coder for scripts and other apps
  • Ask LocalMind Anywhere β€” select text in any Mac app and right-click β†’ Services β†’ "Ask LocalMind" to send it straight to a chat
  • Floating Bubble β€” the global-hotkey quick-ask now routes through the same engine as the main window, so its answers get agents, memory, and context β€” and keep generating after you dismiss it
  • Knowledge Collections β€” group documents into named sets and point each agent at just the collections it needs
  • Watched Folders β€” point the knowledge base at a folder and its files are indexed and kept in sync automatically as they change on disk
  • Per-Message Stats β€” every answer shows the model, tokens/sec, and generation time
  • Agent Import/Export β€” share agent packs as JSON files (Settings β†’ Agents)
  • Per-Agent Tool Allowlists β€” limit an agent to specific MCP tools, or disable tools for it entirely; pre-approved tools also work in team runs
  • Per-Conversation Model & Temperature β€” pin a specific model or creativity level for one chat without changing your global default
  • Compare Models Side-by-Side β€” regenerate any answer with another model and keep the one you prefer
  • Conversation Branches β€” editing or regenerating saves the previous version so you can restore it
  • Tool-Call Approval & Audit β€” approve each MCP tool call before it runs and review a log of what the AI did
  • Full-Text Search β€” multi-word search across all conversation content, not just titles
  • Find in Conversation β€” ⌘F inside any chat jumps between matches with the active one spotlighted
  • Prompt Library β€” save prompts you reuse and insert them from the input bar's book button
  • MCP Server Catalog β€” 27 one-click servers across files, dev, web, productivity, communication, and Apple apps: filesystem, Git, GitHub, PostgreSQL, SQLite, Kubernetes, web fetch, DuckDuckGo & Brave search, browser automation (Playwright), YouTube transcripts, Google Maps, Gmail, Google Calendar, Google Drive, Notion, Slack, Todoist, Apple Suite (Mail/Messages/Calendar/Reminders/Contacts), Apple Reminders, Apple Shortcuts, AppleScript, Apple Notes, Obsidian vaults, memory, sequential thinking, and time. You supply your own API keys/OAuth β€” nothing is brokered through a cloud
  • Stop All β€” when several chats are generating at once, the sidebar shows a count with a one-click kill switch
  • Custom Tools β€” create reusable AI tools with custom system prompts
  • Menu Bar App β€” quick access from the menu bar without switching windows
  • Global Hotkey β€” summon a floating bubble window from anywhere
  • Focus Timer β€” built-in Pomodoro-style focus sessions
  • Draft Recovery β€” unsent messages are auto-saved and restored
  • Conversation Compression β€” large conversations are automatically gzip-compressed on disk
  • Memory Pressure Monitoring β€” pauses background polling and notifies you when system memory is low
  • Dark & Light Mode β€” full theme support with one-click toggle
  • Fully Private β€” everything runs locally, data stored in ~/Library/Application Support/LocalMind/

Screenshots

Add screenshots to docs/images/ and link them here.

Requirements

  • To run: macOS 15 (Sequoia) or later. The Apple Intelligence backend additionally requires macOS 26+ on supported hardware; every other backend works on macOS 15+.
  • To build from source: full Xcode 26 or later (download from the App Store). The Apple Intelligence backend builds against the Foundation Models SDK introduced in Xcode 26.
  • One of the following AI backends:
    • Ollama (recommended)
    • LM Studio
    • Any OpenAI-compatible local server
    • Apple Intelligence (on supported hardware)

Getting Started

1. Clone the repository

git clone https://github.com/Dizzy918/LocalMind.git
cd LocalMind

2. Build and Run

Option A: Using Xcode (GUI)

open LocalMind.xcodeproj

Select the LocalMind scheme, choose My Mac as the destination, and hit Cmd + R.

Option B: Using Command Line

# Build the app
xcodebuild -project LocalMind.xcodeproj -scheme LocalMind -configuration Debug -destination 'platform=macOS' build

xcodebuild builds but doesn't launch the app β€” open the resulting LocalMind.app from ~/Library/Developer/Xcode/DerivedData/, or just use Option A to build and run from Xcode.

No external dependencies β€” the project uses only Apple frameworks.

3. Set up an AI backend

The app will auto-detect any running local AI server. Pick whichever fits your needs:

Option A: Ollama (recommended for most users)

Best for: easy setup, wide model selection, terminal-friendly.

# Install Ollama
brew install ollama

# Start the server (leave running in a background terminal)
ollama serve

# Pull a model (in another terminal)
ollama pull qwen3:8b

Recommended models by use case:

Use case Model Size Notes
General chat (balanced) qwen3:8b ~5 GB Default. Fast, smart, great for most tasks
Faster, smaller llama3.2:3b ~2 GB Quick on lower-end Macs
Coding qwen2.5-coder:7b ~4.5 GB Specifically tuned for code
Strong reasoning qwen3:14b ~9 GB Slower but more capable
Vision (images) llava:7b ~4.5 GB Required for image analysis
Highest quality qwen3:32b ~20 GB Needs M2 Pro / M3 Pro+ with 32 GB+ RAM

Hardware guidance:

  • 8 GB RAM: stick to 3B–4B models (llama3.2:3b, phi3:mini)
  • 16 GB RAM: 7B–8B models work comfortably
  • 32 GB RAM: can run 14B–20B models
  • 64 GB+ RAM: 32B–70B models become viable

Option B: LM Studio (GUI alternative)

Best for: model discovery via a UI, easy switching between models.

  1. Download from lmstudio.ai
  2. Search and download a model (e.g. Llama 3.2 8B Instruct)
  3. Go to the Local Server tab β†’ load your model β†’ click Start Server
  4. LocalMind will auto-detect it on http://localhost:1234

Option C: Apple Intelligence (zero setup)

Best for: Apple Silicon Macs with macOS 26+, when you want something that just works.

  • No installation needed β€” uses the on-device Foundation Models
  • Lower quality than 7B+ Ollama models, but instant and battery-friendly
  • Requires Apple Intelligence to be enabled in System Settings

Option D: Any OpenAI-compatible server

LocalMind speaks the OpenAI API spec, so it works with:

Point LocalMind at the server's base URL in Settings β†’ AI Backend.

Vision (Image Analysis) Setup

To analyze images, you need a vision-capable model:

ollama pull llava:7b
# or for higher quality:
ollama pull llava:13b

Then in LocalMind:

  1. Click the sidebar model picker, select llava:7b
  2. Drag an image into the chat (or paste with Cmd + V)
  3. Ask a question about the image

Performance Tips

  • First message takes 10-30 seconds while the model loads into RAM. Subsequent messages are instant.
  • LocalMind keeps Ollama models loaded for 1 hour after the last message to avoid reload latency
  • For best speed, close other RAM-heavy apps (Chrome, Docker) before chatting
  • M-series Macs are dramatically faster than Intel Macs due to unified memory architecture

Once a backend is running, LocalMind will detect it automatically and show a green status indicator in the sidebar.

Project Structure

LocalMind/
β”œβ”€β”€ LocalMindApp.swift          # App entry point, window setup, menu bar
β”œβ”€β”€ ContentView.swift           # Main layout (sidebar + chat)
β”œβ”€β”€ Config/
β”‚   └── Info.plist              # URL scheme + Services menu registration
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ ChatMessage.swift       # Message model with image/file/reasoning support
β”‚   β”œβ”€β”€ Conversation.swift      # Conversation model with emoji/title/project
β”‚   β”œβ”€β”€ AIParameters.swift      # Temperature, top-p, context settings
β”‚   β”œβ”€β”€ Agent.swift             # AI personas (prompt + backend/model + capabilities)
β”‚   β”œβ”€β”€ Project.swift           # Workspaces with inherited defaults
β”‚   β”œβ”€β”€ AgentPipeline.swift     # Chained multi-agent workflows
β”‚   β”œβ”€β”€ PromptSnippet.swift     # Saved reusable prompts
β”‚   β”œβ”€β”€ CustomTool.swift        # User-defined AI tools
β”‚   β”œβ”€β”€ FocusSession.swift      # Focus timer sessions
β”‚   └── TaskItem.swift          # Task definitions
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ AIServiceProtocol.swift # Backend protocol + AIServiceError
β”‚   β”œβ”€β”€ AIServiceManager.swift  # Auto-detection, polling, cross-backend routing
β”‚   β”œβ”€β”€ ChatGenerationService.swift # Background generation, auto-routing, rolling summary
β”‚   β”œβ”€β”€ ChatMemoryStore.swift   # On-device cross-conversation memory
β”‚   β”œβ”€β”€ ScheduleService.swift   # Scheduled/automated runs
β”‚   β”œβ”€β”€ OllamaService.swift     # Ollama API client + model pull/delete
β”‚   β”œβ”€β”€ OpenAICompatibleService.swift  # OpenAI-compatible API client
β”‚   β”œβ”€β”€ AppleFoundationModelService.swift  # Apple Intelligence
β”‚   β”œβ”€β”€ KnowledgeBaseStore.swift # Documents, collections, OCR, watched folders
β”‚   β”œβ”€β”€ MCPCatalog.swift        # 27 one-click MCP server presets
β”‚   β”œβ”€β”€ DataStore.swift         # JSON persistence with compression + search
β”‚   β”œβ”€β”€ VoiceManager.swift      # Speech recognition + TTS
β”‚   β”œβ”€β”€ HotkeyManager.swift     # Global keyboard shortcut
β”‚   β”œβ”€β”€ BubbleWindowController.swift  # Floating bubble window
β”‚   └── MemoryPressureMonitor.swift   # System memory monitoring
β”œβ”€β”€ Theme/
β”‚   β”œβ”€β”€ Theme.swift             # Design system (colors, typography, spacing)
β”‚   └── Components.swift        # Reusable UI components (bubbles, reasoning, status)
└── Views/
    β”œβ”€β”€ ChatView.swift          # Chat interface with streaming + ⌘F search
    β”œβ”€β”€ AgentTeamView.swift     # Parallel agents, debate rounds, moderator, synthesis
    β”œβ”€β”€ AgentSettingsView.swift # Create/edit/manage agents + pipelines
    β”œβ”€β”€ ProjectEditorView.swift # Project workspace editor
    β”œβ”€β”€ PipelineViews.swift     # Pipeline editor + runner
    β”œβ”€β”€ AutomationsSettingsView.swift # Scheduled-run editor
    β”œβ”€β”€ ModelManagerView.swift  # In-app model pull/delete/browse
    β”œβ”€β”€ VoiceModeView.swift     # Hands-free voice conversation
    β”œβ”€β”€ SidebarView.swift       # Navigation, projects, conversation history
    β”œβ”€β”€ SettingsView.swift      # Preferences panel
    β”œβ”€β”€ BubbleView.swift        # Floating window view
    └── MessageMarkdownView.swift  # Markdown message renderer

Keyboard Shortcuts

Shortcut Action
Cmd + Return Send message
Cmd + F Find in conversation
Cmd + V Paste image from clipboard
Up / Down Navigate prompt history
Ctrl + Space Toggle floating bubble (global)

Configuration

All settings are available in the app's Settings panel (Cmd + ,):

  • AI Backend β€” choose preferred backend or let auto-detect decide, and pull/delete models in-app
  • Model Selection β€” pick from available models on your server
  • Agents β€” create and manage AI personas and pipelines; assign one from the chat header, or run several at once via "Ask multiple agents"
  • Automations β€” schedule prompts to run on a timetable
  • System Prompt β€” customize the default AI personality
  • Temperature / Top-P β€” tune generation parameters
  • Context Limit β€” control how many messages are sent as context (a rolling summary preserves older ones)
  • Memory β€” opt in to cross-conversation recall
  • Auto-Read Responses β€” toggle automatic text-to-speech

Automation & integration

  • Shortcuts β€” three actions, and unlike the URL scheme they hand the result back to your shortcut:
    • Ask LocalMind β€” prompt (plus an optional agent) in, the answer out, so it can feed the next step. Runs through the normal pipeline, so it gets the agent's persona, your knowledge base, memory, and tools. "Save to History" is on by default; turn it off for shortcuts that run on a loop.
    • Search LocalMind Documents β€” returns the passages that match, without generating an answer
    • New LocalMind Chat β€” opens a fresh conversation
  • URL scheme β€” localmind://ask?prompt=Summarize%20this&agent=Coder (or localmind://new) from scripts or other apps. Fire-and-forget: it starts the ask but returns nothing, so prefer the Shortcuts actions when you need the answer.
  • Services menu β€” select text in any app β†’ right-click β†’ Services β†’ "Ask LocalMind"
  • See docs/DISTRIBUTION.md for building signed releases and publishing a Homebrew cask

Running Tests

Unit tests live in Tests/LocalMindTests/ and UI smoke tests in Tests/LocalMindUITests/ β€” both wired into the LocalMind scheme, no setup needed. See Tests/README.md for the file-by-file breakdown.

The suite can't cover anything needing a live model, a real MCP server, or the system's Shortcuts database β€” docs/QA-CHECKLIST.md is the manual pass for those, run before tagging a release.

xcodebuild test \
  -project LocalMind.xcodeproj \
  -scheme LocalMind \
  -destination 'platform=macOS'

Tests cover the core models, DataStore (save / load / search / compression), and AIServiceError descriptions.

Data Storage

All data is stored locally at:

~/Library/Application Support/LocalMind/
β”œβ”€β”€ conversations/    # Chat history (JSON, gzip-compressed if >50KB)
β”œβ”€β”€ focus_sessions/   # Focus timer records
└── custom_tools/     # User-defined tools

No data ever leaves your machine.

License

MIT License. See LICENSE for details.

About

Private, local-first AI assistant for macOS: chat with your documents, agents, voice and vision. No cloud, no telemetry.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages