Skip to content

GreyssonEnterprises/munin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Munin

The open-source mobile AI agent runtime.

Build voice-enabled AI assistants that run natively on phones — with tools, memory, and extensibility. Not a chat wrapper. A real agent runtime.

License: Apache 2.0


Why Munin?

Over 4 billion people access the internet primarily through their smartphones. Today's mobile AI apps are glorified chat windows — no tools, no memory, no extensibility. Munin changes that.

Munin is the open chassis for building AI assistant apps on mobile. Think of it like Kubernetes for container orchestration — Munin gives you the primitives to build any AI assistant experience you want, on any phone, with any LLM provider.

The LLM lives in the cloud. The phone just needs to be a capable orchestrator. A well-architected agent loop on the phone, combined with cloud LLM APIs and phone-native capabilities, creates an assistant as capable as anything on a desktop — with tools a desktop doesn't have: camera, GPS, contacts, calendar, health sensors, NFC, and voice.

What You Get

Capability Description
Agent Loop Full agentic cycle: input → context → LLM → tool calls → results → loop → output
Voice Interaction STT → LLM → TTS pipeline with wake word detection
Tool Framework Plugin architecture for phone-native tools (camera, calendar, contacts, location) and web tools
Tool Marketplace SDK TypeScript SDK for third-party developers to build and distribute custom tools
Local Memory On-device conversation persistence, semantic memory, and user preference storage
Provider Abstraction Connect to any LLM — OpenAI, Anthropic, Google, OpenRouter, Ollama, or any OpenAI-compatible endpoint
Model Router Complexity-based routing (L1–L4) with configurable model mapping
Privacy Controls Audit logs, memory dashboard, data export, deletion — fully inspectable
Geofencing Location-based behavior triggers and quiet zones
Wake Word On-device wake word detection framework
Authentication Login/signup scaffolding with OAuth integration patterns
Bring Your Own Key Use any LLM provider with your own API key — no account with us required

What You Can Build

Clone Munin, provide your own API key, and you can:

  • Build and run a working voice AI assistant on iOS or Android
  • Connect to any LLM provider (OpenAI, Anthropic, Google, Ollama, etc.)
  • Have persistent conversation memory stored locally on-device
  • Use the action framework for reminders, calendar, contacts, and more
  • Build and install custom tools via the TypeScript SDK
  • Set up wake word activation for hands-free use
  • Configure geofencing quiet zones
  • Give users full privacy controls over their data

Architecture at a Glance

┌─────────────────────────────────────────────────────┐
│                    MUNIN (on device)                 │
│                                                     │
│  App Shell ─── Voice Loop ─── Action Framework      │
│  Local Storage ─── Memory Framework                 │
│  Wake Word ─── Geofencing ─── Privacy Controls      │
│  Provider Abstraction ─── Tool Marketplace SDK      │
│  Basic Model Router ─── Auth Framework              │
└───────────────────────┬─────────────────────────────┘
                        │ HTTPS
                        ▼
              ┌──────────────────┐
              │   LLM Providers  │
              │   (Your Choice)  │
              └──────────────────┘

All data stays on the device. The only external communication is from the device directly to the LLM provider the user configures. There is no intermediary server.

For a deep dive into every component, see the Developer Architecture Guide.

Quick Start

iOS (Primary Platform)

Prerequisites: Xcode 16+, iOS 17+ target, macOS 14 Sonoma+

# Clone the repo
git clone https://github.com/greysson-enterprises/munin.git
cd munin

# Open in Xcode
open ios/Munin.xcodeproj

Select the Munin scheme, choose an iOS 17+ simulator, and hit ⌘R.

Or build from the command line:

xcodebuild \
  -scheme Munin \
  -project ios/Munin.xcodeproj \
  -destination 'platform=iOS Simulator,name=iPhone 16e' \
  build

Android

The Android app lives in android/ and uses Kotlin + Jetpack Compose. See android/README.md for setup.

Tool SDK

Build custom tools for the Munin marketplace:

bun install -g @munin/cli
munin-tools init my_tool
cd my_tool
bun install && bun test

See the Tool SDK documentation for the full guide.

Running Tests

# Full iOS test suite
xcodebuild test \
  -scheme Munin \
  -project ios/Munin.xcodeproj \
  -destination 'platform=iOS Simulator,name=iPhone 16e'

Project Structure

munin/
├── ios/                  # iOS app (Swift 6, SwiftUI, GRDB)
│   ├── Munin/
│   │   ├── App/          # AppState — shared observable state, DI root
│   │   ├── Core/
│   │   │   ├── Agent/    # AgentLoop, ContextManager
│   │   │   ├── LLM/      # LLMProvider protocol + provider implementations
│   │   │   ├── Tools/    # AgentTool protocol + all tool implementations
│   │   │   ├── Storage/  # GRDB-backed stores (conversations, messages, memory)
│   │   │   ├── Memory/   # Memory system (extraction, retrieval, semantic search)
│   │   │   ├── Voice/    # SpeechRecognizer, SpeechSynthesizer, VoiceSessionManager
│   │   │   ├── Permissions/ # PermissionManager, audit log
│   │   │   ├── Marketplace/ # Tool marketplace integration
│   │   │   ├── Sync/     # Cloud sync layer
│   │   │   └── ...
│   │   └── UI/           # SwiftUI views (Chat, Settings, Voice, Camera, ...)
│   └── MuninTests/ # Test suite
├── android/              # Android app (Kotlin, Jetpack Compose, Room)
├── sdk/                  # Tool Marketplace SDK
│   ├── typescript/       # @munin/tool-sdk
│   ├── cli/              # @munin/cli
│   ├── examples/         # Example tools (weather, dictionary, unit converter)
│   └── schema/           # JSON Schema for tool manifests
├── docs/                 # Documentation
│   ├── architecture-guide.md  # Comprehensive developer guide
│   ├── SPEC.md           # Technical specification
│   ├── ROADMAP.md        # Project roadmap and milestones
│   ├── decisions/        # Architecture Decision Records
│   └── specs/            # Feature specifications
├── design/               # Design assets
├── CONTRIBUTING.md       # How to contribute
├── PRIVACY.md            # Privacy policy
└── README.md             # You are here

Documentation

Document Description
Architecture Guide Deep dive into every Munin component, the event loop, data model, and extension points
Technical Spec Full technical specification with data schemas and security model
Roadmap Development phases, milestones, and competitive landscape
Contributing Build instructions, code style, PR process
Privacy Policy What data Munin touches (spoiler: none leaves your device)
Tool SDK Build custom tools for the Munin marketplace
Architecture Decisions ADRs explaining major design choices

Design Principles

  1. Mobile-first, not mobile-adapted — every decision optimized for phone constraints and capabilities
  2. Non-technical users first — designed for people who don't know what an API key is
  3. Bring Your Own Brain — multi-provider LLM support, zero lock-in
  4. Privacy by default — memory stays on-device, tools run locally when possible
  5. Works on bad connections — graceful degradation, offline memory, queued operations
  6. Affordable — BYOK is free forever; premium is regionally priced

Tech Stack

iOS

Layer Technology
Language Swift 6 (strict concurrency)
UI SwiftUI
Persistence SQLite via GRDB.swift (single dependency)
Networking URLSession + async/await
Speech Apple Speech framework (STT) + AVSpeechSynthesizer (TTS)
Vision AVFoundation + Vision framework (camera, OCR)
Minimum target iOS 17, iPhone SE (2020)

Android

Layer Technology
Language Kotlin
UI Jetpack Compose
Persistence SQLite via Room
Networking Ktor / OkHttp

iOS and Android are native implementations of the same specification — same agent loop protocol, same tool interface contracts, same data model, different idiomatic implementations. No cross-platform frameworks.

Contributing

We welcome contributions! See CONTRIBUTING.md for build instructions, code style, and the PR process.

Branch naming: feature/, fix/, docs/ prefixes. All PRs are squash-merged.

License

Apache 2.0 — see LICENSE for details.

Tools built with the Tool SDK are licensed independently by their authors.

About

The open-source mobile AI agent runtime. Build voice-enabled AI assistants that run natively on phones — with tools, memory, and extensibility.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors