Protect Private Docs, Cut Cloud Tokens by 78%β95%, and Sync 8 Coding Harnesses
Cortical is a pure-Python stdlib control plane, deterministic Zero-LLM Privacy Vault, lossless TOON compressor, and multi-runner local/hybrid orchestrator supporting Ollama, Unsloth Studio, LM Studio, llama.cpp, MLX, and vLLM.
--dry-run)
β View Source & ADRs on GitHub
4096 clipping)cortical-mcp stdio surface (~4.5 ms handshake, incl. cortical next) + opt-in 5-tool cortical-wikiπ‘οΈ Spotlight: Fail-Closed Privacy Vault β Works 100% Without Any Local LLM Runner
Sanitize contracts, resumes, financial exports, and architecture specs using pure Python 3.10+ stdlib before any cloud agent sees a single token.
π Multi-Format Metadata Stripβ‘ Zero-LLM
Extracts text while stripping hidden author/company XML metadata from .docx, .xlsx, .pptx, selectable .pdf, .md, .txt, and .jsonβwith zero third-party packages and zero LLM daemons.
π 3-Channel Fail-Closed Egressβ‘ Zero-LLM
Masks Email, IBAN, Tax IDs, Phone, IPs, API secrets, and custom client/project terms while preserving 100.0% of technical identifiers (PostgreSQL, FastAPI, Kubernetes). Blocks max_security items from remote cloud MCP egress.
π Cryptographic SHA-256 Ledgerβ‘ Zero-LLM
Every ingest, sanitized read, and blocked cloud egress event is chained into a tamper-evident SHA-256 audit log (cortical vault audit --verify) that never stores raw PII.
π§ Pluggable Multi-Runner Engine & 10 Reusable @role:* Model Slots
Never hardcode model tags or lock into a single local daemon. Bind semantic roles once and sync across all 8 coding harnesses.
ποΈ 7 Supported Local RunnersRunner-Neutral
- Ollama (
127.0.0.1:11434β native/api/chat+ dynamicnum_ctx) - Unsloth Studio (
127.0.0.1:8888/v1β dynamic UD variable quantization) - LM Studio (
127.0.0.1:1234/v1β desktop GUI + OpenAI-compatible VLM/LLM server) - llama.cpp (
llama-server :8080/v1) & Apple MLX (mlx_lm.server :8080/v1) - vLLM (
127.0.0.1:8000/v1) & any custom OpenAI-compatible endpoint or LiteLLM Router (:4000/v1)
π 10 Semantic Model Roles@role:*
Reference abstract roles across rules, MCP offload, and LiteLLM routing instead of fragile model filenames:
@role:router Β· @role:ner Β· @role:fast_coder Β· @role:daily_coder Β·
@role:reviewer Β· @role:summarizer Β· @role:deep_reasoner Β·
@role:orchestrator Β· @role:vision Β· @role:embedder
Syncs idempotently across Antigravity, pi, Claude Code, Codex, OpenCode, OpenClaw, dsh, and Unsloth Studio.
βοΈ Transparent 2-Tier Capability Matrix
Everything in Tier 1 works out-of-the-box on any machine with Python 3.10+. Tier 2 activates automatically when you connect any local runner.
| Capability | Execution Tier | Local Runner Needed? | Details |
|---|---|---|---|
| Privacy Vault (Text, JSON, DOCX/XLSX/PPTX, Selectable PDF) | β‘ Tier 1 Β· Zero-LLM Stdlib | No | Deterministic PII + secret + custom-term masking, XML metadata stripping, fail_closed guard, and SHA-256 audit ledger. |
| Lossless TOON Compression & 8-Harness Sync | β‘ Tier 1 Β· Zero-LLM Stdlib | No | cortical_compress (-78.12% vs pretty JSON), cortical doctor, cortical sync --dry-run, and timestamped --rollback. |
Zero-Server Interactive Control Plane (settings.html) |
β‘ Tier 1 Β· Zero-LLM Stdlib | No | Standalone 6-domain HTML/CSS/JS SPA (zero CDNs, zero open ports) with 1-click Presets A/B/C and in-browser PII preview. |
Image / Scanned-PDF OCR (cortical watch) & --ner |
π§ Tier 2 Β· Local Runner | Yes (@role:vision / @role:ner) |
100% offline multimodal OCR and extra unstructured NER via Ollama, Unsloth Studio, LM Studio, llama.cpp, MLX, or vLLM. |
Zero-Cloud-Token Code Offload (cortical_local_offload) |
π§ Tier 2 Β· Local Runner | Yes (@role:daily_coder / @role:reviewer) |
Reads local files directly on disk (-95.80% cloud input tokens) and summarizes/reviews locally. |
π Safe 4-Step Quickstart (Preview First with --dry-run + Instant --rollback)
Cortical never touches harness files silently. Benchmark, diagnose, preview the exact diff, and apply with an automatic rollback snapshot.
git clone https://github.com/ccancellieri/cortical.git
cd cortical && ./install.sh
# 1. Verify lossless TOON, Zero-LLM Privacy Vault & 8-tool MCP
.venv/bin/cortical bench --compare
# 2. Inspect OS/RAM/VRAM tier, Tier-1 Stdlib & detected runners
.venv/bin/cortical doctor
# 3. Preview exact harness diffs FIRST (modifies 0 files)
.venv/bin/cortical sync --dry-run
# 4. Apply with timestamped backup (undo anytime via --rollback)
.venv/bin/cortical sync
# Undo anytime: .venv/bin/cortical sync --rollback <backup_id>
π₯οΈ Test in Browser in 10 Seconds0 Install
Want to explore Cortical before cloning? Open the self-contained 6-Domain Zero-Server Control Plane right here on GitHub Pages:
- Switch between Preset A (4 GB VRAM Hybrid), Preset B (16 GB Apple Silicon 27B), and Preset C (Remote Supervisor + fail_closed Guard).
- Test live client-side PII masking in the Privacy Vault Redaction Studio.
- Inspect
@role:*bindings, multi-runner selection, and export secret-freecortical-profile.jsonbundles.