convez.ai
AgenteAutomaçãoAvançado
starlink-awaken

PAI Universal

starlink-awaken/pai-universal

Infrastructure agnóstica de IA pessoal com sistema de memória e algoritmo universal

Ver no GitHub
InicialPluginScore · de 0 a 100

Framework agnóstico de infraestrutura pessoal de IA que qualquer agente pode usar. Implementa um motor universal de tarefas (Current State → Ideal State), sistema de memória em três camadas, gerenciamento de identidade e lifecycles de hooks. Totalmente desacoplado de plataformas específicas via camada de adaptadores.

Instalação

$npx convez-ai starlink-awaken/pai-universal

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
1
Contribuidores
1

Casos de uso

  • Criar assistentes de IA customizados que funcionam em múltiplas plataformas (Claude, Gemini, APIs custom)
  • Implementar sistemas de memória persistente (WORK → LEARNING → KNOWLEDGE) para agentes
  • Construir agentes com identidade clara e objetivos de vida estruturados (Telos, Missions, Strategies)

Veredito

PAI Universal é uma arquitetura sofisticada e bem pensada para quem quer construir agentes de IA sérios com persistência, memória e portabilidade entre plataformas. Exige typescript e conhecimento arquitetural, mas oferece abstrações elegantes e reutilizáveis para qualquer cenário de automação inteligente.

README

A tradução para o português deste README ainda está na fila.

PAI Universal

A platform-agnostic Personal AI Infrastructure framework. Any AI agent can use it.

What This Is

PAI Universal extracts the core ideas from PAI v5.0 into a portable framework:

  • Algorithm — universal task engine: Current State → Ideal State via verifiable iteration
  • ISA — Ideal State Articulation, the single source of truth for any task
  • Memory — three-tier compounding system: WORK → LEARNING → KNOWLEDGE
  • Telos — life goals, missions, strategies, challenges
  • Identity — who you are and who your DA (Digital Assistant) is
  • Skills — self-activating composable domain units
  • Hooks — lifecycle event system for any platform

The framework is not tied to any specific AI platform. It defines adapter interfaces for tools, hooks, agents, config, and skills. Platform plugins implement these interfaces.

Architecture

┌─────────────────────────────────────────────┐
│                 Your AI Agent                │
│          (Claude Code, Gemini CLI, etc.)     │
└──────────────┬──────────────────────────────┘
               │ uses
┌──────────────▼──────────────────────────────┐
│            PAI Universal Core               │
│  ┌─────────┬─────────┬──────────┬────────┐  │
│  │Algorithm│  ISA    │  Memory  │ Telos  │  │
│  ├─────────┼─────────┼──────────┼────────┤  │
│  │Identity │ Skills  │  Hooks   │Context │  │
│  └─────────┴─────────┴──────────┴────────┘  │
├─────────────────────────────────────────────┤
│            Adapter Layer                     │
│  ┌──────────┬──────────┬────────┬────────┐  │
│  │  Tools   │  Hooks   │ Agents │ Config │  │
│  └──────────┴──────────┴────────┴────────┘  │
├─────────────────────────────────────────────┤
│         Platform Plugins                     │
│  Claude Code │ Gemini CLI │ Custom API │ …   │
└─────────────────────────────────────────────┘

Quick Start

# Clone and install
cd ~/ToolBox
git clone <your-repo> pai-universal
cd pai-universal
bun install

# Type check
bun run typecheck

Use in Code

import { createPAI } from './src/index.ts';

// Write your own plugin or use a built-in one
import { claudeCodePlugin } from './plugins/claude-code/index.ts';

const pai = await createPAI(claudeCodePlugin(), './workspace');

// Access core systems
const state = pai.algorithm.getState();
const memory = await pai.memory.loadAll();
const context = pai.context.build(fullContext);

Write Your Own Plugin

import type { PAIPlugin, PAIAdapter, PAIContext } from 'pai-universal';
import { BasePAIAdapter } from 'pai-universal';

class MyAdapter extends BasePAIAdapter {
  readonly name = 'my-platform';
  readonly version = '1.0.0';
  readonly description = 'My platform adapter';
}

export function myPlugin(): PAIPlugin {
  return {
    name: 'my-platform',
    version: '1.0.0',
    async createAdapter(context: PAIContext): Promise<PAIAdapter> {
      return new MyAdapter();
    },
  };
}

See plugins/README.md for the full adapter development guide.

Project Structure

src/
├── types.ts              # All core type definitions
├── adapter.ts            # Base adapter implementations
├── registry.ts           # Plugin registry
├── algorithm.ts          # Algorithm engine + ISA manager
├── memory.ts             # Three-tier memory system
├── identity.ts           # Principal + DA identity management
├── telos.ts              # Life goals management
├── skill.ts              # Skill discovery and registry
├── context-builder.ts    # Assembles context into prompts
└── index.ts              # Public API + createPAI helper

templates/                # Platform-agnostic templates
├── algorithm/            # Algorithm v6.3.0 definition
├── isa/                  # ISA format specification
├── identity/             # Principal + DA identity templates
├── telos/                # Mission, goals, challenges, etc.
├── memory/               # Memory system structure
├── prompts/              # System prompt + mode templates
└── config/               # Default configuration

plugins/                  # Platform adapter plugins
├── claude-code/          # Claude Code CLI adapter
└── README.md             # Plugin development guide

Core Concepts

Algorithm (v6.3.0)

The universal task engine. Every task follows: Current State → Ideal State via verifiable iteration (ISC).

Seven phases: OBSERVE → THINK → PLAN → BUILD → EXECUTE → VERIFY → LEARN

Five effort tiers (E1-E5) with escalating requirements for ISC count, thinking depth, and delegation.

ISA (Ideal State Articulation)

A structured document that is simultaneously:

  1. The ideal state description
  2. The test harness
  3. The build verification
  4. The done condition
  5. The system of record

12 sections, fixed order, tier-gated requirements.

Memory

Three tiers that compound over time:

  • WORK — active work, session-scoped
  • LEARNING — extracted patterns, failure modes, corrections
  • KNOWLEDGE — stable, permanent, rarely pruned

Telos

Your life operating parameters:

  • Missions (durable north stars)
  • Goals (measurable, ISC-bearing)
  • Strategies, Narratives, Challenges, Core Models

Identity

Two layers:

  • Principal — who you are, career, worldview, preferences
  • DA — your Digital Assistant's name, personality, writing style, autonomy boundaries

Adapter Interfaces

InterfacePurposeKey Methods
ToolAdapterFile ops, commands, searchreadFile, writeFile, runCommand, search
HookAdapterLifecycle eventson, emit, off
AgentAdapterAgent dispatchdispatch, register, list
ConfigAdapterConfigurationget, set, onChange
SkillAdapterSkill managementload, execute, register

License

MIT

Credits

Ported from PAI v5.0 by Daniel Miessler. Core concepts preserved; Claude Code dependencies abstracted into adapter layer.

Ver o original no GitHub

Bom para

Relacionados