PAI exists to solve the P0 problem in the world: activating human creative potential through AI. An open-source personal AI infrastructure that makes the best AI accessible to everyone, not just the rich or technical elite.
Add this skill
npx mdskills install danielmiessler/personal-ai-infrastructureComprehensive AI infrastructure framework but lacks actionable agent instructions
1<div align="center">23<picture>4 <source media="(prefers-color-scheme: dark)" srcset="./images/pai-logo-v7.png">5 <source media="(prefers-color-scheme: light)" srcset="./images/pai-logo-v7.png">6 <img alt="PAI Logo" src="./images/pai-logo-v7.png" width="300">7</picture>89<br/>10<br/>1112# Personal AI Infrastructure1314[](https://github.com/danielmiessler/Personal_AI_Infrastructure)1516<br/>1718<!-- Social Proof -->1920212223<!-- Project Health -->24252627282930<!-- Metrics -->3132333435<!-- Content -->36[](#-installation)37[](Releases/v3.0/)38[](https://github.com/danielmiessler/Personal_AI_Infrastructure/graphs/contributors)3940<!-- Tech Stack -->41[](https://claude.ai)42[](https://www.typescriptlang.org/)43[](https://bun.sh)44[](https://danielmiessler.com/upgrade)4546<br/>4748**Overview:** [Purpose](#the-purpose-of-this-project) · [What is PAI?](#what-is-pai) · [New to AI?](#new-to-this-start-here) · [Principles](#the-pai-principles) · [Primitives](#pai-primitives)4950**Get Started:** [Installation](#-installation) · [Releases](Releases/)5152**Resources:** [FAQ](#-faq) · [Roadmap](#-roadmap) · [Community](#-community) · [Contributing](#-contributing)5354<br/>5556[](https://youtu.be/Le0DLrn7ta0)5758**[Watch the full PAI walkthrough](https://youtu.be/Le0DLrn7ta0)** | **[Read: The Real Internet of Things](https://danielmiessler.com/blog/real-internet-of-things)**5960---6162</div>6364> [!IMPORTANT]65> **PAI v3.0.0 Released** — The Algorithm Matures: Constraint Extraction, Build Drift Prevention, Persistent PRDs, and Parallel Loop Execution.66>67> **[Release notes →](Releases/v3.0/README.md)** | **[GitHub Release →](https://github.com/danielmiessler/Personal_AI_Infrastructure/releases/tag/v3.0.0)**6869<div align="center">7071# AI should magnify everyone—not just the top 1%.7273</div>7475## The Purpose of This Project7677**PAI exists to solve what I believe is the [P0 problem](https://danielmiessler.com/telos) in the world:**7879### Only a tiny fraction of humanity's creative potential is activated on Earth.8081Most people don't believe they have valuable contributions to make. They think there are "special" people—and they aren't one of them. They've never asked who they are, what they're about, and have never articulated or written it down. This makes them catastrophically vulnerable to AI displacement. Without activation, there is no high-agency.8283So our goal with PAI is to activate people.8485**PAI's mission is twofold:**86871. **Activate as many people as possible** — Help people identify, articulate, and pursue their own purpose in life through AI-augmented self-discovery882. **Make the best AI available in the world accessible to everyone** — Ensure this quality of AI infrastructure isn't reserved for just the rich or technical elite.8990That's why this is an open-source project instead of private.9192---9394## New to This? Start Here9596You've probably used ChatGPT or Claude. Type a question, get an answer. Simple.9798You can think of AI systems as **three levels**:99100<p align="center">101 <img src="./images/pai-eli5-diagram.png" alt="The AI Evolution - From chatbots to your personal AI system" width="800">102</p>103104### Chatbots105106ChatGPT, Claude, Gemini—you ask something, it answers, and then it forgets everything. Next conversation starts fresh. No memory of you, your preferences, or what you talked about yesterday.107108**The pattern:** Ask → Answer → Forget109110### Agentic Platforms111112Tools like Claude Code. The AI can actually *do* things—write code, browse the web, edit files, run commands.113114**The pattern:** Ask → Use tools → Get result115116More capable, but it still doesn't know *you*—your goals, your preferences, your history.117118### PAI (Personal AI Infrastructure)119120Now your DA **learns and improves**:121- **Captures every signal** — Ratings, sentiment, verification outcomes122- **Learns from mistakes** — Failures get analyzed and fixed123- **Gets better over time** — Success patterns get reinforced124- **Upgrades itself** — Skills, workflows, even the core behavior evolves125126Plus it knows:127- **Your goals** — What you're working toward128- **Your preferences** — How you like things done129- **Your history** — Past decisions and learnings130131**The pattern:** Observe → Think → Plan → Execute → Verify → **Learn** → Improve132133The key difference: **PAI learns from feedback**. Every interaction makes it better at helping *you* specifically.134135---136137## What is PAI?138139PAI is a Personalized AI Platform designed to magnify your capabilities.140141It's designed for humans most of all, but can be used by teams, companies, or Federations of Planets desiring to be better versions of themselves.142143The scale of the entity doesn't matter: It's a system for understanding, articulating, and realizing its principal's goals using a full-featured Agentic AI Platform.144145### Who is PAI for?146147**Everyone, full stop.** It's the anti-gatekeeping AI project.148149- **Small business owners** who aren't technical but want AI to handle invoicing, scheduling, customer follow-ups, and marketing150- **Companies** who want to understand their data, optimize operations, and make better decisions151- **Managers** who want to run their teams more effectively—tracking projects, preparing for reviews, and communicating clearly152- **Artists and creatives** who want to find local events, galleries, and opportunities to showcase their work153- **Everyday people** who want to improve their lives—better fitness routines, stronger social connections, personal finance, or just getting organized154- **Developers** using AI coding assistants who want persistent memory and custom workflows155- **Power users** who want their AI to know their goals, preferences, and context156- **Teams** building shared AI infrastructure with consistent capabilities157- **Experimenters** interested in AI system design and personal AI patterns158159### What makes PAI different?160161The first thing people ask is:162163> How is this different from Claude Code, or any of the other agentic systems?164165Most agentic systems are built around tools with the user being an afterthought. They are also mostly task-based instead of being goal-based using all the context available to them. PAI is the opposite.166167**Three core differentiators:**1681691. **Goal Orientation** — PAI's primary focus is on the human running it and what they're trying to do in the world, not the tech. This is built into how the system executes all tasks.1701712. **Pursuit of Optimal Output** — The system's outer loop and everything it does is trying to produce the exact right output given the current situation and all the contexts around it.1721733. **Continuous Learning** — The system constantly captures signals about what was done, what changes were made, what outputs were produced for each request, and then how you liked or disliked the results.174175---176177## The PAI Principles178179These principles guide how PAI systems are designed and built. **[Full breakdown →](https://danielmiessler.com/blog/personal-ai-infrastructure)**180181| # | Principle | Summary |182|---|-----------|---------|183| 1 | **User Centricity** | PAI is built around you, not tooling. Your goals, preferences, and context come first—the infrastructure exists to serve them. |184| 2 | **The Foundational Algorithm** | The scientific method as a universal problem-solving loop: Observe → Think → Plan → Build → Execute → Verify → Learn. Define the ideal state, iterate until you reach it. |185| 3 | **Clear Thinking First** | Good prompts come from clear thinking. Clarify the problem before writing the prompt. |186| 4 | **Scaffolding > Model** | System architecture matters more than which model you use. |187| 5 | **Deterministic Infrastructure** | AI is probabilistic; your infrastructure shouldn't be. Use templates and patterns. |188| 6 | **Code Before Prompts** | If you can solve it with a bash script, don't use AI. |189| 7 | **Spec / Test / Evals First** | Write specifications and tests before building. Measure if the system works. |190| 8 | **UNIX Philosophy** | Do one thing well. Make tools composable. Use text interfaces. |191| 9 | **ENG / SRE Principles** | Treat AI infrastructure like production software: version control, automation, monitoring. |192| 10 | **CLI as Interface** | Command-line interfaces are faster, more scriptable, and more reliable than GUIs. |193| 11 | **Goal → Code → CLI → Prompts → Agents** | The decision hierarchy: clarify goal, then code, then CLI, then prompts, then agents. |194| 12 | **Skill Management** | Modular capabilities that route intelligently based on context. |195| 13 | **Memory System** | Everything worth knowing gets captured. History feeds future context. |196| 14 | **Agent Personalities** | Different work needs different approaches. Specialized agents with unique voices. |197| 15 | **Science as Meta-Loop** | Hypothesis → Experiment → Measure → Iterate. |198| 16 | **Permission to Fail** | Explicit permission to say "I don't know" prevents hallucinations. |199200---201202## PAI Primitives203204While the Principles describe the *philosophy* of PAI, the Primitives are the *architecture*—the core systems that make everything work.205206<p align="center">207 <img src="./images/pai-unique-components-diagram.png" alt="PAI Primitives - A system that knows you, not a tool harness" width="800">208</p>209210These primitives work together to create the experience of working with a system that understands and knows you—as opposed to a tool harness that just executes commands.211212---213214<p align="center">215 <img src="./images/pai-component-1-assistant-vs-agent.png" alt="Assistant vs Agent-Based Interaction" width="700">216</p>217218### Assistant vs. Agent-Based AI Interaction219220PAI treats AI as a [persistent assistant, friend, coach, and mentor](https://danielmiessler.com/blog/personal-ai-maturity-model) rather than a stateless agent that runs tasks. An assistant knows your goals, remembers your preferences, and improves over time. An agent executes commands and forgets.221222---223224<p align="center">225 <img src="./images/pai-primitive-telos.png" alt="TELOS - Deep Goal Understanding" width="700">226</p>227228### TELOS (Deep Goal Understanding)22923010 files that capture who you are: MISSION.md, GOALS.md, PROJECTS.md, BELIEFS.md, MODELS.md, STRATEGIES.md, NARRATIVES.md, LEARNED.md, CHALLENGES.md, IDEAS.md. Your DA knows what you're working toward because it's all documented.231232---233234<p align="center">235 <img src="./images/pai-primitive-user-system-separation.png" alt="User/System Separation" width="700">236</p>237238### User/System Separation239240Your customizations live in USER/. PAI infrastructure lives in SYSTEM/. When PAI upgrades, your files are untouched. Portable identity, upgrade-safe.241242---243244<p align="center">245 <img src="./images/pai-primitive-customization.png" alt="Granular Customization" width="700">246</p>247248### Granular Customization249250Six layers of customization: Identity (name, voice, personality), Preferences (tech stack, tools), Workflows (how skills execute), Skills (what capabilities exist), Hooks (how events are handled), and Memory (what gets captured). Start with defaults, customize when needed.251252---253254<p align="center">255 <img src="./images/pai-component-2-skill-system.png" alt="Skill System" width="700">256</p>257258### Skill System259260Highly focused on consistent results. It has a structure that puts *deterministic outcomes first* by going from CODE -> CLI-BASED-TOOL -> PROMPT -> SKILL instead of a haphazard structure.261262---263264<p align="center">265 <img src="./images/pai-component-3-memory-system.png" alt="Memory System" width="700">266</p>267268### Memory System269270Focused on continuous learning. Every interaction generates signals—ratings, sentiment, successes, failures—that feed back into improving the system. Three-tier architecture (hot/warm/cold) with phase-based learning directories.271272---273274<p align="center">275 <img src="./images/pai-component-6-hook-system.png" alt="Hook System" width="700">276</p>277278### Hook System279280Responds to lifecycle events—session start, tool use, task completion, and more. 8 event types enable voice notifications, automatic context loading, session capture, security validation, and observability.281282---283284<p align="center">285 <img src="./images/pai-component-5-security-system.png" alt="Security System" width="700">286</p>287288### Security System289290Defines system and user-level security policies by default. You don't have to run with `--dangerously-skip-permissions` to have an uninterrupted experience. PAI's security hooks validate commands before execution, blocking dangerous operations while allowing normal workflows to proceed smoothly.291292---293294<p align="center">295 <img src="./images/pai-component-4-ai-installation.png" alt="AI-Based Installation" width="700">296</p>297298### AI-Based Installation299300The GUI installer handles everything—prerequisites, configuration, and setup. No manual configuration, no guessing.301302---303304<p align="center">305 <img src="./images/pai-component-8-notification-system.png" alt="Notification System" width="700">306</p>307308### Notification System309310Keeps you informed without being intrusive. Push notifications via ntfy for mobile alerts, Discord integration for team updates, and duration-aware routing that escalates for long-running tasks. Fire-and-forget design means notifications never block your workflow.311312---313314<p align="center">315 <img src="./images/pai-component-9-voice-system.png" alt="Voice System" width="700">316</p>317318### Voice System319320Powered by ElevenLabs TTS. Hear task completions, session summaries, and important updates spoken aloud. Prosody enhancement makes speech sound natural. Your AI has a voice.321322---323324<p align="center">325 <img src="./images/pai-component-7-terminal-ui.png" alt="Terminal-Based UI" width="700">326</p>327328### Terminal-Based UI329330Rich tab titles and pane management. Dynamic status lines show learning signals, context usage, and current task state. Your terminal is a command center.331332---333334## 🚀 Installation335336> [!CAUTION]337> **Project in Active Development** — PAI is evolving rapidly. Expect breaking changes, restructuring, and frequent updates. We are working on stable and development branches, but currently it's all combined.338339```bash340# Clone the repo341git clone https://github.com/danielmiessler/Personal_AI_Infrastructure.git342cd Personal_AI_Infrastructure/Releases/v3.0343344# Copy the release and run the installer345cp -r .claude ~/ && cd ~/.claude && bash PAI-Install/install.sh346```347348**The installer will:**349- Detect your system and install prerequisites (Bun, Git, Claude Code)350- Ask for your name, AI assistant name, and timezone351- Clone/configure the PAI repository into `~/.claude/`352- Set up voice features with ElevenLabs (optional)353- Configure your shell alias and verify the installation354355**After installation:** Run `source ~/.zshrc && pai` to launch PAI.356357---358359## ❓ FAQ360361### How is PAI different from just using Claude Code?362363PAI is built natively on Claude Code and designed to stay that way. We chose Claude Code because its hook system, context management, and agentic architecture are the best foundation available for personal AI infrastructure.364365PAI isn't a replacement for Claude Code — it's the layer on top that makes Claude Code *yours*:366367- **Persistent memory** — Your DA remembers past sessions, decisions, and learnings368- **Custom skills** — Specialized capabilities for the things you do most369- **Your context** — Goals, contacts, preferences—all available without re-explaining370- **Intelligent routing** — Say "research this" and the right workflow triggers automatically371- **Self-improvement** — The system modifies itself based on what it learns372373Think of it this way: Claude Code is the engine. PAI is everything else that makes it *your* car.374375### What's the difference between PAI and Claude Code's built-in features?376377Claude Code provides powerful primitives — hooks, slash commands, MCP servers, context files. These are individual building blocks.378379PAI is the complete system built on those primitives. It connects everything together: your goals inform your skills, your skills generate memory, your memory improves future responses. PAI turns Claude Code's building blocks into a coherent personal AI platform.380381### Is PAI only for Claude Code?382383PAI is Claude Code native. We believe Claude Code's hook system, context management, and agentic capabilities make it the best platform for personal AI infrastructure, and PAI is designed to take full advantage of those features.384385That said, PAI's concepts (skills, memory, algorithms) are universal, and the code is TypeScript, Python, and Bash — so community members are welcome to adapt it for other platforms.386387### How is this different from fabric?388389[Fabric](https://github.com/danielmiessler/fabric) is a collection of AI prompts (patterns) for specific tasks. It's focused on *what to ask AI*.390391PAI is infrastructure for *how your DA operates*—memory, skills, routing, context, self-improvement. They're complementary. Many PAI users integrate Fabric patterns into their skills.392393### What if I break something?394395Recovery is straightforward:396397- **Git-backed** — Version control everything, roll back when needed398- **History is preserved** — Your DA's memory survives mistakes399- **DA can fix it** — Your DA helped build it, it can help repair it400- **Re-install** — Run the installer again to reset to a clean state401402---403404## 🎯 Roadmap405406| Feature | Description |407|---------|-------------|408| **Local Model Support** | Run PAI with local models (Ollama, llama.cpp) for privacy and cost control |409| **Granular Model Routing** | Route different tasks to different models based on complexity |410| **Remote Access** | Access your PAI from anywhere—mobile, web, other devices |411| **Outbound Phone Calling** | Voice capabilities for outbound calls |412| **External Notifications** | Robust notification system for Email, Discord, Telegram, Slack |413414---415416## 🌐 Community417418**GitHub Discussions:** [Join the conversation](https://github.com/danielmiessler/Personal_AI_Infrastructure/discussions)419420**UL Community Discord:** PAI is discussed in the [Unsupervised Learning community](https://danielmiessler.com/upgrade) along with other AI projects421422**Twitter/X:** [@danielmiessler](https://twitter.com/danielmiessler)423424**Blog:** [danielmiessler.com](https://danielmiessler.com)425426### Star History427428<a href="https://star-history.com/#danielmiessler/Personal_AI_Infrastructure&Date">429 <picture>430 <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=danielmiessler/Personal_AI_Infrastructure&type=Date&theme=dark" />431 <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=danielmiessler/Personal_AI_Infrastructure&type=Date" />432 <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=danielmiessler/Personal_AI_Infrastructure&type=Date" />433 </picture>434</a>435436---437438## 🤝 Contributing439440We welcome contributions! See our [GitHub Issues](https://github.com/danielmiessler/Personal_AI_Infrastructure/issues) for open tasks.4414421. **Fork the repository**4432. **Make your changes** — Bug fixes, new skills, documentation improvements4443. **Test thoroughly** — Install in a fresh system to verify4454. **Submit a PR** with examples and testing evidence446447---448449## 📜 License450451MIT License - see [LICENSE](LICENSE) for details.452453---454455## 🙏 Credits456457**Anthropic and the Claude Code team** — First and foremost. You are moving AI further and faster than anyone right now. Claude Code is the foundation that makes all of this possible.458459**[IndyDevDan](https://www.youtube.com/@indydevdan)** — For great videos on meta-prompting and custom agents that have inspired parts of PAI.460461### Contributors462463**[fayerman-source](https://github.com/fayerman-source)** — Google Cloud TTS provider integration and Linux audio support for the voice system.464465**Matt Espinoza** — Extensive testing, ideas, and feedback for the PAI 2.3 release, plus roadmap contributions.466467---468469## 💜 Support This Project470471<div align="center">472473<a href="https://github.com/sponsors/danielmiessler"><img src="https://img.shields.io/badge/Sponsor-❤️-EA4AAA?style=for-the-badge&logo=github-sponsors&logoColor=white" alt="Sponsor"></a>474475**PAI is free and open-source forever. If you find it valuable, you can [sponsor the project](https://github.com/sponsors/danielmiessler).**476477</div>478479---480481## 📚 Related Reading482483- [The Real Internet of Things](https://danielmiessler.com/blog/real-internet-of-things) — The vision behind PAI484- [AI's Predictable Path: 7 Components](https://danielmiessler.com/blog/ai-predictable-path-7-components-2024) — Visual walkthrough of where AI is heading485- [Building a Personal AI Infrastructure](https://danielmiessler.com/blog/personal-ai-infrastructure) — Full PAI walkthrough with examples486487---488489<details>490<summary><strong>📜 Update History</strong></summary>491492<br/>493494**v3.0.0 (2026-02-15) — The Algorithm Matures**495- Algorithm v1.4.0 with constraint extraction and build drift prevention496- Persistent PRDs and parallel loop execution497- Full installer with GUI wizard498- 10 new skills, agent teams/swarm, voice personality system499- 38 skills, 20 hooks, 162 workflows500- [Release Notes](Releases/v3.0/README.md)501502**v2.5.0 (2026-01-30) — Think Deeper, Execute Faster**503- Two-Pass Capability Selection: Hook hints validated against ISC in THINK phase504- Thinking Tools with Justify-Exclusion: Opt-OUT, not opt-IN for Council, RedTeam, FirstPrinciples, etc.505- Parallel-by-Default Execution: Independent tasks run concurrently via parallel agent spawning506- 28 skills, 17 hooks, 356 workflows507- [Release Notes](Releases/v2.5/README.md)508509**v2.4.0 (2026-01-23) — The Algorithm**510- Universal problem-solving system with ISC (Ideal State Criteria) tracking511- 29 skills, 15 hooks, 331 workflows512- Euphoric Surprise as the outcome metric513- Enhanced security with AllowList enforcement514- [Release Notes](Releases/v2.4/README.md)515516**v2.3.0 (2026-01-15) — Full Releases Return**517- Complete `.claude/` directory releases with continuous learning518- Explicit and implicit rating capture519- Enhanced hook system with 14 production hooks520- Status line with learning signal display521- [Release Notes](Releases/v2.3/README.md)522523**v2.1.1 (2026-01-09) — MEMORY System Migration**524- History system merged into core as MEMORY System525526**v2.1.0 (2025-12-31) — Modular Architecture**527- Source code in real files instead of embedded markdown528529**v2.0.0 (2025-12-28) — PAI v2 Launch**530- Modular architecture with independent skills531- Claude Code native design532533</details>534535---536537<div align="center">538539**Built with ❤️ by [Daniel Miessler](https://danielmiessler.com) and the PAI community**540541*Augment yourself.*542543</div>544
Full transparency — inspect the skill content before installing.