Deterministic, auditable AI cognition runtime — not an LLM wrapper
Project description
Phionyx Core SDK
Deterministic AI runtime that treats LLM outputs as sensor measurements, not decisions.
Most AI frameworks let the LLM decide. Phionyx doesn't. Every LLM response passes through a 46-block deterministic pipeline with safety gates, ethics checks, and physics-based state tracking — before it reaches the user.
What Makes This Different
| Feature | Typical LLM Framework | Phionyx |
|---|---|---|
| LLM role | Decision maker | Sensor (output is measurement, not truth) |
| Response control | Post-hoc filtering | Pre-response governance (46-block pipeline) |
| State tracking | Stateless or conversation history | Structured state vector (A, V, H, phi, entropy) |
| Safety | Optional guardrails | Mandatory gates (kill switch, ethics, HITL) |
| Determinism | Non-deterministic | Reproducible cognitive path |
| Memory | RAG / vector search | Impact-weighted semantic time eviction |
Try It In 30 Seconds
Three demo notebooks. No API key. Runs locally.
The substrate (state vector, Φ, governance gates, pipeline) is demonstrable without an LLM, server, or external account. Each notebook runs end-to-end in seconds and embeds its outputs.
| # | Notebook | Shows |
|---|---|---|
| 01 | Determinism and Physics | EchoState2, calculate_phi_v2_1, 1000-run determinism proof, side-by-side with a noisy alternative |
| 02 | Kill Switch in Action | KillSwitch with 4 triggers + NaN fail-closed guard, tamper-evident event log |
| 03 | Pipeline Blocks and Audit | Canonical 46-block pipeline (v3.8.0), custom block subclass, 100-run determinism |
Notebook 01 sweeps the cognitive component of Φ across the full Circumplex (valence × arousal). The surface is smooth, bounded, and reproducible — no LLM is involved at this layer.
git clone https://github.com/halvrenofviryel/phionyx-research.git
cd phionyx-research
pip install -e . jupyter matplotlib
jupyter notebook examples/notebooks/
Quick Start — Full Runtime
For the LLM-backed orchestrator (governed response, state metrics, audit trail):
from phionyx_core import EchoOrchestrator, OrchestratorServices
services = OrchestratorServices()
orchestrator = EchoOrchestrator(services=services)
result = await orchestrator.run(
user_input="How can I improve my study habits?",
mode="edu",
current_amplitude=5.0,
current_entropy=0.3
)
# Returns: governed response + state metrics + audit trail
See examples/fastapi/ for an HTTP endpoint wrapper.
Architecture
Phionyx implements three integrated layers:
Layer 1 — Deterministic Cognitive Kernel
- 46-block canonical pipeline (contract v3.8.0)
- Structured state vector: arousal, valence, entropy, time
- Hybrid Resonance Model for cognitive quality (Phi)
- Response revision gate:
pass | damp | rewrite | regenerate | reject
Layer 2 — Safety & Governance
- 4-gate pre-response control (Outbound, Merge, Release, Data)
- Kill switch with 4 triggers (fail-closed)
- Deliberative ethics engine (4-framework reasoning)
- Human-in-the-loop queue with priority and expiry
- Ed25519-signed audit trail with hash chains
Layer 3 — Semantic Time Memory
- Impact-weighted cache eviction (+24% vs LRU, +72% vs FIFO)
- Monotonic semantic clock (t_local, t_global)
- Phi-decay for memory relevance
Core Concepts
State Vector
Every interaction maintains a structured state:
from phionyx_core import EchoState2
state = EchoState2(
A=0.5, # Arousal (0.0-1.0)
V=0.0, # Valence (-1.0 to 1.0)
H=0.3, # Entropy (0.0-1.0)
dA=0.0, # Arousal derivative
dV=0.0, # Valence derivative
t_local=0.0, # Semantic time (local)
t_global=0.0 # Semantic time (global)
)
Pipeline Blocks
from phionyx_core.contracts.telemetry import get_canonical_blocks
blocks = get_canonical_blocks() # 46 blocks (v3.8.0)
Profiles
from phionyx_core import ProfileManager
manager = ProfileManager()
profile = manager.load_profile("edu") # or "game", "clinical"
Testing
pytest tests/ # All tests (2,571)
pytest tests/unit/core/ -q # Core unit tests
pytest tests/contract/ -q # Contract tests
pytest tests/behavioral_eval/ -q # Behavioral evaluation
Evaluation Standard
Phionyx systems are evaluated against the Phionyx Evaluation Standard v0.1:
- Determinism Grading (D0-D3): Non-deterministic to fully deterministic
- Evaluation Levels (L0-L3): Unmeasured to governance-grade
- Composite Quality Score (CQS): Multi-dimensional behavioral quality metric
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
Check out Good First Issues for a place to start.
License
AGPL-3.0 — See LICENSE for details.
A commercial license is available for use cases where AGPL-3.0 copyleft is not suitable. Patent rights retained by Phionyx Research. See PATENT_NOTICE.md.
Further Reading
Links
- Website: phionyx.ai
- Evaluation Standard: phionyx-evaluation-standard
- arXiv Paper: Submission pending (cs.AI)
- Author: Ali Toygar Abak (Phionyx Research)
Citation
@techreport{abak2026phionyx,
author = {Abak, Ali Toygar},
title = {Phionyx: A Deterministic AI Runtime Architecture with Structured State Management and Pre-Response Governance},
institution = {Phionyx Research},
year = {2026},
url = {https://github.com/halvrenofviryel/phionyx-research}
}
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 phionyx_core-0.2.1.tar.gz.
File metadata
- Download URL: phionyx_core-0.2.1.tar.gz
- Upload date:
- Size: 533.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32313f6dccc0aa52a88bee60b3a7c157a42a4057c77233c1fcb018849a792855
|
|
| MD5 |
e5074a7db40af708c45b48a71f91ca46
|
|
| BLAKE2b-256 |
8e3fba9920f7f7db1e6df6b34f2bd70fac4ec43f85b9301c5d1ef037ba3292b5
|
Provenance
The following attestation bundles were made for phionyx_core-0.2.1.tar.gz:
Publisher:
release.yml on halvrenofviryel/phionyx-research
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_core-0.2.1.tar.gz -
Subject digest:
32313f6dccc0aa52a88bee60b3a7c157a42a4057c77233c1fcb018849a792855 - Sigstore transparency entry: 1417315735
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-research@2f0578c3d67e52f5c3b770b30706dec81bc03a89 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f0578c3d67e52f5c3b770b30706dec81bc03a89 -
Trigger Event:
push
-
Statement type:
File details
Details for the file phionyx_core-0.2.1-py3-none-any.whl.
File metadata
- Download URL: phionyx_core-0.2.1-py3-none-any.whl
- Upload date:
- Size: 693.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74ead7d4ce3989fdf3a4ca8a290e8509f70e160a37d28bbae411864e7ef0519
|
|
| MD5 |
a3177df3be2b60d4b6a1a3357f34cd20
|
|
| BLAKE2b-256 |
4d4e442f7f1d618dc29e128b8fd92b105bc2f389f92709a7d94478041a275806
|
Provenance
The following attestation bundles were made for phionyx_core-0.2.1-py3-none-any.whl:
Publisher:
release.yml on halvrenofviryel/phionyx-research
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_core-0.2.1-py3-none-any.whl -
Subject digest:
b74ead7d4ce3989fdf3a4ca8a290e8509f70e160a37d28bbae411864e7ef0519 - Sigstore transparency entry: 1417315750
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-research@2f0578c3d67e52f5c3b770b30706dec81bc03a89 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f0578c3d67e52f5c3b770b30706dec81bc03a89 -
Trigger Event:
push
-
Statement type: