Skip to main content

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


Download files

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

Source Distribution

cordis_core-0.1.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

cordis_core-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file cordis_core-0.1.1.tar.gz.

File metadata

  • Download URL: cordis_core-0.1.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cordis_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a36715451d302707ee091422eb089af4db9febdb5c32940d9b0dc729a2253547
MD5 73ed05e158808a4ee0271334c15973d7
BLAKE2b-256 2d7d2a2fce5a1ee17fa4aa2776d8b4d2adbbef6336b8bf12c04dde9221ed23f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_core-0.1.1.tar.gz:

Publisher: publish-pypi.yml on ntoniorvn-blip/cordis

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

File details

Details for the file cordis_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cordis_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cordis_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 187d3c05a8058f930c31f60df1e440a4f662bf27378a4a68b6924653b09ea594
MD5 3634437526bd001de0d8f14aaa9c0d57
BLAKE2b-256 20b324ddcac2f4e1ec2a0b3d0d49503df658de4c463bb4f6f90dda3673961b63

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_core-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on ntoniorvn-blip/cordis

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