gitmyhub

styxx

Python ★ 13 updated 2h ago

The measurement layer for machine minds. Reads what a model means and whether it holds the truth; certifies every claim re-runs. meaning_diff + OATH certify + mind profiles + live grounding signal + the cognometric instruments. No torch, no LLM in the loop for the core; MIT, open at the core.

A Python library that watches AI agents while they run and flags reasoning faults like hallucination, drift, and sycophancy.

PythonMCPpipsetup: moderatecomplexity 3/5

styxx is a Python library for monitoring the reliability of AI language model agents. Existing tools can tell you when an agent's execution trace broke, but not why. styxx adds cognitive observability, a set of measurements that characterize how a model is reasoning, so problems can be detected and categorized.

The main entry point is a @styxx.profile decorator you add to any function that calls a language model. When the decorated function runs, styxx measures outputs step by step and flags fault categories such as drift (when the model's direction shifts mid-task), confabulation (invented facts), refusal, sycophancy (agreeing too readily with the user), and incoherence. Results can be exported as a self-contained HTML flamegraph or forwarded to external monitoring services.

Beyond the runtime profiler, styxx includes nine standalone cognometric instruments, dedicated text-only detectors, each targeting a specific failure mode such as hallucination detection or tool-call drift. These run on plain Python using CPU alone with no language model required, and achieve published accuracy benchmarks on standard evaluation datasets.

A feature called the self-healing reflex (F10) lets a model audit its own output and rewrite it when a fault is detected. An MCP server ships inside the library, exposing twelve cognometric tools over a standard interface compatible with Claude Desktop, Claude Code, Cursor, and Cline.

The library installs via pip and requires no fine-tuning or retraining of any underlying model. It is pure Python, MIT-licensed. The full README is longer than what was shown.

Where it fits