Skip to main content

SQLite cognitive store and relationship graph for Cordis.

Project description

Cordis Memory

cordis-memory is the persistent cognitive store for Cordis. It uses Python's built-in SQLite support: no graph server, vector database, model, or network dependency is required.

It stores five durable kinds of cognition:

  • event: a task, plan, tool, test, error, or verification observation;
  • episode: a completed task experience;
  • knowledge: an evidence-backed fact with provenance;
  • pattern: a repeated independently sourced observation with confidence;
  • capability and principle: model/tool performance and stable action rules.

Memory scopes are conversation, workflow, project, and global. Project-scoped cognition is never returned to another project. Global knowledge is deliberately shared only when a caller requests global scope.

The relationship graph uses nodes and edges in the same SQLite database. The initial graph records task-to-event and event-to-tool relations; hosts can add their own project, artifact, model, environment, plan, and evidence nodes.

Minimal use

from cordis_memory import CognitiveStore

store = CognitiveStore("cordis-cognition.db")
store.record_event({
    "event_type": "tool_failed",
    "project_id": "my-app",
    "task_id": "task-1",
    "tool": "shell",
    "subject": "npm test",
    "actual": "exit code 1",
})

store.remember(
    kind="knowledge",
    subject="package manager",
    content="This project uses pnpm workspace.",
    scope="project",
    project_id="my-app",
    source_id="repo-readme",
)

snapshot = store.query(intent="package workspace", project_id="my-app")

Patterns begin as candidates and become active only after at least two independent source_id values support the same statement.

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_memory-0.1.1.tar.gz (9.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_memory-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cordis_memory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c15a13d14bad38ec7c4c9fd97894220d93174271c429be2dcecf2cac079e8cf5
MD5 579570b911101117e340dbc96cb0678d
BLAKE2b-256 c087371e4a8b8c45945ef17dcae7914ad78bda152bdea6faa181c5f21f7800d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_memory-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_memory-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cordis_memory-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f370f31d1a84cc1d60017f3a3b14ce7108fc035f2b291f1939393a3e1117eb3a
MD5 06ce66cb0dae5052ee6b07afca8ba63e
BLAKE2b-256 c178d2003d2f3623e523989d8efa4192dc033d4e4e123a3611228be4e8eeabc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_memory-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