Skip to main content

Cryptographic memory integrity, audit trails, and verifiable lineage for AI agents.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cortex_persist-1.0.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cortex_persist-1.0.0-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

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

Hashes for cortex_persist-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c68294680f5f8df960b150bace3cd5470abc9d9e8aa827f4e97dc42bfb843759
MD5 d984d333ae1d377b0dd5863f69aaef64
BLAKE2b-256 3388e4d95172838c3932ab3ea59e6abd5081067e1a39f18b0ef5dcbdc51f78d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cortex_persist-1.0.0.tar.gz:

Publisher: release.yml on borjamoskv/Cortex-Persist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for cortex_persist-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9508fef7cd718fa1c3ec534a615d508ce667d702a04f12b6296cea4a5389e170
MD5 fae3467121786aa8d1bab2285af8b3e4
BLAKE2b-256 5bd12df111f427a8ffce6aa35d713816b064e2653d4926be0f2b92d1ea0451b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cortex_persist-1.0.0-py3-none-any.whl:

Publisher: release.yml on borjamoskv/Cortex-Persist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page