A persistent, model-agnostic cognitive core for AI agents.
Project description
Cordis Core
Cordis Core is a persistent, model-agnostic cognitive core for AI agents. It does not call models, execute tools, or own an agent loop.
Version 0.1 has one narrow purpose: make evidence from a completed task change the cognitive constraints of a later task. See ROADMAP.md for the planned Runtime and optional plugin layers.
Its closed loop is:
Task -> Preflight -> Cognitive IR -> external execution -> Evidence + Outcome
-> Difference + Attribution -> state update -> next Preflight
Attribution is evidence-backed. A workflow can provide a reviewed attribution
hint only when it agrees with the evidence kind; otherwise Cordis uses
transparent evidence-kind rules and falls back to unknown rather than
inventing a causal claim. Cordis then calculates the prediction difference and
updates only the matching cognitive state.
Feedback is deliberately terminal and evidence-bound:
- each task ID is immutable and may receive exactly one feedback event;
- success must prove every required acceptance criterion from Preflight;
- outcomes, scores, and evidence cannot contradict one another;
- world patterns require independent observation sources, not duplicate evidence in one execution.
The core retains only state that can change a later decision:
- episodic memory: evidence-backed task experience;
- world patterns: repeated, evidence-backed external regularities;
- strategy statistics and normalized strategy entropy.
status() exposes aggregate domain and strategy state plus the most recent
failed events, so a host can surface a learning failure rather than silently
storing it.
Quick example
from cordis_core import CordisRuntime
runtime = CordisRuntime("cordis-state.json")
first = runtime.preflight({
"task": {
"goal": "Start an HTTP adapter in a clean environment",
"domain": "software",
"project_id": "cordis",
"strategy_id": "import_runtime_dependencies",
},
"acceptance_evidence": ["clean-environment test passes"],
})
runtime.feedback({
"task_id": first["task"]["id"],
"outcome": "failure",
"attribution": "strategy",
"lesson": "Avoid import-time runtime initialization in reusable modules.",
"evidence": [{"kind": "test", "passed": False, "summary": "clean import failed"}],
})
second = runtime.preflight({
"task": {
"goal": "Start an HTTP adapter in a clean environment",
"domain": "software",
"project_id": "cordis",
"strategy_id": "import_runtime_dependencies",
},
})
assert "repeat_failed_strategy:import_runtime_dependencies" in second["strategy"]["avoid"]
Development
cd cordis-core
python -m pip install -e .
python -m unittest discover -s tests -v
For a source-tree-only run, use $env:PYTHONPATH='src' before the test
command. The package has no runtime dependencies.
Public API
CordisRuntime.preflight(task)returns a serializable Cognitive IR.CordisRuntime.feedback(result)finalizes one task and updates state.CordisRuntime.status()returns observable aggregate state and recent failures.
Boundaries
Cordis Core intentionally excludes task intake, planning, model routing, tool
execution, HTTP serving, and agent-specific adapters. Those belong in optional
packages such as cordis-socrates, cordis-workflow, and host adapters.
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 cordis_core-0.2.0.tar.gz.
File metadata
- Download URL: cordis_core-0.2.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
197cece7f270f71ce0bf1262df95c585766c87123e49f83db648824b74489f93
|
|
| MD5 |
aed067029968537789d34fcc941b0bd6
|
|
| BLAKE2b-256 |
66449a8471c714b616139947d5421a7bcdce4a9dcc0ccd51d360b5ff23258055
|
Provenance
The following attestation bundles were made for cordis_core-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on ntoniorvn-blip/cordis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cordis_core-0.2.0.tar.gz -
Subject digest:
197cece7f270f71ce0bf1262df95c585766c87123e49f83db648824b74489f93 - Sigstore transparency entry: 2201671471
- Sigstore integration time:
-
Permalink:
ntoniorvn-blip/cordis@f910fe564c3b1fe4edd91670a3aa8d6eb022b373 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ntoniorvn-blip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f910fe564c3b1fe4edd91670a3aa8d6eb022b373 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cordis_core-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cordis_core-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7214b562d804553012008491cf90df46e0bae31fbe11f90e1bd497f8bb666e8
|
|
| MD5 |
983c70639e2085ed955f00ef8e708427
|
|
| BLAKE2b-256 |
0aacb0fc5198acbb0c2a7cb9f50c7a309c530b3f64f348d77afa830f7138b6fe
|
Provenance
The following attestation bundles were made for cordis_core-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ntoniorvn-blip/cordis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cordis_core-0.2.0-py3-none-any.whl -
Subject digest:
c7214b562d804553012008491cf90df46e0bae31fbe11f90e1bd497f8bb666e8 - Sigstore transparency entry: 2201671655
- Sigstore integration time:
-
Permalink:
ntoniorvn-blip/cordis@f910fe564c3b1fe4edd91670a3aa8d6eb022b373 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ntoniorvn-blip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f910fe564c3b1fe4edd91670a3aa8d6eb022b373 -
Trigger Event:
release
-
Statement type: