Technical Architecture

Built for Apple Silicon.

SwiftUI front end. MLX inference engine. SQLite memory. Keychain secrets. No server in between.

How It Fits Together

SwiftMaestro
Self-Owned AI Operating System
User Space
SwiftUI Chat MaestroDB MaestroDAM MaestroDocs MaestroBooks Mail Calendar Notes Shortcuts
Agent Runtime
Maestro Agent Coder Agent Searcher Agent Swift Helper
SwiftMaestro Kernel
MLX Engine
Apple Silicon GPU compute
MaestroTools
System calls for files, Apple apps, shell
MCP Bridge
Plugin drivers for external tools
Persistent Memory
Memory Orchestrator
SQLite · FTS5 · sqlite-vec
memory · knowledge · context · skill
BEADS Workflow Engine
Hardware & External
Apple Silicon GPU HuggingFace Hub LM Studio Ollama OpenAI APIs macOS Keychain
Data flow: User input → Agent Runtime → Kernel dispatches MLX / Tools / MCP → Memory persists context → Output returns to User Space
LanguageSwift 6.3, SwiftUI
PlatformmacOS 14.0+ (Apple Silicon native)
InferenceMLX — native Apple Silicon GPU acceleration
ModelsLocal files or HuggingFace Hub download
StorageEmbedded SQLite + FTS5 + sqlite-vec
SecuritymacOS Keychain · hardened runtime · signed
DistributionSigned beta .dmg installer

Memory Model

How SwiftMaestro persists context across sessions and shares it with other local AI tools.

SwiftMaestro stores memory in a shared local filesystem tree under ~/.ai-context/memory, addressable through a maestro:// URI scheme. Conversations, knowledge, session context, and learned skills each live in their own namespace. An FTS5 index built with GRDB makes search sub-millisecond, while the Markdown and JSON files remain human-readable and editable.

How does this compare to BEADS? We wrote a detailed comparison of SwiftMaestro's memory system against BEADS, Steve Yegge's distributed graph issue tracker for coding agents.

Read the comparison View Markdown

Key Components

Where the work happens inside the app.

💬

ChatView / MessageBubble

Main chat UI with fixed auto-scroll, markdown rendering, and code-block support. Lives in Sources/Views/.

⚙️

ChatViewModel

Chat logic, streaming, system prompt, file attachments, and agent coordination. Lives in Sources/ViewModels/ChatViewModel.swift.

🧠

MLXInferenceEngine

Primary native MLX inference path. In-process, no server. The sole generation backend. Lives in Sources/Engine/MLXInferenceEngine.swift.

🛠️

MaestroTools

Native in-process tools for memory, files, Apple integrations, SQLite, shell, and more. Lives in Sources/Engine/MaestroTools*.swift.

📑

Document Indexing

Chunk-based document RAG with index_document, search_chunks, and read_chunk. Returns exact original text, not summaries. Lives in Sources/Engine/MaestroTools+Indexing.swift.

🎙️

WhisperKitService

Local speech-to-text: model lifecycle, recording, and streaming transcription. Lives in Sources/Services/WhisperKitService.swift.

🧩

ModelCatalog

Model list, default model, and local/Hub/remote resolution. Lives in Sources/Engine/ModelCatalog.swift.

🔒

KeychainService / SecretsStore

Keychain-backed secrets and secret:// resolution with redaction. Lives in Sources/Services/.

Business Integration

📦 Simple Deployment

Single installer per Mac. No IT infrastructure beyond Macs and a local model server (shared or per-seat).

🔒 Data Isolation

Each installation is fully self-contained. No shared databases, no cloud state. Meets strict data sovereignty requirements.

🎛️ Model Flexibility

Choose your LLM — Qwen, Llama, Gemma, Mistral — hosted on-premises. Full control over capabilities and training data.

⚙️ Customisation

Pre-configure agents with business-specific rules, knowledge, and workflows, then distribute to your team.

See the Source

SwiftMaestro is source-available (PolyForm Noncommercial). Read the code, build it yourself for personal use, or contribute. Commercial use requires a license from woodsee.

View on GitHub