Skip to main content

Cordis Runtime v0.4

Cordis Runtime is the minimal host bridge for Cordis Core. It does not call a model and it does not split tasks.

The semantic boundary is explicit:

user language
    -> host/main model interprets intent
    -> structured Task Contract
    -> Cordis Runtime + Core
    -> difficulty policy + model context
    -> optional Planner proposes PlanIR
    -> Runtime admits plan, advances steps, then closes Core feedback

For an agent with tool calling, the host/main model fills the task contract as part of its normal turn. The optional cordis-planner can use a model callable to propose a PlanIR. Neither Runtime nor Planner executes a tool: Runtime owns the deterministic workflow state and the host remains the executor.

Minimal use

from cordis_core import CordisRuntime
from cordis_runtime import CordisHostRuntime

runtime = CordisHostRuntime(CordisRuntime("cordis-state.json"))

turn = runtime.begin({
    "task": {
        "goal": "Fix the login integration test",
        "domain": "software",
        "project_id": "my-app",
        "strategy_id": "inspect_logs_first",
        "stakes": "medium",
    },
    "complexity": 0.4,
    "current_step": "Inspect the failing test and logs",
    "constraints": ["Do not change the database schema"],
    "acceptance_evidence": ["login integration test passes"],
})

# Send turn["model_context"] to the host's existing planner or main model.

The host calls check_action(...) before an action, observe(...) for any plan/tool/artifact/test/error event, and finish(...) with observable evidence after execution. When constructed with a CognitiveStore, Runtime retrieves a small project-safe snapshot on begin, supports deduplicated query(...), and persists the final episode through finish(...).

Managed host lifecycle

Hosts should normally use CordisManagedSession instead of asking a model to construct separate begin, observe, and finish calls. The host creates the task once, translates its own tool/test telemetry into a small typed event set, then closes from accumulated evidence:

from cordis_runtime import CordisManagedSession

session = CordisManagedSession(runtime)
turn = session.start(task_payload)

# The host, not the model, emits this after its test runner returns.
session.record({
    "type": "test_passed",
    "summary": "pytest tests/test_login.py passed",
    "acceptance_id": "criterion-1",
    "tool": "pytest",
})
result = session.complete(lesson="The login integration test now passes.")

tool_succeeded, tool_failed, test_passed, test_failed, verification_passed, verification_failed, and note are supported. The session rejects malformed, unknown, and out-of-order events; it derives the final result from declared acceptance evidence rather than trusting a model to claim success.

Workflow boundary

Runtime provides:

  • structured Task Contract validation through Core;
  • task-local Focus State;
  • deterministic control modes;
  • compact model context;
  • an experimental lexical drift heuristic, never a safety or attention guarantee;
  • evidence-bound feedback delegation.
  • optional CognitiveStore retrieval, event capture, and episode write-back.
  • a durable workflow controller for task contracts, six-axis difficulty, PlanIR admission, active steps, results, explicit replan, and feedback closure.

Runtime does not provide natural-language interpretation, model selection, provider SDKs, tool execution, parallel scheduling, durable conversation memory, or an HTTP service. The optional planner can propose plans but cannot approve or execute them.

check_action is deliberately conservative metadata: it reports lexical overlap and obvious destructive terms. Hosts must not treat it as semantic understanding, an authorization decision, or a complete attention-drift guard.

Download files

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

Source Distribution

cordis_runtime-0.4.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

cordis_runtime-0.4.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file cordis_runtime-0.4.0.tar.gz.

File metadata

  • Download URL: cordis_runtime-0.4.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cordis_runtime-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c5c8d3f46f69bdeedb9f31f10336ad3e4f6fe12221e9ec59b09177618e892a5c
MD5 2a33d276e3d266dc81ea30ed85b5db04
BLAKE2b-256 bbe4f76ef30be61ca2edb3e08f1481fbdfddb22aeba1a0ea59ef33f6024e5b56

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_runtime-0.4.0.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_runtime-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: cordis_runtime-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cordis_runtime-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45ce3c9236034a9757216e20cd95c6500acdbedeeed68cef04f25bf652c1122d
MD5 cf607763e777416e624059ea9856d988
BLAKE2b-256 c0709bebfdd4047f90cafb105ea5d995fc50fd4812f7b33b64450665dd58ae3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordis_runtime-0.4.0-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.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

This release

0.4.0 This release

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page