Back to Case Studies
Personal AI OSOpen Source · 2026

Mads: Building a Personal AI Operating System

An intelligent Chief of Staff that maintains project awareness, remembers durable context, and orchestrates real tools from one conversational interface.

View Mads on GitHub
Mads personal AI operating system

Overview

One brain. Multiple tools. Infinite workflows.

Most assistants answer one question at a time. Mads is designed to stay aware of the work around the conversation: the active project, pending tasks, earlier decisions, repository state, files, and preferred workflows.

The goal is simple. Instead of opening ten applications and rebuilding context in each one, a user should be able to say, “Continue working on Mads,” and receive a useful next action.

The Problem

Powerful assistants, fragmented workflows.

Knowledge work is distributed across GitHub, local files, Google Workspace, search engines, media services, maps, terminals, and multiple AI interfaces. Every switch loses time, attention, and context.

Conventional chat interfaces make the problem worse by starting each session from zero. They may understand the current prompt, but they do not understand the surrounding project or what should happen next.

Architecture

A single reasoning loop, not a multi-agent system.

Mads deliberately avoids keyword routing and multi-agent orchestration. Gemini receives natural-language tool descriptions, decides which capabilities are needed, executes independent calls concurrently when appropriate, and turns the results into one response.

User
Gemini
Reason
Select
Execute
Respond

Beneath the agent, an MCP manager resolves every requested tool to a provider exposing the same small interface. Whether a capability uses a stdio MCP server, a REST API, SQLite, or a native system command is invisible to the reasoning layer.

Provider Ecosystem

Independent capabilities. One interface.

Filesystem
GitHub
Google Workspace
Spotify
YouTube
Maps
Search
Memory
Planner
Adaptive Learning
Documents
System Tools

Project Awareness

The workspace becomes part of the prompt.

On startup, Mads walks upward from the current directory looking for project markers such as a Git repository, package manifest, or language configuration. Known workspaces activate silently; new ones can be registered with their name and GitHub remote detected automatically.

Once active, filesystem access, tasks, prompts, dashboard data, and planning are scoped to that project. Switching projects rebuilds the tool session around the new workspace.

Advanced Planner

Planning as a contextual system.

The planner combines project awareness, task management, a reusable prompt library, and deterministic prioritization. It ranks work by overdue state, due date, priority, and recency, then surfaces a recommended next task without spending another model call.

A live dashboard joins this plan with the current branch, recent commits, documents, and project progress so recommendations reflect the actual state of development.

Adaptive Intelligence

Learning with an approval boundary.

Imported conversation history moves through an incremental pipeline: read, deduplicate, gate, classify, compress, extract, score, and enqueue. The system identifies durable preferences, decisions, workflows, constraints, and identity facts without injecting raw history into every runtime conversation.

Extract

Find durable signals and cluster repeated facts.

Approve

Keep every candidate pending until the user decides.

Remember

Inject only structured, approved knowledge into future sessions.

A content ledger makes repeated imports free, while atomic file writes prevent concurrent approvals from corrupting the profile.

Design Principles

One Brain

A single Gemini session reasons about every request and chooses the right tools. There is no keyword router or multi-agent hierarchy.

Modular Providers

Every capability implements the same provider contract, so new integrations can be added without changing the reasoning engine.

Context First

Mads discovers the active workspace, repository, project records, tasks, and relevant history before it responds.

Human Approval

Adaptive knowledge remains pending until the user explicitly approves it. Personalization never happens silently.

Safety Model

Useful autonomy with explicit boundaries.

Filesystem and document operations are restricted to configured roots. Destructive system actions require a second, confirmed tool call. OAuth tokens are encrypted at rest, and imported conversations are discarded after candidate extraction.

These controls remain ordinary parts of the tool contract rather than special cases hidden inside the agent loop, keeping the architecture understandable and testable.

Technical Foundation

PythonGemini 2.5Model Context ProtocolPydanticSQLiteJSON persistenceOAuthTool calling

Outcome

From assistant to operating layer.

Mads demonstrates how a personal assistant can move beyond isolated chat interactions. Project context, planning, memory, adaptive learning, and a broad tool ecosystem become parts of one persistent workflow.

The result is not another interface for generating answers. It is an evolving operating system for software engineering, research, automation, and daily knowledge work.

Explore the repository