Interoperability bridge — export Phionyx Reasoned Governance Envelope (RGE) evidence into Inspect AI evaluation logs.
Project description
phionyx-eval-inspect
Interoperability bridge — export Phionyx Reasoned Governance Envelope (RGE) evidence into Inspect AI evaluation logs.
Inspect AI is the open-source frontier-model evaluation framework maintained by UK AISI and used (per inspect.aisi.org.uk as of 2026-05-19) as the standard frontier-eval framework across multiple government AI safety institutes — UK AISI, US CAISI, EU AI Office, Japan AISI, Korea AISI.
This package is not an endorsement by or partnership with any of those organisations. It is a read-only interoperability adapter that lets Phionyx-governed runs become natively inspectable in Inspect AI's tooling.
What this package does
Two complementary bridges:
-
Storage adapter: convert a Phionyx RGE envelope chain (the per-turn signed evidence records the
phionyx-mcp-serverwrites under~/.phionyx/mcp_audit/<trace_id>/) into a single Inspect AI.evallog file under./logs/<task>/<run_id>.eval. The log is then viewable withinspect view, queryable with Inspect's standard tooling, and joinable with any other Inspect log in your eval workflow. -
MCP tool wiring documentation:
docs/wiring_phionyx_mcp_in_inspect_task.mdwalks through how to register the companionphionyx-mcp-serverMCP server as a tool inside an Inspect AI eval task, so the agent under evaluation goes through Phionyx's runtime governance on every tool call.
Install
pip install phionyx-eval-inspect
# To also view the resulting .eval logs in Inspect's UI:
pip install "phionyx-eval-inspect[inspect]"
The adapter itself has zero runtime dependencies on inspect-ai — it emits the .eval JSON shape directly. The [inspect] extra exists only for when you want inspect view or a live Inspect task.
Use — CLI
# Convert a Phionyx envelope chain into an Inspect log file:
phionyx-eval-inspect convert \
--trace trace-abc-001 \
--task phionyx_governed_replay \
--audit-root ~/.phionyx/mcp_audit \
--logs-dir ./logs
# Show the converted log without writing to disk:
phionyx-eval-inspect show \
--trace trace-abc-001 \
--audit-root ~/.phionyx/mcp_audit
Then view it with Inspect AI:
inspect view ./logs/phionyx_governed_replay/trace-abc-001.eval
Use — Python
from phionyx_eval_inspect import (
envelope_chain_from_directory,
envelope_chain_to_inspect_log,
write_log,
)
envelopes = envelope_chain_from_directory(
"~/.phionyx/mcp_audit", "trace-abc-001"
)
log = envelope_chain_to_inspect_log(
envelopes,
task_name="phionyx_governed_replay",
run_id="trace-abc-001",
)
write_log(log, logs_dir="./logs")
The function is read-only over the envelope chain. It never modifies the input, and it never scores the run — scoring stays in Inspect's own solver/scorer chain.
What the log carries
Each envelope becomes one Inspect sample. The sample carries:
id: Phionyx turn index.input: the user text (envelopeinput.user_text).output.completion: the released text (envelopeoutput.text).events: one per pipeline block step (phionyx.pipeline.block) plus an event per MCP tool call (phionyx.mcp.tool_call) when present.metadata.phionyx: the governance evidence — trace id, decision, decision reason, policy basis, pipeline path, integrity chain (previous + current + signature), and the fullmcp_tool_auditblock when populated.
Phionyx-specific fields live under metadata.phionyx so native Inspect tooling sees them without colliding with Inspect's native data model.
Companion packages — the wider stack
| Package | Role |
|---|---|
| phionyx-core | Deterministic AI runtime governance — 46-block pipeline, kill switch, ethics + safety gates, signed audit envelopes |
| phionyx-mcp-server | MCP trust boundary: descriptor hash, signed RGE envelope, audit chain (outward layer) |
| phionyx-pipeline-mcp | Self-governance MCP for Claude Code: three-layer verification over the agent's own "fixed / tested / changed" claims (inward layer) |
| phionyx-eval-inspect | (this) Interoperability bridge into Inspect AI eval logs |
When all three MCP-related packages are installed, a single Claude Code session: emits Phionyx envelopes (outward + inward) → shares one trace_id across both MCPs → this adapter converts the chain into an Inspect .eval log → inspect view shows the full run.
Schema pinning
The adapter is pinned to Inspect AI log format v0.3.x (as of 2026-05-19). Override with:
PHIONYX_INSPECT_LOG_SCHEMA_VERSION=v0.3.x phionyx-eval-inspect convert ...
To support a new Inspect schema, drop log_schema_v0_<minor>.py next to adapter.py and extend _resolve_schema_module. Bump-policy doc forthcoming in the umbrella repo under docs/conventions/inspect_log_schema_bump_policy.md.
Framing — what this package does NOT claim
- It is not an endorsement, accreditation, or partnership with UK AISI, US CAISI, EU AI Office, Japan AISI, or Korea AISI.
- It does not validate or score the Phionyx-governed run — it surfaces evidence so Inspect's own scorers can be applied.
- It does not require Inspect AI to be installed at runtime — only at view time.
- It does not modify Inspect AI; the adapter writes a standard
.evalfile the framework's native tools read.
The framing is interoperability, not endorsement.
Tests
pip install -e ".[test]"
pytest -q
License
AGPL-3.0-or-later. See LICENSE.
See also
- Project hub: github.com/halvrenofviryel/phionyx-research
- Phionyx Core SDK: pypi.org/project/phionyx-core
- Inspect AI: github.com/UKGovernmentBEIS/inspect_ai
- Inspect AI documentation: inspect.aisi.org.uk
- Reasoned Governance Envelope (RGE) v0.2 RFC: phionyx-mcp-server/specs/rge_v0_2
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_eval_inspect-0.1.0.tar.gz.
File metadata
- Download URL: phionyx_eval_inspect-0.1.0.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
266a6abb0aedf1c83bdc7b3db736a403999bd590f376ca8ff14bc7f79cff9ce6
|
|
| MD5 |
fa8f3c7e42876e4e869bd68b0c2a5f04
|
|
| BLAKE2b-256 |
66323d7a50e5c64d00d7834a2ed8ece2327ab2e9003104c692c5daf55267fcd1
|
Provenance
The following attestation bundles were made for phionyx_eval_inspect-0.1.0.tar.gz:
Publisher:
release.yml on halvrenofviryel/phionyx-eval-inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_eval_inspect-0.1.0.tar.gz -
Subject digest:
266a6abb0aedf1c83bdc7b3db736a403999bd590f376ca8ff14bc7f79cff9ce6 - Sigstore transparency entry: 1612815706
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-eval-inspect@1bd500d6b6c5e95bee44e644624c0030efacc2ec -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1bd500d6b6c5e95bee44e644624c0030efacc2ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file phionyx_eval_inspect-0.1.0-py3-none-any.whl.
File metadata
- Download URL: phionyx_eval_inspect-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.3 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 |
d55de74eb639ee26eae055d1086215de09093f2b481a475694574b1bbb3601ed
|
|
| MD5 |
ef6bca96b8c27de3ec8fa74705efee1c
|
|
| BLAKE2b-256 |
83c53c9af56680c611c5387f77f751a3585aed6911db3275dd46e6829967bee8
|
Provenance
The following attestation bundles were made for phionyx_eval_inspect-0.1.0-py3-none-any.whl:
Publisher:
release.yml on halvrenofviryel/phionyx-eval-inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phionyx_eval_inspect-0.1.0-py3-none-any.whl -
Subject digest:
d55de74eb639ee26eae055d1086215de09093f2b481a475694574b1bbb3601ed - Sigstore transparency entry: 1612815835
- Sigstore integration time:
-
Permalink:
halvrenofviryel/phionyx-eval-inspect@1bd500d6b6c5e95bee44e644624c0030efacc2ec -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/halvrenofviryel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1bd500d6b6c5e95bee44e644624c0030efacc2ec -
Trigger Event:
push
-
Statement type: