Skip to content

danielmiessler/Personal_AI_Infrastructure

Repository files navigation

PAI Logo

Personal AI Infrastructure (PAI)

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


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

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


🎯 What is PAI?

PAI (Personal AI Infrastructure) is a template for building your own AI-powered operating system using Claude Code.

Core Primitives:

  • Skills - Self-contained AI capabilities with routing, workflows, and documentation
  • Agents - Specialized AI personalities for different tasks (engineer, researcher, designer, etc.)
  • Hooks - Event-driven automation that captures work, provides voice feedback, and manages state

Philosophy: Start clean, small, and simple. Build the scaffolding that makes AI reliable.


πŸ”„ PAI vs Kai: What You Get

PAI (this repository) provides:

  • βœ… Skills/agents/hooks architecture
  • βœ… CORE documentation and routing
  • βœ… History system (UOCS) for automatic documentation
  • βœ… Example skills (research, fabric, etc.)
  • βœ… Voice server skeleton
  • βš™οΈ Requires: API key configuration per skill

Kai (Daniel's private system) adds:

  • πŸ”’ Personal data, contacts, and history
  • πŸ”’ Additional private skills and workflows
  • πŸ”’ Customized agent personalities and voices
  • πŸ”’ Production integrations and automations

Think of it this way: PAI is the scaffolding. You build your own "Kai" on top of it.

After setup, PAI should:

  • βœ… Execute hooks without errors
  • βœ… Load CORE context at session start
  • βœ… Route skills correctly
  • βœ… Capture session history
  • βœ… Launch agents successfully

Not working? Run the health check:

bun ~/.claude/hooks/self-test.ts

See PAI_CONTRACT.md for complete details on what's guaranteed vs what needs configuration.


πŸš€ Quick Start

1. Install Prerequisites

# Install Bun (PAI's package manager)
curl -fsSL https://bun.sh/install | bash

# Install Claude Code
# Follow instructions at: https://code.claude.com

2. Clone and Configure

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

# Copy environment template
cp .claude/.env.example .claude/.env

# Edit .env and add your API keys
# At minimum: ANTHROPIC_API_KEY=your_key_here

3. Copy to Your System

# Copy .claude directory to your home directory
cp -r .claude ~/.claude

# Or symlink if you prefer
ln -s $(pwd)/.claude ~/.claude

4. Start Claude Code

# PAI loads automatically via the CORE skill
claude-code

That's it! The CORE skill loads at session start and provides all PAI functionality.

πŸ“š For detailed setup: See docs/QUICKSTART.md


πŸ“š Documentation

All documentation lives in the CORE skill (.claude/skills/CORE/):

Essential Reading

System Guides

Reference


🎨 Examples

Explore example skills in .claude/skills/:

  • fabric/ - Integration with Fabric pattern system (242+ AI patterns)
  • research/ - Multi-source research workflows
  • create-skill/ - Templates for creating new skills
  • alex-hormozi-pitch/ - Business pitch generation
  • ffuf/ - Web fuzzing and security testing

Each skill demonstrates the skills-as-containers pattern with routing, workflows, and self-contained documentation.


πŸ—οΈ Architecture

PAI is built on three foundational principles:

1. Command Line First

Build deterministic CLI tools, then wrap them with AI orchestration. Code is cheaper, faster, and more reliable than prompts.

2. Skills as Containers

Package domain expertise in self-activating, self-contained modules. Natural language triggers automatic routing to the right skill.

3. Progressive Disclosure

Load context only when needed (3 tiers):

  • Tier 1: System prompt (always active, 200-500 words)
  • Tier 2: SKILL.md (on-demand, comprehensive reference)
  • Tier 3: Reference files (just-in-time, deep dives)

Complete architecture: See .claude/skills/CORE/CONSTITUTION.md


πŸ› οΈ Technology Stack

  • Runtime: Bun (NOT Node.js)
  • Language: TypeScript (NOT Python - we're TypeScript zealots)
  • Package Manager: Bun (NOT npm/yarn/pnpm)
  • Format: Markdown (NOT HTML for basic content)
  • Testing: Vitest when needed
  • Voice: ElevenLabs TTS integration

πŸ” Security

IMPORTANT: This is a PUBLIC template repository with sanitized examples.

DO NOT commit:

  • API keys or secrets
  • Personal email addresses or contact information
  • Private repository references
  • Any sensitive personal data

See SECURITY.md for complete security protocols.


πŸ’¬ Community


πŸ“œ License

MIT License - see LICENSE file for details.


πŸ™ Acknowledgments

Built on Claude Code by Anthropic.

Inspired by the idea that AI systems need scaffolding to be reliable. This is that scaffolding.


Start clean. Start small. Build the AI infrastructure you need.

⬆ Back to Top