Skip to main content

persistence layer for Cognitive State across the CoReason ecosystem

Project description

coreason-archive

Persistence layer for "Cognitive State" across the CoReason ecosystem.

CI/CD Docker codecov Python License Ruff pre-commit Poetry Pydantic v2

Executive Summary

coreason-archive is the persistence layer for "Cognitive State" across the CoReason ecosystem. It addresses the critical failure mode of modern AI: "Digital Amnesia."

Standard RAG (Retrieval Augmented Generation) only looks at static documents (coreason-mcp). coreason-archive looks at Dynamic Experience. It stores the reasoning traces, decisions, and user preferences generated during runtime.

Version 3.0 upgrades the architecture from a simple Vector Cache to a Hybrid Neuro-Symbolic Memory System. It combines Vector Search (for semantic similarity) with a Knowledge Graph (for structural relationships) and a Temporal Engine (for time-decay). This ensures that an agent doesn't just recall "similar text" but understands "who, when, and why" a decision was made, respecting strict enterprise boundaries.

Functional Philosophy

The agent must implement the Scope-Link-Rank-Retrieve Loop:

  1. Hybrid Memory Structure (Neuro-Symbolic):
    • Semantic (Vector): "Find thoughts similar to 'Dosing Protocol'."
    • Structural (Graph): "Find all thoughts linked to 'Project Apollo' and 'Dr. Smith'."
    • SOTA Best Practice: Using vectors for fuzzy matching and graphs for explicit entity tracking prevents "Context Collapse" in complex workflows.
  2. Federated Scoping (The Hierarchy of Truth):
    • Memory is not a flat bucket. It is a hierarchy: User > Project > Department > Global.
    • A "User Preference" (e.g., "Don't use tables") overrides a "Global Default."
  3. Active Epistemic Decay:
    • Knowledge has a half-life. A cached thought about "Q3 Strategy" is worthless in Q4.
    • We implement Time-Aware Retrieval where older memories have lower retrieval scores unless explicitly pinned.
  4. Memory Portability (The Digital Twin):
    • When a user moves departments, their personal cognitive state follows them, but their former team's secrets are left behind.
  5. Asynchronous & Framework-Agnostic:
    • The system utilizes a TaskRunner abstraction (defaulting to asyncio/anyio) to handle background ingestion tasks, ensuring it can be integrated into any Python stack (FastAPI, Django, CLI) without vendor lock-in.

Getting Started

Prerequisites

  • Python 3.12+
  • Poetry

Installation

  1. Clone the repository:
    git clone https://github.com/example/example.git
    cd my_python_project
    
  2. Install dependencies:
    poetry install
    

Usage

  • Run the linter:
    poetry run pre-commit run --all-files
    
  • Run the tests:
    poetry run pytest
    

For detailed documentation, please refer to the docs/ folder or the MkDocs site.

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

coreason_archive-0.5.1.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

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

coreason_archive-0.5.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file coreason_archive-0.5.1.tar.gz.

File metadata

  • Download URL: coreason_archive-0.5.1.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coreason_archive-0.5.1.tar.gz
Algorithm Hash digest
SHA256 4db297111855e4a83a3e46940113eea7d1fde1f6fe012fa3933216c73a8f4db4
MD5 7c462f64b0ff8346efe09fe32eab774d
BLAKE2b-256 2e99d14e1bf0e080ec4d6503240d3959d9b28d70b97a480b44a978f01a0a1898

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_archive-0.5.1.tar.gz:

Publisher: publish.yml on CoReason-AI/coreason-archive

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

File details

Details for the file coreason_archive-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for coreason_archive-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15f89a6a595d1aebe66d148d58f11a9fd5082451ed81a93f9a2625480334a8da
MD5 1752f79f8bfbe970ec7e37c62e57077a
BLAKE2b-256 fdd3efc5ac57ecc2984a708a937e1bd6463800dd005e7fd9763e7351c668ca96

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_archive-0.5.1-py3-none-any.whl:

Publisher: publish.yml on CoReason-AI/coreason-archive

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