PAI is an open-source Personal AI Infrastructure that transforms AI into a persistent personal assistant through goal orientation, continuous learning, and six-layer customization. Features include TELOS deep goal understanding, User/System separation, 37 production skills, three-layer memory architecture, 20+ event hooks, and integrated security policies.
Overview#
Personal AI Infrastructure (PAI) is an open-source platform designed to amplify human capabilities through AI. Unlike traditional chatbots (Ask → Answer → Forget) and agentic platforms (Ask → Use tools → Get result), PAI implements a complete loop: Observe → Think → Plan → Execute → Verify → Learn → Improve.
Core Differentiators#
- Goal Orientation: The system's primary focus is on the human operating it and their goals, not the technology itself
- Pursuit of Optimal Output: All operations are dedicated to producing exactly correct output in the current situation and full context
- Continuous Learning: Continuously captures signals about operations, changes made, outputs produced, and user feedback
Target Users#
- Small business owners (automate invoicing, scheduling, customer follow-up)
- Developers (AI coding assistant with persistent memory and custom workflows)
- Managers (optimize team operations)
- Creatives (artists, content creators)
- Researchers and analysts
- Teams (build shared AI infrastructure)
Core Architecture Components#
TELOS Deep Goal Understanding#
Captures user identity through 10 core files:
- MISSION.md, GOALS.md, PROJECTS.md, BELIEFS.md, MODELS.md
- STRATEGIES.md, NARRATIVES.md, LEARNED.md, CHALLENGES.md, IDEAS.md
Six-Layer Customization#
| Layer | Name | Customization |
|---|---|---|
| Layer 1 | Identity | Name, voice, personality traits |
| Layer 2 | Preferences | Tech stack, tool choices |
| Layer 3 | Workflows | Skill execution methods |
| Layer 4 | Skills | Add/remove/modify capability modules |
| Layer 5 | Hooks | Event response handling |
| Layer 6 | Memory | Content capture strategy |
Skill System#
Architecture: CODE → CLI-BASED-TOOL → PROMPT → SKILL - Prioritizes deterministic results
Memory System#
Three-layer architecture: hot/warm/cold, phase-based learning directories, generates learning signals with each interaction
Hook System#
8 event types, responds to session start, tool use, task completion and other lifecycle events
The Algorithm v1.4.0 (v3.0 Core Upgrade)#
- Constraint Extraction: Mechanically extracts all rules, thresholds, and prohibitions from source materials
- Self-Interrogation: Asks 5 structured questions before each build to capture blind spots
- Build Drift Prevention: Re-reads and checks ISC standards before and after generating each artifact
- Verification Rehearsal: Simulates CRITICAL standard violations to confirm verification methods work
- Loop Mode with Parallel Workers: Runs 8 parallel agents to process ISC standards
- Persistent PRDs: Persists requirement documents across sessions
Installation#
System Requirements#
- ✅ macOS (fully supported)
- ✅ Linux (Ubuntu/Debian tested)
- ❌ Windows (not supported)
Prerequisites#
- Bun runtime
- Git
- Claude Code
Install Commands#
git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git
cd Personal_AI_Infrastructure/Releases/v3.0
[ -d ~/.claude ] && mv ~/.claude ~/.claude-backup-$(date +%Y%m%d)
cp -r .claude ~/
cd ~/.claude && ./PAI-Install/install.sh
Launch: pai
Run Algorithm loop mode: algorithm.ts -m loop -a 8
Verification Methods#
| Method | Description |
|---|---|
| CLI | Run commands and check output |
| Test | Execute test suites |
| Static | Static code analysis |
| Browser | Playwright automation verification |
| Grep | Search for required/prohibited patterns |
| Read | Verify file structure |
| Custom | Task-specific verification |
16 PAI Architecture Principles#
- User Centricity - User is the center, infrastructure serves user goals
- The Foundational Algorithm - Scientific method as universal problem-solving loop
- Clear Thinking First - Clarify before writing prompts
- Scaffolding > Model - System architecture matters more than which model
- Deterministic Infrastructure - AI is probabilistic, infrastructure shouldn't be
- Code Before Prompts - If bash can solve it, don't use AI
- Spec / Test / Evals First - Write specs and tests before building
- UNIX Philosophy - Do one thing well, make tools composable
- ENG / SRE Principles - Treat AI infrastructure like production software
- CLI as Interface - CLI is faster, more scriptable
- Goal → Code → CLI → Prompts → Agents - Decision hierarchy
- Skill Management - Modular capabilities, intelligent routing
- Memory System - Capture everything worth knowing
- Agent Personalities - Different jobs need different approaches
- Science as Meta-Loop - Hypothesis → Experiment → Measure → Iterate
- Permission to Fail - Explicit permission to say "I don't know"