Cryptographic memory integrity, audit trails, and verifiable lineage for AI agents.
Project description
█ CORTEX-PERSIST
Cryptographically Trace What Your AI Agent Knew.
Tamper-evident memory & decision lineage for AI agents. Cryptographic proof of what your agent knew.
AESTHETIC: INDUSTRIAL NOIR 2026 (#0A0A0A / #2B3BE5)
EPISTEMOLOGY: C5-REAL (Cryptographically Verified Reality)
CORE TENET: EPISTEMIC HUMILITY (Generative output is conjecture; Evidence is absolute)
ARCHITECTURE: ZERO-UI / O(1) DETERMINISTIC SUBSTRATE
▀▄ QUICK DEMO (3 MINUTES)
See the C5-REAL verification loop, semantic search, and tampering detection in action instantly.
git clone https://github.com/borjamoskv/Cortex-Persist.git
cd Cortex-Persist
pip install -e ".[dev,acceleration]"
# Run the canonical tampering detection demo
python examples/demo_canonical.py
▀▄ THE EPISTEMIC CONTAINMENT SHIELD
Generative AI output is fundamentally probabilistic conjecture. Traditional logs blindly trust stochastic output.
CORTEX-PERSIST intercepts stochastic text, enforces a deterministic shield via Z3 SMT Guards, and commits the state to a cryptographically bound Ledger.
| CAPABILITY | TRADITIONAL RAG / LOGS | CORTEX-PERSIST |
|---|---|---|
| Trust Model | Trust the Process | Verify the Evidence (C5-REAL) |
| Mutation | Silent CRUD / Overwritable | Append-Only + SHA-256 Merkle Seals |
| Agent Liability | Ambiguous reconstruction | Mathematically Defensible Lineage |
| Verification | Manual log diving | O(1) Portable JSON Audit Packs |
| Performance | Blocked by I/O and GIL | Rust-FFI Core (~390k Agents/Sec) |
ZERO-FRICTION SOVEREIGN INTEGRATION
Inject the CORTEX memory substrate into any existing agent pipeline via our magic decorator.
import asyncio
from cortex.magic import sovereign_persist
@sovereign_persist(memory="cortex-cloud", strict=True)
async def my_agent_chain(user_prompt: str):
# CORTEX intercepts, verifies, and cryptographically seals memory autonomously.
response = await llm.generate(user_prompt)
return response
▀▄ ARCHITECTURE & DATA FLOW
graph TD
classDef default fill:#0A0A0A,stroke:#2B3BE5,stroke-width:1px,color:#F0F0F0;
classDef highlight fill:#2B3BE5,stroke:#CCFF00,stroke-width:1.5px,color:#FFFFFF;
classDef guard fill:#1A1A1A,stroke:#FF0055,stroke-width:1px,color:#F0F0F0;
subgraph Stochastic Space
LLM[Agent Stochastic Output]:::default
end
subgraph Epistemic Membrane [CORTEX-Persist Containment Shield]
direction TB
G1[Z3 SMT Guard / Admission Gate]:::guard
VSA[Zero-Copy VSA Ring Buffer]:::default
mmap[( mmap Silicon Space )]:::default
Hash[SHA-256 Block Sealing]:::default
Merkle[Merkle Provenance Chain]:::default
end
subgraph Trust Substrate
Ledger[(Append-Only AOF Ledger)]:::highlight
Proof[Verifiable Audit Pack JSON]:::default
end
LLM -->|Decision / Observation| G1
G1 -->|Passed Asserts| VSA
VSA -->|Zero I/O Overhead| mmap
VSA -->|Batch Commit| Hash
Hash -->|Hash Link| Merkle
Merkle -->|State Anchoring| Ledger
Ledger -->|Generate| Proof
style Epistemic Membrane fill:#050505,stroke:#2B3BE5,stroke-dasharray: 5 5;
style Trust Substrate fill:#050505,stroke:#CCFF00,stroke-dasharray: 5 5;
▀▄ REAL-WORLD USE CASES
Check out the examples/ directory for ready-to-run scenarios:
- Automated Pricing Agent (
demo_pricing_agent.py): Watch an AI modify enterprise pricing while CORTEX records a cryptographic audit trail ensuring the discount logic was sound. - Customer Support Escalation (
demo_support_approval.py): A support bot grants a refund. CORTEX seals the decision lineage so the supervisor has mathematical proof of why the AI approved it. - Canonical Loop (
demo_canonical.py): A showcase of the full C5-REAL execution, demonstrating how the ledger reacts to malicious state tampering attempts.
▀▄ INSTALLATION & DEPLOYMENT
Requirements: Python 3.10+. Zero external daemons required.
pip install cortex-persist
# Optional Core Modules
pip install "cortex-persist[embeddings]" # Local semantic embeddings
pip install "cortex-persist[knowledge]" # Chroma-backed knowledge sync
pip install "cortex-persist[api,mcp,daemon]" # Web Server & MCP endpoints
▀▄ TERMINAL STATE 4: SILICON DISPERSION
Thermodynamic constraints conquered. Python GIL annihilated. Achieving ~390k Agents/Sec.
- Rust-Native Swarm Engine: Parallel task execution via Rust
rayon. - VSA Memory (Zero-Copy): O(1) Ring Buffer (mmap). OS I/O overhead bypassed.
- ZK-STARK Ledger Seals: Cryptographic transaction proofs. Inter-nodal mesh trust.
- Live Telemetry: Industrial Noir 20Hz WebSocket daemon. Real-time exergy metrics on
agents.archi.
▀▄ ARCHITECTURE DATABANKS
- SECURITY_TRUST_MODEL.md — Cryptographic invariants & guarantees.
- AGENTS.md — Substrate directives for autonomous orchestration.
- ROADMAP.md — Deployment phases and LEGION-10k scaling logic.
- API Reference — SDK primitives and REST endpoints.
LICENSE: Apache-2.0 | OPERATOR: borjamoskv | cortexpersist.com | Sponsor the Engine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cortex_persist-1.0.0.tar.gz.
File metadata
- Download URL: cortex_persist-1.0.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c68294680f5f8df960b150bace3cd5470abc9d9e8aa827f4e97dc42bfb843759
|
|
| MD5 |
d984d333ae1d377b0dd5863f69aaef64
|
|
| BLAKE2b-256 |
3388e4d95172838c3932ab3ea59e6abd5081067e1a39f18b0ef5dcbdc51f78d6
|
Provenance
The following attestation bundles were made for cortex_persist-1.0.0.tar.gz:
Publisher:
release.yml on borjamoskv/Cortex-Persist
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_persist-1.0.0.tar.gz -
Subject digest:
c68294680f5f8df960b150bace3cd5470abc9d9e8aa827f4e97dc42bfb843759 - Sigstore transparency entry: 1739809213
- Sigstore integration time:
-
Permalink:
borjamoskv/Cortex-Persist@5617a47e5faac8a26996ee209b08400aa3c78de6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/borjamoskv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5617a47e5faac8a26996ee209b08400aa3c78de6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cortex_persist-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cortex_persist-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9508fef7cd718fa1c3ec534a615d508ce667d702a04f12b6296cea4a5389e170
|
|
| MD5 |
fae3467121786aa8d1bab2285af8b3e4
|
|
| BLAKE2b-256 |
5bd12df111f427a8ffce6aa35d713816b064e2653d4926be0f2b92d1ea0451b7
|
Provenance
The following attestation bundles were made for cortex_persist-1.0.0-py3-none-any.whl:
Publisher:
release.yml on borjamoskv/Cortex-Persist
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_persist-1.0.0-py3-none-any.whl -
Subject digest:
9508fef7cd718fa1c3ec534a615d508ce667d702a04f12b6296cea4a5389e170 - Sigstore transparency entry: 1739809220
- Sigstore integration time:
-
Permalink:
borjamoskv/Cortex-Persist@5617a47e5faac8a26996ee209b08400aa3c78de6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/borjamoskv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5617a47e5faac8a26996ee209b08400aa3c78de6 -
Trigger Event:
push
-
Statement type: