Metadata-Version: 2.4
Name: coreason_runtime
Version: 0.3.0
Summary: The official zero-trust, high-throughput kinetic execution engine for the coreason-manifest ontology.
Project-URL: Homepage, https://github.com/CoReason-AI/coreason_runtime
Project-URL: Repository, https://github.com/CoReason-AI/coreason_runtime
Project-URL: Documentation, https://github.com/CoReason-AI/coreason_runtime
Author-email: Gowtham A Rao <gowtham.rao@coreason.ai>
License: # The Prosperity Public License 3.0.0
        
        Contributor: CoReason, Inc.
        
        Source Code: https://github.com/CoReason-AI/coreason_runtime
        
        ## Purpose
        
        This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
        
        ## Agreement
        
        In order to receive this license, you have to agree to its rules.  Those rules are both obligations under that agreement and conditions to your license.  Don't do anything with this software that triggers a rule you can't or won't follow.
        
        ## Notices
        
        Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
        
        ## Commercial Trial
        
        Limit your use of this software for commercial purposes to a thirty-day trial period.  If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
        
        ## Contributions Back
        
        Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
        
        ## Personal Uses
        
        Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
        
        ## Noncommercial Organizations
        
        Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
        
        ## Defense
        
        Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
        
        ## Copyright
        
        The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
        
        ## Patent
        
        The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
        
        ## Reliability
        
        The contributor can't revoke this license.
        
        ## Excuse
        
        You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
        
        ## No Liability
        
        ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
License-File: LICENSE
License-File: NOTICE
Keywords: active-inference,agents,llm,orchestration,sglang,temporal,wasm
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.14
Requires-Dist: coreason-manifest>=0.34.0
Requires-Dist: dlt>=1.24.0
Requires-Dist: extism>=0.5.0
Requires-Dist: fastapi>=0.135.2
Requires-Dist: httpx>=0.28.1
Requires-Dist: lancedb>=0.30.0
Requires-Dist: loguru>=0.7.2
Requires-Dist: outlines>=1.2.12
Requires-Dist: polars>=1.39.3
Requires-Dist: prometheus-client>=0.24.1
Requires-Dist: pyarrow>=23.0.1
Requires-Dist: pydantic-settings>=2.13.1
Requires-Dist: pydantic>=2.0
Requires-Dist: requests>=2.32.5
Requires-Dist: sglang>=0.5.2
Requires-Dist: streamlit>=1.55.0
Requires-Dist: temporalio>=1.24.0
Requires-Dist: typer>=0.24.1
Requires-Dist: uvicorn>=0.42.0
Description-Content-Type: text/markdown

# 🧠 coreason-runtime

[![PyPI - Version](https://img.shields.io/pypi/v/coreason_runtime.svg)](https://pypi.org/project/coreason_runtime)
[![CI](https://github.com/CoReason-AI/coreason-runtime/actions/workflows/ci.yml/badge.svg)](https://github.com/CoReason-AI/coreason-runtime/actions/workflows/ci.yml)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/coreason_runtime.svg)](https://pypi.org/project/coreason_runtime)
[![Downloads](https://img.shields.io/pypi/dm/coreason_runtime.svg)](https://pypi.org/project/coreason_runtime/)
[![License: Prosperity 3.0](https://img.shields.io/badge/License-Prosperity_3.0-blue.svg)](https://prosperitylicense.com/versions/3.0.0)
[![SOTA: 2026](https://img.shields.io/badge/Architecture-Kinetic_Engine-purple.svg)]()
<br>
[![Code Coverage](https://img.shields.io/codecov/c/github/CoReason-AI/coreason-runtime/main.svg)](https://codecov.io/gh/CoReason-AI/coreason-runtime)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![Code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Security: Bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
<br>
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Forks](https://img.shields.io/github/forks/CoReason-AI/coreason-runtime.svg)](https://github.com/CoReason-AI/coreason-runtime/network/members)
[![Powered By: AI](https://img.shields.io/badge/Powered%20By-CoReason%20AI-FF4500.svg)](https://coreason.ai)

**The official zero-trust, high-throughput kinetic execution engine for the `coreason-manifest` ontology.**

`coreason-runtime` is a State-of-the-Art (SOTA) 2026 cybernetic execution engine. It abandons legacy, fragile "chain-of-thought" LLM scripting in favor of deterministic **Active Inference**, Topological Data Analysis (TDA), and strictly bounded Markov Decision Processes.

If `coreason-manifest` is the DNA of your multi-agent topologies, `coreason-runtime` is the biological cell that safely executes them.

---

## 🚀 The Paradigm Shift

Modern enterprise AI cannot rely on unbounded `while True` loops and raw Python `exec()`. The `coreason-runtime` enforces mathematical rigor at every boundary:

* **Deterministic Orchestration:** Built on **Temporal**, Swarm executions are durably serialized. If a GPU dies or a network request fails, the Swarm pauses, rehydrates, and resumes exactly where it left off. No amnesia. No ghost processes.
* **Zero-Trust WASM Sandboxing:** Kinetic actions (Tools) are executed inside isolated WebAssembly environments via **Extism**. Agents can execute complex IO without ever touching your host's root kernel or filesystem.
* **Epistemic Vector Ledger:** Native, zero-copy integration with **LanceDB**. The runtime automatically projects the agent's latent state into an embedded vector memory layer.
* **Embedded Medallion Analytics:** No need for heavy Spark clusters. Raw telemetry (SSE) is ingested via **dlt** and transformed into Silver/Gold analytical intelligence matrices using Rust-backed **Polars** directly inside the daemon.
* **Human-in-the-Loop (HITL) Webhooks:** When an agent calculates high Variational Free Energy (epistemic uncertainty), it durably suspends its thread and emits an Oracle Request, waiting safely for a human expert to inject resolving priors via API.

---

## ⚡ Installation

We utilize `uv` for ultra-fast, deterministic resolution. Ensure you are running Python 3.14+.

```bash
uv add coreason-runtime
```

*Note: For bare-metal enterprise deployment with SGLang GPU passthrough, refer to our [Docker Deployment Guide](https://www.google.com/search?q=docs/DEPLOYMENT.md).*

-----

## 🛠️ Quickstart

The runtime is designed to be operated via its CLI or mounted as an API edge.

### 1\. Run a Local Swarm

To execute a mathematically verified agentic topology, simply pass the JSON/YAML manifest to the runtime:

```bash
coreason run ./my_swarm_manifest.json
```

### 2\. Boot the API Edge & Telemetry Broker

To boot the runtime as a continuous daemon (exposing the CRDT State Sync, Schema Projection, and Server-Sent Events telemetry):

```bash
coreason serve --port 8000
```

Your frontend IDE can now connect to `http://localhost:8000/api/v1/telemetry/stream` to visualize the active inference loops in real-time.

-----

## 🏗️ Architecture

The runtime operates across four isolated computational boundaries:

1.  **The Orchestrator:** Temporal Python SDK running deterministic AST-scanned workflows.
2.  **The Cognitive Engine:** SGLang routing for sub-millisecond constrained tensor inference.
3.  **The Kinetic Sandbox:** Extism executing `.wasm` MCP plugins.
4.  **The Epistemic Store:** LanceDB & Polars managing long-term vectors and ETL metrics.

For a deep dive into the cybernetic loop, read the [Architecture Documentation](https://www.google.com/search?q=docs/ARCHITECTURE.md).

-----

## 📜 License

This software is proprietary and dual-licensed under the **Prosperity Public License 3.0**.
Commercial use beyond a 30-day trial requires a separate commercial license. See the `LICENSE` file for details.

Copyright (c) 2026 CoReason, Inc.
