persistence layer for Cognitive State across the CoReason ecosystem
Project description
coreason-archive
Persistence layer for "Cognitive State" across the CoReason ecosystem.
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:
- 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.
- 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."
- 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.
- 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.
- Asynchronous & Framework-Agnostic:
- The system utilizes a
TaskRunnerabstraction (defaulting toasyncio/anyio) to handle background ingestion tasks, ensuring it can be integrated into any Python stack (FastAPI, Django, CLI) without vendor lock-in.
- The system utilizes a
Getting Started
Prerequisites
- Python 3.12+
- Poetry
Installation
- Clone the repository:
git clone https://github.com/example/example.git cd my_python_project
- Install dependencies:
poetry install
Usage
- Run as a Service (REST API):
poetry run uvicorn coreason_archive.server:app --host 0.0.0.0 --port 8000
- Run CLI (Add Thought):
poetry run python src/coreason_archive/main.py add --prompt "Test" --response "Test Response" --user "Alice"
- 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
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 coreason_archive-0.6.0.tar.gz.
File metadata
- Download URL: coreason_archive-0.6.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e8902daff026b539bc59a2202aff91f69ec66917b5ee478ee95eed83227eff
|
|
| MD5 |
318593977d1daa9488802c37a3e7605a
|
|
| BLAKE2b-256 |
63c8fa2116141660cbb88e69dfe795b566be8a50921d22d77cf16793d7cd1e68
|
Provenance
The following attestation bundles were made for coreason_archive-0.6.0.tar.gz:
Publisher:
publish.yml on CoReason-AI/coreason-archive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coreason_archive-0.6.0.tar.gz -
Subject digest:
e9e8902daff026b539bc59a2202aff91f69ec66917b5ee478ee95eed83227eff - Sigstore transparency entry: 872224524
- Sigstore integration time:
-
Permalink:
CoReason-AI/coreason-archive@1b548c01d06fb625ec3e18cfe6157c86315a1b0d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/CoReason-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1b548c01d06fb625ec3e18cfe6157c86315a1b0d -
Trigger Event:
release
-
Statement type:
File details
Details for the file coreason_archive-0.6.0-py3-none-any.whl.
File metadata
- Download URL: coreason_archive-0.6.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dfd3f8180e1e489001ed1acd07e7cee44e9be6861ef0e6a4f0cc1df5d2434a7
|
|
| MD5 |
5c0cf4de86348948263c95af94e72654
|
|
| BLAKE2b-256 |
e7530c659034b2811bddd5900ae488a3f2faf35ef39f59d74bc76a36e48cb347
|
Provenance
The following attestation bundles were made for coreason_archive-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on CoReason-AI/coreason-archive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coreason_archive-0.6.0-py3-none-any.whl -
Subject digest:
5dfd3f8180e1e489001ed1acd07e7cee44e9be6861ef0e6a4f0cc1df5d2434a7 - Sigstore transparency entry: 872224535
- Sigstore integration time:
-
Permalink:
CoReason-AI/coreason-archive@1b548c01d06fb625ec3e18cfe6157c86315a1b0d -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/CoReason-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1b548c01d06fb625ec3e18cfe6157c86315a1b0d -
Trigger Event:
release
-
Statement type: