Skip to main content
CORTEX Persist — Tamper-evident memory for AI agents

█ CORTEX-PERSIST

Cryptographically Trace What Your AI Agent Knew.
Tamper-evident memory & decision lineage for AI agents. Cryptographic proof of what your agent knew.

GitHub Stars Python CI PyPI License Sponsor

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
CORTEX-Persist Terminal Execution

▀▄ 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:

  1. 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.
  2. 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.
  3. 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


LICENSE: Apache-2.0 | OPERATOR: borjamoskv | cortexpersist.com | Sponsor the Engine

Metadata

Release files for cortex-persist 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cortex-persist 1.0.0
File Size Uploaded Provenance Actions
cortex_persist-1.0.0.tar.gz 2.3 MB With provenance Details for cortex_persist-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cortex-persist 1.0.0
File Interpreter ABI Platform Actions
cortex_persist-1.0.0-py3-none-any.whl Python 3 none any Details for cortex_persist-1.0.0-py3-none-any.whl

Total release size: 5.3 MB

Release files / cortex_persist-1.0.0.tar.gz

Download URL cortex_persist-1.0.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
c68294680f5f8df960b150bace3cd5470abc9d9e8aa827f4e97dc42bfb843759
BLAKE2b-256 checksum
How to use checksums
3388e4d95172838c3932ab3ea59e6abd5081067e1a39f18b0ef5dcbdc51f78d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Release files / cortex_persist-1.0.0-py3-none-any.whl

Download URL cortex_persist-1.0.0-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9508fef7cd718fa1c3ec534a615d508ce667d702a04f12b6296cea4a5389e170
BLAKE2b-256 checksum
How to use checksums
5bd12df111f427a8ffce6aa35d713816b064e2653d4926be0f2b92d1ea0451b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

Security for cortex-persist 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cortex_persist-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page