Skip to main content

English · Français

Langfuse × NeoMundi

🟢 New here? Start with Getting Started — From Integration to Verifiable Evidence. It is the single source of truth for the whole path: exact versions, executable commands, measured outputs, the common errors — and 🔴 which steps are still blocked, and why.

NeoMundi's signed behavioural measurement, as scores on the Langfuse trace you already have open.

Quickstart · What it refuses to do · Notebook · Limitations · Cost


Evidence level E2. Two real measurements on 2026-11-26, re-read from the NeoMundi API as persisted, and all six scores re-read from the Langfuse server on both traces. See LIMITATIONS.md §6.

What this is

A bridge, not a second observer. Langfuse keeps the trace; NeoMundi measures the interaction; NeoMundiLangfuseBridge writes the measurement's signals onto that trace as Langfuse scores, with the NeoMundi request_id in each score's metadata so you can go from the trace to the signed record.

It drives the neomundi SDK's result types and Langfuse's own create_score. It reimplements neither, measures nothing, and never contacts the NeoMundi API.

What it is not

  • Not an evaluator. It transports measurements; it does not interpret them.
  • Not a tracer. Langfuse traces. This only adds scores to its traces.
  • Not a truth checker. NeoMundi verifies integrity and authenticity, not whether an answer was true.

Install

pip install langfuse-neomundi

Python ≥ 3.11. Depends on langfuse>=5.2.0,<6.0 and neomundi>=2.1.0,<3.0.

🔴 pip install does not ship examples/, notebooks/ or evidence/. Measured on 2026-12-01 against the eight published wheels: each ships its package and its metadata, and none carries those directories. They live in the repository — integrations/langfuse/ — so every path this page states relative to them is a repository path, not a file your install contains.

Quickstart

⚠ A wiring sketch, not a runnable program. Measured on a bare pip install langfuse-neomundi: the first block raises NameError on NeoMundiLangfuseBridge, which it does not import, and the complete block below refuses without a real key — the SDK checks the key's format locally, which is deliberate. The block that runs as published is just below, and the fuller example is examples/01_offline_bridge.py — 🔴 in the repository, not in the wheel.

bridge = NeoMundiLangfuseBridge(langfuse)  # your existing Langfuse client
outcome = bridge.write(trace.close())  # a neomundi TraceRecord or GovernResult
print(outcome.status, outcome.signals_written)

Runnable as published — no key, no provider, no network

🟢 Needs nothing but pip install langfuse-neomundi. dry_run=True plans the scores and writes none, so no request reaches Langfuse and no NeoMundi call is made.

🔴 What it prints is the refusal, and that is the demonstration. One score is planned — the measurement's own status — and five signals are withheld, each with its reason. A bridge that invented a stability_score from a record that carries none would be worse than one that writes nothing.

from langfuse import Langfuse
from neomundi import TraceRecord

from langfuse_neomundi import NeoMundiLangfuseBridge

# A real Langfuse client, pointed at nowhere: dry_run writes nothing, so no
# request is ever made. Replace the keys and the host with yours to write.
langfuse = Langfuse(
    public_key="pk-lf-not-a-real-key",
    secret_key="sk-lf-not-a-real-key",
    host="https://example.invalid",
)

# The record a NeoMundi layer hands you after a measured call. Here it is built
# by hand so the block needs no key and no NeoMundi call.
record = TraceRecord(
    client_trace_id="quickstart-0001",
    outcome="not_submitted_local_only",
    token_count=14,
    model_name="stub-model",
    latency_ms=12.5,
    submitted=False,
)

bridge = NeoMundiLangfuseBridge(langfuse, dry_run=True)  # nothing is written
written = bridge.write(record, trace_id="0" * 32)

print("status          :", written.status)
print("written         :", ", ".join(written.signals_written) or "(none)")
print("planned         :", ", ".join(f"{s.name}={s.value}" for s in written.scores) or "(none)")
print("withheld, and why:")
for name, why in written.signals_withheld.items():
    print(f"  {name:<28} {why}")

It prints exactly this:

status          : dry_run
written         : (none)
planned         : neomundi.measurement=not_submitted
withheld, and why:
  stability_score              not submitted: nothing was measured
  coherence_score              not submitted: nothing was measured
  factual_hallucination_score  not submitted: nothing was measured
  semantic_instability_score   not submitted: nothing was measured
  semantic_risk                not submitted: nothing was measured

Where a real key comes from

Ask for one at https://neomundi.io/contact-us/ — verified reachable, and the only route this page states. ⚠ It is not a claim that no other route exists; it is the one we can point you to today.

🟢 You do not need one to evaluate this package. The offline test suite needs no credential, and the evidence committed in evidence/ can be checked without an account.

In context, inside a Langfuse observation:

from langfuse import get_client
from neomundi import NeoMundiClient
from langfuse_neomundi import NeoMundiLangfuseBridge

langfuse = get_client()
neomundi = NeoMundiClient(api_key=..., base_url="https://api.neomundi.io")
bridge = NeoMundiLangfuseBridge(langfuse)

with langfuse.start_as_current_observation(name="answer"):
    with neomundi.trace(model_name="my-model") as trace:
        answer = call_my_llm(question)
        trace.record(prompt=question, response=answer, token_count=usage.total_tokens)
    bridge.write(trace.close())  # attaches to the active trace

What lands on the trace (exact names, measured offline):

Score Type Written when
neomundi.stability_score NUMERIC the server declared it measured
neomundi.coherence_score NUMERIC idem
neomundi.factual_hallucination_score NUMERIC idem
neomundi.semantic_instability_score NUMERIC idem
neomundi.semantic_risk NUMERIC idem
neomundi.measurement CATEGORICAL always: complete, partial, not_attempted, unknown, not_submitted, submitted_no_result

Each score's metadata carries request_id, measurement_version and the evaluator provenance. The summary lists what was withheld and why.

With langchain-neomundi: pass bridge.as_outcome_callback() as the handler's on_outcome. Only the summary is written that way — see LIMITATIONS.md §3.

Refusals

Situation Status What reaches Langfuse
A signal not declared measured (even with a conventional value) queued no score for it; listed in the summary
No trace_id and no active Langfuse trace not_written_no_trace nothing
The measurement was not submitted queued the summary only, not_submitted
The input is not a NeoMundi measurement not_written_unsupported_input nothing
dry_run=True dry_run nothing; scores returned on the outcome
The bridge or the Langfuse client raises not_written_internal_error nothing; the exception type, never its message

🔴 queued means handed to Langfuse, not delivered. Langfuse drops scores on an API error without raising. See LIMITATIONS.md §1.

What it costs

The bridge bills nothing: it never contacts NeoMundi. The measurement it carries was billed when it was submitted — 0.030 CHF per observation — so the cost control is wherever you measure (sample_rate in langchain-neomundi, or your own decision to call client.trace()).

dry_run=True computes every score and hands nothing to Langfuse, so you can wire the bridge up and read what it would write before enabling it.

Honest status

Offline test suite 33 tests, plus 2 composition tests run when langchain-neomundi is installed
Real execution E2 — 2 observations, 2 re-read as persisted, 6/6 scores read back from Langfuse, 0.06 CHF (2026-11-26)
Maturity beta

Read LIMITATIONS.md before drawing a conclusion from any score.

Running the tests

cd integrations/langfuse
python -m pip install -e ".[dev]"
pytest -q

Offline, no key, no cost. The four Langfuse-failure tests take a few seconds each, because Langfuse really does retry.

License

Apache-2.0. See LICENSE.

Metadata

Release files for langfuse-neomundi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langfuse-neomundi 0.1.1
File Size Uploaded Provenance Actions
langfuse_neomundi-0.1.1.tar.gz 21.6 kB With provenance Details for langfuse_neomundi-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langfuse-neomundi 0.1.1
File Interpreter ABI Platform Actions
langfuse_neomundi-0.1.1-py3-none-any.whl Python 3 none any Details for langfuse_neomundi-0.1.1-py3-none-any.whl

Total release size: 34.3 kB

Release files / langfuse_neomundi-0.1.1.tar.gz

Download URL langfuse_neomundi-0.1.1.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c61070109a91767f48856bdd37b0f892e08693ca25dbbe963f48121e2eafe019
BLAKE2b-256 checksum
How to use checksums
6b4ff3fcf091e61cb1389095a822a8fabe59c1e8bac6502b835af9275f26186f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / langfuse_neomundi-0.1.1-py3-none-any.whl

Download URL langfuse_neomundi-0.1.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02ccb8d2198cd452f1ee3dedf5806624ae8d0f53d473b711a485c98dd306d9f4
BLAKE2b-256 checksum
How to use checksums
b34a0d706fa13abfb8c7524d8137f34698f149c933e8a25b6e407024af5f8ca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for langfuse-neomundi 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langfuse_neomundi-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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