PAI v2.4.0 The Algorithm

Personal AI Infrastructure has evolved from a simple assistant into a full-fledged cognitive operating system. With version 2.4.0—codenamed “The Algorithm”—PAI introduces a systematic 7-phase problem-solving framework, 28 specialized skills, and a roster of 12 named agents with distinct personalities and expertise areas.

This post provides a complete tour of what’s possible.

The PAI Algorithm: 7 Phases of Problem-Solving

Every task PAI handles follows a consistent methodology:

PhaseWhat Happens
OBSERVEGather information, understand current state
THINKAnalyze intent, identify success criteria
PLANDefine testable success conditions (ISC)
BUILDConstruct solution components
EXECUTETake action, track progress
VERIFYConfirm all criteria met with evidence
LEARNCapture insights for future improvement

The key innovation is Ideal State Criteria (ISC)—exactly 8-word, binary-testable success conditions. Before PAI acts, it defines what “done” looks like:

ISC: "All unit tests pass after fix applied"     ✓ VERIFIED
ISC: "No credentials exposed in output"          ✓ AVOIDED (anti-criteria)

This eliminates ambiguity. Either the criterion is met, or it isn’t.


Named Agents: Specialists on Demand

PAI Named Agents

PAI v2.4.0 includes 12 named agents, each with distinct expertise and personality. They’re not just prompts—they have backstories, working styles, and specialized knowledge that shapes their approach.

Strategic & Design Agents

AgentSpecialtyWhen to Use
Algorithm (Vera Sterling)ISC expert, verification specialistExtracting testable criteria, any PAI Algorithm phase work
ArchitectElite system design, Fortune 10 experienceArchitectural decisions, feature specs, implementation plans
DesignerElite UX/UI, design school pedigreeWireframes, mockups, design systems, accessibility

Implementation Agents

AgentSpecialtyWhen to Use
EngineerPrincipal engineer, TDD expertImplementation work, browser-validated development
ArtistVisual content via AI generationHero images, thumbnails, any image/video generation
Intern (Dev Patel)176 IQ genius generalist, 5 PhDsComplex multi-faceted problems, creative solutions

Research Agents

AgentSpecialtyWhen to Use
ClaudeResearcher (Ava Sterling)Strategic academic researchScholarly research, multi-query investigations
GeminiResearcher (Alex Rivera)Multi-perspective researchComprehensive stakeholder coverage, scenario planning
GrokResearcher (Johannes)Contrarian fact-based researchSocial/political analysis, X (Twitter) sentiment
CodexResearcher (Remy)Technical research via Codex CLITypeScript/API research, edge cases

Security & QA Agents

AgentSpecialtyWhen to Use
Pentester (Rook Blackburn)Offensive security, ethical hackingVulnerability assessments, penetration testing
QATesterBrowser-based QA validationMandatory before claiming web implementation complete

You invoke agents naturally: “Use Architect to design the system” or “Have Intern solve this complex problem.”


28 Skills Across 6 Categories

PAI Skills Overview

Skills are self-contained modules that give PAI domain expertise. They include workflows (step-by-step processes), tools (TypeScript utilities), and context (reference material).

Research & Analysis

SkillWhat It DoesSay This
ResearchMulti-agent parallel research (1-12 agents)“Research [topic]”, “Extensive research on…”
Fabric240+ specialized analysis patterns“Extract wisdom from…”, “Summarize…”
FirstPrinciplesFundamental reasoning without assumptions“First principles analysis of…”
CouncilMulti-agent debate for complex topics“Get multiple perspectives on…”
BeCreativeExtended thinking for creative work“Be creative with…”, “Deep thinking on…”

Security & Intelligence

SkillWhat It DoesSay This
WebAssessmentWeb application security testing“Pentest this application”
ReconNetwork/infrastructure reconnaissance“Recon this domain”
OSINTOpen source intelligence gathering“Background check on…”
RedTeamAdversarial analysis (32 agents!)“Red team this idea”
PromptInjectionLLM security testing“Test this AI for prompt injection”
SECUpdatesSecurity news aggregation“What’s new in security?”
AnnualReports570+ security vendor reports“Security industry trends”

Documents & Content

SkillWhat It DoesSay This
DocumentsProcess DOCX, PDF, PPTX, XLSX“Create a Word doc…”, “Build a presentation…”
ArtVisual content creation“Create a diagram…”, “Make a flowchart…”
AphorismsQuote matching for content“Find a quote about…”

Data & Web Scraping

SkillWhat It DoesSay This
ApifySocial media & business data scraping“Get tweets from…”, “Scrape Instagram…”
BrightDataProgressive 4-tier web scraping“Scrape this URL”
BrowserBrowser automation with debugging“Screenshot this page”

Development & System

SkillWhat It DoesSay This
CreateCLIGenerate TypeScript CLI tools“Create a CLI for…”
CreateSkillBuild new PAI skills“Create a skill for…”
EvalsAgent testing framework“Evaluate this agent”
AgentsCustom agent creation“Create a custom agent”

Personal & Productivity

SkillWhat It DoesSay This
TelosLife OS, goals, projects“Update my goals”
VoiceServerVoice notifications (ElevenLabs)“Enable voice notifications”
PAIUpgradeSystem improvements“Check for PAI upgrades”

70+ Tools and the Hook System

PAI Tools and Hooks

Beyond skills and agents, PAI includes 70+ TypeScript tools for specific operations:

Core System Tools

  • SkillSearch.ts - Discover available capabilities
  • SessionProgress.ts - Track session state
  • SecretScan.ts - Credential detection
  • LearningPatternSynthesis.ts - Learn from interactions

Agent Tools

  • ComposeAgent.ts - Dynamic agent composition from traits
  • SpawnAgentWithProfile.ts - Spawn agents with specific profiles
  • LoadAgentContext.ts - Load agent knowledge

Content Creation Tools

  • Generate.ts - Image generation (Flux, GPT-Image-1, Gemini)
  • GenerateMidjourneyImage.ts - Midjourney via Discord
  • ComposeThumbnail.ts - Thumbnails with text overlays
  • RenderTemplate.ts - Handlebars template rendering

Security Tools

  • PortScan.ts - Port scanning
  • SubdomainEnum.ts - Subdomain enumeration
  • DnsUtils.ts - DNS reconnaissance
  • EndpointDiscovery.ts - API endpoint discovery

The Hook System

PAI’s hook system enables automation at key lifecycle points:

  • PreToolUse - Security validation before tool execution
  • PostToolUse - Logging, state updates after actions
  • SessionStart - Context loading, update checks
  • SessionEnd - Summary capture, cleanup
  • UserPromptSubmit - Tab titles, event capture
  • PreCompact - Context compression before summarization

This allows PAI to maintain awareness across sessions and trigger workflows automatically.


How Dynamic Invocation Works

PAI Architecture

PAI uses natural language routing to activate the right capabilities. You don’t need to remember command syntax—just describe what you need.

Automatic Skill Routing

If You Say…PAI Activates
“research”, “investigate”Research skill
“extract wisdom”, “summarize”Fabric skill
“red team”, “stress test”RedTeam skill
“first principles”FirstPrinciples skill
“pentest”, “security assessment”WebAssessment skill
“recon”, “attack surface”Recon skill
“OSINT”, “due diligence”OSINT skill
“diagram”, “flowchart”Art skill
“Word doc”, “PDF”, “Excel”Documents skill

Capability Selection

Before each phase of a task, PAI evaluates:

  1. Which Skill has domain expertise?
  2. Should Agents work in parallel?
  3. Is Research needed for information?
  4. Should we Red Team the approach?
  5. Does this need First Principles decomposition?
  6. Is Creativity required?
  7. Does Browser need to validate?

This creates an adaptive system that assembles the right combination of capabilities for each unique request.


Power User Examples

Research Modes

"Quick research on X"        → 1 agent, ~30 seconds
"Research X"                 → 3 agents, ~3 minutes (default)
"Extensive research on X"    → 12 agents, ~10 minutes

Security Testing

"Recon example.com"          → Passive reconnaissance
"Web assessment of [URL]"    → Full security testing methodology
"OSINT on [company]"         → 16-32 agents for due diligence

Content Creation

"Extract wisdom from [URL]"  → IDEAS, INSIGHTS, QUOTES, HABITS
"Create a technical diagram" → Architecture/flow diagrams
"Build a presentation on..." → PPTX with slides

Adversarial Analysis

"Red team my business idea"  → 32 agents stress-test your concept
"Steelman then attack X"     → Build strongest version, then critique

The Five Completion Gates

PAI doesn’t consider work “done” until it passes five gates:

  1. Tests pass - Unit/integration tests green
  2. Build succeeds - No compilation errors
  3. Lint clean - No linting warnings
  4. Browser validated - QATester confirms UI works
  5. ISC verified - All criteria met with evidence

This systematic approach ensures quality and prevents premature “completion.”


Getting Started

PAI v2.4.0 is built on Daniel Miessler’s Claude Engineer foundation, extended with custom skills, agents, and workflows. The core insight: AI becomes dramatically more useful when it operates within a structured system that maintains context, enforces quality, and adapts to your specific needs.

The modular architecture means you can start simple—a few personal skills for your common tasks—and expand as your needs grow. Every skill is just markdown. Every agent is just configuration. The complexity is hidden until you need it.


By the Numbers

CategoryCount
Skills28
Named Agents12
Tools70+
Workflows331
Fabric Patterns240+
Annual Report Sources570+

PAI v2.4.0 “The Algorithm” - Your Personal AI Infrastructure