Life OS Layer
Relevant source files
The following files were used as context for generating this wiki page:
The Life OS Layer is a specialized module within Archivum designed to transform a standard knowledge base into a structured "second brain." It provides a system for capturing and managing daily notes, tasks, projects, decisions, and people. Unlike the general wiki which handles unstructured markdown, the Life OS layer utilizes normalized SQLite tables to provide high-performance queries and API access while maintaining portability through associated markdown pages.
Sources: Progress.md:7-13, Progress.md:46-50, archivum-prd-v1.0.md:214-220
Architecture and Data Management
The Life OS layer operates on a dual-storage principle: structured data is stored in SQLite for reliable querying via the REST API and MCP server, while portable content resides in the markdown wiki. This architecture allows AI agents to interact with structured entities without scraping UI state or parsing complex markdown files.
Sources: Progress.md:46-50, apps/backend/archivum/db/sqlite.py:157-220
Entity Schema
The following table summarizes the primary data models used within the Life OS layer as defined in the SQLite schema:
| Entity | Table Name | Key Fields | Purpose |
|---|---|---|---|
| Project | life_projects | key, name, status, page_slug | Tracks long-term initiatives and links them to wiki pages. |
| Task | life_tasks | title, status, project_key, due_date | Manages actionable items linked to projects or pages. |
| Decision | life_decisions | title, decision, rationale, decided_at | Logs historical choices and their justifications. |
| Person | life_people | name, page_slug, summary | Maintains a directory of contacts and relationships. |
| Area | life_areas | key, name, page_slug | Represents broad categories of responsibility (PARA method). |
| Activity | agent_activity | actor, action, target_id, metadata | A ledger for tracking agent-initiated changes. |
Sources: apps/backend/archivum/db/sqlite.py:157-221
Data Flow for Life OS Operations
The flow below illustrates how a Life OS entity (such as a project) is registered through the system, affecting both the structured database and the flat-file wiki.
This diagram shows the synchronization between the structured Life OS tables and the core Archivum indexing services.
Sources: apps/backend/archivum/life_os/service.py:11-23, apps/backend/archivum/mcp/server.py:100-112
Core Components
Daily Notes
The Daily Note system is a foundational workflow that captures activity for a specific date (YYYY-MM-DD). The system ensures that a daily note exists by either retrieving the existing markdown page or generating a new one with standardized frontmatter and headings.
- Logic:
ensure_daily_notechecks the database for a page with the slugdaily-YYYY-MM-DD. If missing, it creates a new page. - Interface: Accessed via
POST /api/life/dailyor thelife_daily_noteMCP tool.
Sources: apps/backend/archivum/life_os/service.py:26-55, apps/backend/archivum/mcp/server.py:126-130
Project and Task Management
Projects and tasks are tightly integrated. Projects serve as containers for work, while tasks represent specific actions.
This ER diagram shows the relationship between projects and tasks within the SQLite schema.
Sources: apps/backend/archivum/db/sqlite.py:157-183
- Project Registration: The
register_projectservice creates a record inlife_projectsand generates a canonical project page in the wiki. - Task Creation: The
create_life_taskfunction allows tasks to be linked to aproject_keyor a specificpage_slug.
Sources: apps/backend/archivum/life_os/service.py:11-23, apps/backend/archivum/db/sqlite.py:539-555
API and Agent Integration
The Life OS Layer provides specialized endpoints and MCP tools for programmatic interaction.
MCP Tools for Life OS
| Tool Name | Parameters | Description |
|---|---|---|
life_daily_note | day (optional) | Returns or creates the daily note for a date. |
life_register_project | key, name, summary, status | Registers a project and creates its wiki page. |
life_create_task | title, project_key, page_slug, due_date | Creates a task linked to an entity. |
Sources: apps/backend/archivum/mcp/server.py:126-157
Frontend Workflows
The frontend provides dedicated routes for Life OS entities, grouping them under "Workflows" in the application shell. This includes pages for Daily, Projects, and Tasks.
The sequence above describes the interaction when a user opens the Daily Page in the browser.
Sources: apps/frontend/src/life-pages.test.tsx:12-45, apps/frontend/src/api.test.ts:250-264
Summary
The Life OS Layer serves as the organizational framework for Archivum, bridging the gap between a collection of notes and a functional productivity system. By maintaining structured data for projects, tasks, and daily logs in SQLite while keeping content in markdown, it ensures the system remains both highly queryable for AI agents and fully portable for the user.