convez.ai
MCP ServerAutomaçãoAvançado
lucianhanga

PersonalAI

lucianhanga/personal-ai

ChatGPT/Claude local com modelos abertos, RAG e segurança zero-trust

Ver no GitHub
BomPluginScore · de 0 a 100

Assistente de IA local-first que executa modelos open-source no seu próprio hardware, sem dependência de provedores externos. Oferece ingestão de documentos com RAG, histórico persistente, memória cross-chat, gateway seguro de ferramentas/MCP com aprovações, e orquestração multi-agente via LangGraph.

Instalação

$npx convez-ai lucianhanga/personal-ai

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
1
Forks
1
Acompanhando
0
Saúde
85%
Último commit
há 4 meses
Versão
v0.8.3
Issues abertas
28
Contribuidores
2

Casos de uso

  • Rodar assistente IA privado sem enviar dados para cloud
  • Ingerir e questionar documentos locais com RAG e citações
  • Orquestrar múltiplos agentes (planejador, pesquisador, crítico) com aprovação humana
  • Integrar ferramentas e MCP servers com controle granular de permissões e auditoria

Veredito

Projeto maduro (M8.1) focado em privacidade, segurança e autonomia do usuário. Ideal para desenvolvedores que querem IA local completa com orquestração multi-agente, RAG e zero-trust, mas exige infraestrutura Postgres/Ollama e experiência técnica.

README

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

PersonalAI

CI License: Apache-2.0 Status: M8.1 multi-agent graph done; M8.2 next Local-first Structured-output-first Security-first Conventional Commits

A local-first, omni-capable AI assistant — like ChatGPT/Claude, but it runs open-source models on your hardware, works with your files and tools, and reaches external providers only when you explicitly configure and approve it.

PersonalAI is extensible (tools + MCP), structured-output-first (schemas everywhere), open-source-first (verified provenance only), and security-first (zero-trust toward tools, files, prompts, model outputs, and MCP servers).

Current state: M0–M8.1 complete (Identity/multi-tenancy + the M8 multi-agent graph); M8.2 next. Streaming chat in a React UI over local Ollama models or remote OpenAI-compatible providers; chat-with-your-documents (file ingestion → pgvector RAG with citations); persistent conversation history; memory (per-chat short-term summary + cross-chat long-term memory you can view/edit/erase); a security-first Tool/MCP gateway (permissions, egress allowlist, schema-validated I/O, risk approval, audit) with live MCP server management (M7); a single-agent loop that autonomously calls tools and streams reasoning + answer, plus an opt-in multi-agent graph on LangGraph (planner → researcher → critic) with a durable human approval gate (M8.1, ADR-0012); and always-on multi-tenancy (ADR-0010) — Postgres Row-Level Security, an IdentityProvider (argon2id passwords + cookie sessions), and per-request tenant isolation. Local runs zero-login (app_mode=local); hosted mode adds real login + CSRF. The HTTP API is versioned under /api/v1 (see CHANGELOG). See the architecture report, the local chat guide, remote providers, files + RAG, memory, tools, the agent loop, and MCP servers.

Quickstart (local chat)

make setup
make db                      # local Postgres + pgvector (docker compose)
# terminal 1 — backend (local mode = zero-login; multi-tenancy runs as tenant #1)
PERSONALAI_DEFAULT_MODEL=qwen3:14b make run-backend
# terminal 2 — UI -> http://localhost:5173 (no token needed in local mode)
pnpm --filter @personalai/ui dev

Requires a local Ollama with a model pulled. app_mode defaults to local (zero-login dev). For multi-tenant hosted mode (real login + cookies + CSRF) set PERSONALAI_APP_MODE=hosted. Full guide: docs/guides/local-chat.md; all env vars are in .env.example.


Principles

PrincipleMeaning
Local-first, cloud-optionalFull core works offline; any egress is opt-in, per-provider, and visible.
Structured-output-firstAll agent ↔ backend ↔ tool ↔ UI messages are schema-validated.
Zero-trust I/OFiles, prompts, model outputs, tool results, and MCP servers are treated as adversarial.
Least privilege + explicit consentTools are off by default; grants are narrow, scoped, and revocable.
Verified provenanceEvery dependency has a known reputable maintainer, license, maturity, and a documented reason.
PortabilitySwap local ↔ remote models and storage backends behind stable interfaces.
Auditable & reproducibleAppend-only audit log, SBOM, signed releases, reproducible builds where feasible.

High-level architecture

A single-host modular monolith (hexagonal: ports & adapters + registries) fronting isolated runtimes — local model servers and sandboxed tools/MCP servers — with security, audit, and secrets as cross-cutting layers.

Clients (Tauri UI + MV3 extension, loopback)
        │
   API Gateway ── Auth/Settings
        │
   API Gateway ── Auth (IdentityProvider) + per-request tenant context (SecurityContext)
        │
   Conversation ── Agent Orchestration (single-agent loop; opt-in LangGraph multi-agent graph, ADR-0012) ── Structured-Output Validation
        │                    │
   File Ingestion       Tool/MCP Gateway ── Security Engine ── Sandbox (container/gVisor/WASM)
        │                    │
   Retrieval (RAG)      Model Abstraction/Router ── Ollama | llama.cpp | vLLM | remote (LiteLLM, opt-in)
        │
   Storage: PostgreSQL + pgvector · object store · secrets vault · append-only audit

Full diagram and rationale: architecture report.


Selected stack (planned, vetted)

AreaChoiceLicense
BackendPython + FastAPI (modular monolith)—
UITauri shell + web SPA (React/Svelte)MIT/Apache-2.0
Local model runtimeOllama (default) · llama.cpp · vLLMMIT / MIT / Apache-2.0
Remote provider gatewayLiteLLM (opt-in)MIT
Agent orchestrationSingle-agent loop + opt-in LangGraph multi-agent graph over the existing seams (ADR-0012)MIT
Auth / multi-tenancyargon2id + server sessions + Postgres RLS (ADR-0010)—
SchemasPydantic / Zod + JSON SchemaMIT
Storage / RAGPostgreSQL + pgvectorPostgreSQL License
IngestionApache Tika / IBM DoclingApache-2.0
Audiofaster-whisper (STT) / Piper (TTS)MIT

The complete, maintained provenance register (maintainer, license, maturity, security notes, reason, alternatives) lives in docs/supply-chain/SUPPLY-CHAIN.md.


Roadmap (high horizon)

Foundation → Talk → Know → Act → Reason → Sense → Reach → (Connect) → Harden

MilestoneDeliversStatus
M0Skeleton + contracts (all ports defined, CI/SBOM/signing skeleton)done
M1–M2Local chat (Ollama) → provider portabilitydone
M3Files + vector RAG (pgvector)done
M4Memory (short-term summary + long-term, semantic)done
M5Tool/MCP gateway + sandboxdone
M6Single-agent loop + tools (streamed reasoning + answer)done
M7MCP plug-in/out + verificationdone
Identity + multi-tenancyAlways-on auth + Postgres RLS tenant isolation (ADR-0010)done
Pre-M8 hardeningAudit-driven fixes (run_turn seam, unit-of-work, tenant tests, ...)done
M8.1Multi-agent graph on LangGraph (planner → researcher → critic) + durable human gate (ADR-0012)done
M8.2Tiered verification ladder + bounded schema-repair + accuracy-modenext
M9Multimodal (vision / STT / TTS)planned
M10Browser extension (MV3)planned
M11KAG / graph memory (graph upgrade of M4)planned
M12Hardening, signing, packaging, docsplanned

Details: §22 Modular Implementation Roadmap.


Documentation

DocPurpose
Architecture reportThe full research + high-level architecture (22 sections).
ADRsArchitecture Decision Records.
Threat modelTrust boundaries and threats (v1).
Security policyReporting and security posture.
Dependency policyProvenance, verification, SBOM, scanning rules.
Supply-chain registerLiving inventory of every dependency + creator.
Onboarding / dev guideHow to work in this repo.
ContributingGitHub flow, branching, commits, PRs.
ChangelogVersioning policy (semver in VERSION) and per-release history.

Contributing & workflow

This repo uses GitHub flow: main is protected; all work happens on short-lived feature branches merged via pull request. See CONTRIBUTING.md.


License

Apache-2.0 © 2026 Lucian Hanga.

Ver o original no GitHub

Bom para

Relacionados