Skip to content

danielmiessler/PAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

99 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PAI Logo

PAI - Personal AI Infrastructure

Open-source personal AI infrastructure for orchestrating your life and work


Static Badge GitHub last commit License: MIT Claude Code PAI Video


Stars Forks Issues


Features β€’ Quick Start β€’ Documentation β€’ Examples β€’ Community


πŸš€ Recent Updates

Tip

πŸŽ‰ v0.2.4 Released! - README Cleanup & Organization

Click to see all updates
πŸ“… October 6, 2025 - README Cleanup & Organization (v0.2.4)
  • πŸ“‚ Collapsed Updates: Implemented two-level collapsing structure for updates section
  • 🎯 Better Navigation: Reduced visual clutter with nested <details> tags
  • 🧹 Issue Management: Closed PR #24 (voice system) after recent system changes
  • πŸ“Š Space Optimization: Updates section now takes minimal vertical space
  • βœ… Accessibility: All information still accessible through intuitive collapse/expand
πŸ“… October 2, 2025 - Voice System Update
  • πŸŽ™οΈ Zero-Cost Voice System: Migrated from ElevenLabs API to macOS native Premium/Enhanced voices
  • πŸ’° No API Costs: 100% offline voice synthesis using built-in macOS neural TTS
  • πŸ”Š High-Quality Voices: Uses Premium voices (Jamie, Ava, Serena, Isha) and Enhanced voices (Tom, Oliver, Samantha)
  • πŸ”’ Complete Privacy: All voice processing happens locally, no cloud services
  • βš™οΈ Centralized Config: Voice settings managed via voices.json configuration file
  • πŸš€ Browser Tools Update: Switched from Playwright to Chrome DevTools MCP for web automation
πŸ“… September 28, 2025 - Complete Visibility & Portability Update (v0.2.3)
  • πŸ“ Directory Renamed: .claude β†’ PAI_DIRECTORY for better visibility
  • 🌍 Vendor Agnostic: Works with any AI vendor (Claude, GPT, Gemini, etc.)
  • πŸ‘οΈ No More Hidden Files:
    • .zshrc β†’ zshrc-aliases
    • .env-example β†’ env-example
  • πŸ”§ Dynamic Paths: All hardcoded paths replaced with ${PAI_DIR}
  • πŸ“ Consistent Config: .env now lives in ${PAI_DIR}/.env
  • πŸ› Issues Fixed: #20 (env location) and #21 (hardcoded paths)
  • βœ… Full Portability: Install PAI anywhere, everything just works
πŸ“… September 26, 2025 - Hooks System Update
  • πŸͺ Hooks Sanitized: Updated all hook files to be public-ready with no sensitive data
  • πŸ”§ Path Portability: All hooks now use ${PAI_DIR} variable for installation-agnostic paths
  • 🎯 Session Management: Updated session-start-hook for proper initialization
  • πŸŽ™οΈ Voice Integration: Enhanced stop-hook with intelligent voice responses and tab titles
  • πŸ“ Subagent Support: Improved subagent-stop-hook for agent-specific voice notifications
  • πŸ”Œ Dynamic Loading: Updated load-dynamic-requirements wrapper for proper context loading
  • πŸš€ Ready for Distribution: All hooks verified clean and ready for public PAI distribution
πŸ“… September 25, 2025 - Voice Output Format & Bug Fix
  • 🎯 Mandatory Format: Enforced structured response format for voice integration
  • πŸ”Š Voice System: Fixed voice notification system breaking due to inconsistent output
  • πŸ› Field Name Fix: Fixed stop-hook.ts sending wrong field names (text/voiceId β†’ message/voice_id)
  • πŸ“‹ Response Structure: All responses now use mandatory emoji headers with COMPLETED line
  • πŸͺ Hook Integration: COMPLETED line properly triggers voice notifications with correct field names
  • ⚑ Consistency: Format applies to all responses, even simple answers
  • πŸ“ Documentation: Added comprehensive voice-system.md documentation
  • πŸ“ Context Updates: Updated both local and PAI CLAUDE.md files with strict enforcement
πŸ“… September 24, 2025 - DA Environment Variable
  • πŸ€– DA Variable: Separated Digital Assistant name and color configuration
  • 🎨 DA_COLOR Variable: Color now configurable via DA_COLOR environment variable
  • πŸ“ Clean Separation: DA handles the name, DA_COLOR handles the display color
  • 🎨 Color Options: purple (default), blue, green, cyan, magenta, yellow, red, orange
  • βš™οΈ Configuration: Add to .zshrc:
    export DA="YourAssistantName"    # Defaults to "Assistant"
    export DA_COLOR="purple"         # Choose your color
πŸ“… September 22, 2025 - v0.2 Release
  • πŸ”— Human 3.0: Added link to projects fit together blog post
  • πŸ“Š Badges: Fixed purple color and stats display issues
  • πŸ“ Documentation: Improved table formatting and structure
  • ✨ Polish: Enhanced README readability and navigation
  • πŸ”§ Fixes: Minor formatting and display improvements
πŸ“… September 21, 2025 - v0.1 Release
  • πŸŽ‰ Release: Published v0.1 - Initial public release
  • πŸ”’ Voice: Hardened the voice server
  • 🏠 Portability: PAI_HOME support eliminates hardcoded paths
  • πŸ“š Docs: Comprehensive documentation under ${PAI_DIR}/documentation/
  • πŸ”Œ Dynamic: MCP detection via settings.json
  • πŸ—οΈ Architecture: Complete system documentation with examples
πŸ“… Previous Updates

September 20, 2025

  • πŸ—£οΈ Added /voice-server with ElevenLabs integration
  • πŸ”§ Fixed hardcoded path issues
  • πŸͺ Working on missing hooks

September 12, 2025

  • 🧠 Dynamic resource loading system
  • ⚑ Submit-user-hook for context loading
  • πŸ—ΊοΈ Dynamic routing via load-dynamic-requirements

🎯 What is PAI?

Core Mission: Augment humans with AI capabilities so they can survive and thrive in a world full of AI.

🌍 The Problem

It doesn't matter how powerful AI becomes if it's not in the hands of everyone on Earth.

Right now, AI is trapped behind corporate APIs, expensive subscriptions, and complex interfaces that only developers can use. Meanwhile, billions of people who could benefit from AI augmentationβ€”artists, teachers, small business owners, researchers, parentsβ€”are left behind.

PAI exists to solve this. This project's goal is to give the most powerful AI capabilities, in the form of a complete platform, to everyone on Earth. Not just the tech elite. Not just the wealthy. Everyone.

graph TB
    You[πŸ‘€ You] --> PAI[🧠 PAI/Kai]
    
    PAI --> Work[πŸ’Ό Work]
    PAI --> Life[🏠 Life]
    
    Work --> Blog[πŸ“ write-blog]
    Work --> News[πŸ“Š get-newsletter-stats]
    Work --> Site[🌐 get-site-analytics]
    Work --> Consult[πŸ’Ό create-consulting-document]
    
    Life --> Finance[πŸ’° answer-finance-question]
    Life --> Memory[πŸ” get-life-log]
    Life --> Alert[πŸ”” send-text-alert]
    Life --> Health[πŸ₯ track-health-metrics]
    
    Blog --> Output[✨ Augmented Output]
    News --> Output
    Site --> Output
    Consult --> Output
    Finance --> Output
    Memory --> Output
    Alert --> Output
    Health --> Output
    
    style You fill:#24283b,stroke:#7aa2f7,stroke-width:2px,color:#c0caf5
    style PAI fill:#1a1b26,stroke:#bb9af7,stroke-width:3px,color:#c0caf5
    style Work fill:#24283b,stroke:#9ece6a,stroke-width:2px,color:#c0caf5
    style Life fill:#24283b,stroke:#ff9e64,stroke-width:2px,color:#c0caf5
    style Output fill:#1a1b26,stroke:#f7768e,stroke-width:3px,color:#c0caf5
Loading

PAI is an open-source, full personal AI platform that's completely agnostic to who you are and what you're trying to accomplish.

Think of PAI as your personal AI that actually knows youβ€”all your projects, your style, your dataβ€”and can handle anything you throw at it. Whether you're an artist transitioning to independence, a founder building a company, or someone managing complex health needs, PAI becomes whatever you need it to be.

PAI is part of the journey toward Human 3.0β€”where humans are augmented by AI to amplify their capabilities.

πŸ“– Learn how PAI fits into the Human 3.0 vision

🧠 Life Management

Finance Intelligence

  • answer-finance-question - Analyze bank statements
  • get-finances-state - Track spending patterns
  • Parse PDFs for utility bills and expenses

Memory & Conversations

  • get-life-log - Search recorded meetings
  • Query Limitless.ai pendant recordings
  • Find what was discussed at any event

Health Tracking

  • Monitor wellness metrics
  • Track medical records
  • Analyze sleep and fitness data

πŸ’Ό Professional

Content Creation

  • write-blog - Generate posts in your style
  • publish-blog - Deploy to production
  • enhance-content - Improve existing work

Business Analytics

  • get-newsletter-stats - Beehiiv metrics
  • get-site-analytics - Website performance
  • create-consulting-document - Client deliverables

Development

  • design-review - Code analysis
  • browser-tools-setup - Automation
  • update-daemon - API management

🎯 Personal Growth

Knowledge Capture

  • extract-knowledge - Learn from content
  • capture-learning - Document insights
  • web-research - Deep investigations

Communication

  • send-email - Automated outreach
  • send-text-alert - SMS notifications
  • send-discord-alert - Team updates

Productivity

  • add-linear-ticket - Task management
  • create-mermaid-visualization - Idea mapping
  • query-context - Access any stored knowledge

🌟 Why This System is Different

This system is designed from the very beginning to be available to anybody and to grow and scale with you throughout your life.

  • πŸ”“ Open Framework: No vendor lock-in, complete transparency, you own everything
  • 🌍 Universal: Works for anyone, anywhere, in any profession or life situation
  • πŸ€– Platform Independent: Core structure works with Claude, GPT, Gemini, or any AI platform
  • 🧠 Persistent Memory: Your AI remembers every context, project, and conversation
  • 🎯 Task Agnostic: From writing a blog to tracking medical data to running a business
  • πŸ“ Plain Text: All configuration in human-readable files you can edit and understand
  • πŸ”Œ Extensible: Add your own commands, agents, and integrations

πŸ“– Read the full technical deep-dive on PAI


⚑ Architecture

πŸ—οΈ The PAI System Architecture

graph TD
    User[πŸ‘€ You] --> Hooks[πŸͺ Dynamic Hooks]
    
    Hooks --> UFC[πŸ“ UFC Context System]
    Hooks --> Commands[⚑ Custom Commands]
    
    UFC --> Projects[🧠 Projects]
    UFC --> Life[🏠 Life Context]
    UFC --> Work[πŸ’Ό Work Context]
    
    Commands --> MCPs[πŸ”Œ MCP Servers]
    Commands --> Agents[πŸ€– AI Agents]
    Commands --> APIs[🌐 API Integrations]
    
    MCPs --> Playwright[🎭 Browser Automation]
    MCPs --> Stripe[πŸ’³ Payment Processing]
    MCPs --> Analytics[πŸ“Š Analytics]
    
    Agents --> Output[✨ Augmented Actions]
    APIs --> Output
    MCPs --> Output
    
    style User fill:#1f2937,stroke:#10b981,stroke-width:2px,color:#e5e7eb
    style Hooks fill:#111827,stroke:#8b5cf6,stroke-width:2px,color:#e5e7eb
    style Output fill:#111827,stroke:#ef4444,stroke-width:2px,color:#e5e7eb
Loading

πŸ“ UFC Context System

${PAI_DIR}/context/
β”œβ”€β”€ projects/
β”‚   β”œβ”€β”€ website/
β”‚   β”œβ”€β”€ Alma/
β”‚   └── PAI/
β”œβ”€β”€ life/
β”‚   β”œβ”€β”€ finances/
β”‚   β”œβ”€β”€ health/
β”‚   └── expenses/
β”œβ”€β”€ work/
β”‚   β”œβ”€β”€ consulting/
β”‚   └── business/
└── benefits/
    └── credit-cards/

Features:

  • βœ… Persistent memory across sessions
  • πŸ“„ Plain text files - human readable
  • ⚑ Dynamic loading based on context
  • πŸ“‚ Hierarchical organization

⚑ Custom Commands

Note

These are examples from my setup. Your PAI will have completely different commands based on YOUR unique needs. The possibilities are infinite!

πŸ’Ό Professional:

  • write-blog - Content generation
  • get-newsletter-stats - Beehiiv metrics
  • design-review - Code analysis
  • create-consulting-document - Client docs
  • update-daemon - API management

🏠 Personal:

  • answer-finance-question - Financial insights
  • get-life-log - Limitless.ai integration
  • send-text-alert - SMS notifications
  • track-health-metrics - Wellness tracking
  • capture-learning - Knowledge capture

πŸš€ 60+ commands ready to use out of the box

πŸ€– Specialized Agents

Important

These agents are examples. You'll create your own specialized agents for YOUR specific workflows - artists might have creative agents, doctors might have diagnostic agents, teachers might have curriculum agents. The system adapts to YOU.

Agent Purpose Tools Use Case
πŸ” Researcher Deep web research WebSearch, WebFetch Information gathering
βš™οΈ Engineer Production code Testing, Debugging Software development
🎨 Designer UX/UI design Figma, shadcn/ui Interface creation
πŸ”’ Pentester Security testing Nmap, Burp Vulnerability assessment
πŸ—οΈ Architect System design Diagrams, PRDs Technical planning

Enhanced with:

  • πŸŽ™οΈ ElevenLabs voice synthesis
  • ⚑ Task parallelization
  • πŸ”Œ Deep tool integration

πŸͺ Dynamic Hook System

πŸ“₯ Context Loading Hooks:

  • submit-user-hook - Loads context by intent
  • load-dynamic-requirements - Smart routing
  • Automatic agent selection
  • Domain-specific knowledge injection

πŸ”§ Integration Hooks:

  • Pre/post command execution
  • Error handling and recovery
  • Rate limiting and validation
  • Security scanning

πŸ”Œ MCP Server Ecosystem

🌐 Browser & Testing

  • Playwright automation
  • Puppeteer control
  • Selenium testing
  • Visual regression

πŸ’³ Financial

  • Stripe API
  • Square payments
  • PayPal integration
  • Crypto wallets

πŸ“Š Analytics

  • Google Analytics
  • Mixpanel tracking
  • Beehiiv stats
  • Site metrics

πŸ’¬ Communication

  • ElevenLabs TTS
  • OpenAI Voice
  • Discord bots
  • Email/SMS

πŸš€ Quick Start

Note

PAI was originally built with Claude Code, but the architecture supports any AI platform (GPT, Gemini, etc.) Requires Bun JavaScript runtime for the current implementation.

Installation

Step 1: Install Prerequisites

# Install Bun (JavaScript runtime)
brew install oven-sh/bun/bun 

# Get Claude Code (AI interface)
# Visit: https://claude.ai/code

Step 2: Clone PAI Repository

# Clone the PAI repository
git clone https://github.com/danielmiessler/PAI.git
cd PAI

# Note: PAI_DIRECTORY is now visible by default
ls -la  # See all files including PAI_DIRECTORY

Step 3: Configure PAI Directory Variable ⚠️ IMPORTANT

Important

You MUST configure the PAI_DIR variable to point to your PAI installation directory. This makes the PAI system completely agnostic to your installation location.

# Add to your shell config (~/.zshrc or ~/.bashrc)
# Replace /path/to/PAI with YOUR actual PAI installation path
export PAI_DIR="/path/to/PAI/PAI_DIRECTORY"  # Point to the PAI_DIRECTORY in your PAI installation
export PAI_HOME="$HOME"  # Your home directory

# Example (adjust to YOUR installation path):
# export PAI_DIR="$HOME/Projects/PAI/PAI_DIRECTORY"
# export PAI_DIR="$HOME/Documents/PAI/PAI_DIRECTORY"
# export PAI_DIR="/Users/yourname/PAI/PAI_DIRECTORY"

# Reload your shell configuration
source ~/.zshrc  # or source ~/.bashrc

Step 4: Configure Environment

# Copy environment template to PAI_DIRECTORY
cp ${PAI_DIR}/env-example ${PAI_DIR}/.env

# Add your API keys (optional)
vim ${PAI_DIR}/.env
# Add: OPENAI_API_KEY="your_key_here" (if using GPT integration)

Step 5: Launch PAI

# Navigate to PAI directory
cd ${PAI_DIR}

# Optional: Set up voice notifications (macOS only)
# Download Premium/Enhanced voices from System Settings β†’ Voice (Live Speech)
# Then start the voice server:
cd voice-server && bun server.ts &
# See documentation/VOICE-SETUP-GUIDE.md for detailed setup instructions

# Open Claude Code and start using PAI!
# Your personal AI infrastructure is ready πŸš€

βš™οΈ Environment Variables

# Required - MUST be configured for PAI to work properly
PAI_DIR="/path/to/PAI/PAI_DIRECTORY"    # PAI's PAI_DIRECTORY (system agnostic)
PAI_HOME="$HOME"                  # Your home directory

# Optional API Keys
OPENAI_API_KEY="your_key"         # GPT integration (optional)
PORT="8888"                        # Voice server port (default: 8888)

# Digital Assistant Customization
DA="YourAssistantName"            # Your AI assistant's name (default: "Assistant")
DA_COLOR="purple"                 # Display color (purple, blue, green, cyan, etc.)

Tip

Why PAI_DIR is Important: The PAI_DIR variable makes the entire PAI system portable and installation-agnostic. All commands, contexts, and hooks reference ${PAI_DIR} instead of hardcoded paths. This means you can install PAI anywhere on your system, and as long as PAI_DIR points to your PAI_DIRECTORY, everything will work seamlessly.


πŸ“š Documentation

πŸ“– Guide 🎯 Purpose ⏱️ Time
Quick Start Get up and running 5 min
Architecture Understand the system 10 min
SECURITY.md Security guidelines 5 min
Voice Server Enable voice interaction 10 min
Commands Directory Browse all commands 15 min

🎬 Real-World Examples

[!IMPORTANT] These are examples from my personal PAI setup. Your system will have completely different commands based on YOUR unique needs, workflows, and goals. The beauty of PAI is that it becomes whatever YOU need it to be.

πŸ’Ό Professional

πŸ“ˆ Business & Analytics

πŸ“Š Newsletter Performance
# Track newsletter metrics in real-time
get-newsletter-stats
# Returns subscriber growth, open rates, top content
πŸš€ Startup Dashboard
# Monitor all key metrics
get-site-analytics        # Traffic and conversions
get-finances-state        # Revenue tracking
add-linear-ticket         # Development velocity

πŸ”’ Development & Security

πŸ” Code Security
# Security automation
check-for-sensitive --scan all
design-review --security-focus
browser-tools-setup --headers
πŸ”Œ API Infrastructure
# Personal API management
update-daemon --endpoints
create-cloudflare-mcp-server
update-tools-context --integrations
startup-context-load

✍️ Content Creation

πŸ“ Blog Pipeline
# End-to-end content creation
web-research "emerging AI trends"
extract-knowledge --key-points
write-blog --style personal --length 1500
enhance-content --seo --readability
publish-blog --schedule tomorrow
🎨 Visual Content
# Create stunning visualizations
create-d3-visualization --data metrics.json
create-custom-image "futuristic AI assistant"
create-mermaid-visualization --type flowchart

🏠 Personal

πŸ’° Financial Intelligence

πŸ“‰ Expense Analysis
# Instant financial insights
answer-finance-question "monthly utilities average?"
answer-finance-question "subscription spending?"
process-finances-data --categorize --visualize
πŸ“ˆ Financial Planning
# Comprehensive financial overview
get-finances-state
prepare-finances-dashboard
push-finances-state --notify

πŸ§ͺ Memory & Research

πŸ” Meeting Recall
# Never forget a conversation
get-life-log "investor meeting last week"
get-life-log "product roadmap decisions"
query-context "action items from standup"
πŸ“š Knowledge Building
# Build your second brain
capture-learning --source conference
extract-knowledge --summarize
learn-from-iterations --improve
query-context "machine learning notes"

🎯 Personal Productivity

툿 Morning Automation
# Start your day right
get-life-log "yesterday's highlights"
query-context "today's priorities"
send-text-alert "heading to office"
reset-visitor-peak  # Reset daily counters
πŸ“§ Smart Communication
# Intelligent outreach
send-email --template followup
send-discord-alert --channel team
add-links --resource documentation
update-public-content

🎨 Creative & Other Fields

🎭 Artist Workflow

🎨 Creative Portfolio
# Manage artistic work
track-project-progress "oil painting series"
generate-artist-statement --style contemporary
update-portfolio-website --new-pieces
schedule-gallery-submission --deadline friday
πŸ“· Photography Business
# End-to-end photography workflow
process-shoot-metadata --wedding-2024-09
generate-client-gallery --password-protected
send-invoice --client johnson-wedding
backup-raw-files --cloud-storage

🎡 Musician Setup

🎀 Music Production
# Creative music workflow
track-song-ideas --voice-memo-to-text
generate-chord-progressions --key-of-c
schedule-studio-time --next-available
export-stems --for-mixing

🌿 Health & Wellness Coach

πŸ‹οΈ Client Management
# Wellness practice automation
track-client-progress --weekly-checkin
generate-meal-plans --dietary-restrictions
send-motivation-message --personalized
schedule-follow-up --in-two-weeks

πŸ“š Academic Researcher

πŸ”¬ Research Pipeline
# Academic workflow
search-literature --keywords "machine learning ethics"
organize-citations --zotero-import
generate-literature-review --outline
track-experiment-results --statistical-analysis

🏠 Real Estate Agent

🏑 Property Management
# Real estate automation
analyze-market-trends --neighborhood-data
generate-property-reports --comparative-analysis
schedule-showings --calendar-optimization
send-client-updates --weekly-digest

🀝 Community

Help Us Give AI to the World

Issues Discussions PRs

⭐ Star this repo to stay updated with the latest features!


πŸ“„ License

PAI is MIT licensed. See LICENSE for details.


The Path to Human 3.0

"Humans are what matter. AI is only as useful as it is to people. A system like this is need to level the field with AI and help us get to Human 3.0."


Created by Daniel Miessler

πŸ“§ Newsletter β€’ πŸ“ Blog β€’ πŸ’Ό LinkedIn β€’ 🎬 YouTube


Back to Top