Microsoft Agent Framework × NeoMundi
Signed behavioural measurement of every model call your agent makes, from one middleware.
Quickstart · What it refuses to do · Notebook · Limitations · Cost
Evidence level E2. Two real measurements on 2026-11-28, through a real Agent Framework client against a provider's OpenAI-compatible route, both re-read from the NeoMundi API as persisted at
measurement_version 3.5.0. Plus 21 offline tests on the framework's real middleware pipeline. See LIMITATIONS §10.
What this is
Microsoft Agent Framework
is the successor to Semantic Kernel and AutoGen. It exposes a
ChatMiddleware layer that brackets every model call.
This package puts a NeoMundi measurement on that layer. Attach it once to a chat client and every call that client makes is measured — with the provider's own token count and the latency the call actually took.
your agent ──▶ ChatMiddleware ──▶ the provider
│
└──▶ NeoMundi: 5 signals, with provenance
Install
🟡 Not published on PyPI yet. pip install agent-framework-neomundi
does not work today. Install from this repository:
pip install "git+https://github.com/neomundi-io/neomundi-integrations.git#subdirectory=integrations/agent-framework"
Python 3.11 or newer. Two dependencies: agent-framework-core and
neomundi.
🟢 Not the meta-package. pip install agent-framework pulls some
thirty packages — Copilot Studio, Foundry, Bedrock, Redis, a WASM
sandbox. This middleware needs none of them, so it depends on
agent-framework-core alone.
Quickstart
from agent_framework.openai import OpenAIChatCompletionClient
from agent_framework_neomundi import NeoMundiChatMiddleware
from neomundi import NeoMundiClient
measure = NeoMundiChatMiddleware(
client=NeoMundiClient(api_key=..., base_url="https://api.neomundi.io"),
)
chat = OpenAIChatCompletionClient(model="gpt-4o-mini", middleware=[measure])
reply = await chat.get_response("What is the capital of France?")
outcome = measure.last_outcome
print(outcome.status) # submitted, or the named refusal
print(outcome.request_id) # your correlation key
print(outcome.token_count) # the provider's number, never ours
Nothing else changes in your application. The answer reaches your code exactly as before, and before anything is measured.
Refusals
🔴 The refusals are the part worth reading. A measurement product that quietly fills a gap is worse than one that says it cannot measure.
| Status | When |
|---|---|
not_submitted_no_token_count |
the provider published none, so the framework left usage_details absent. We do not invent one. |
not_submitted_invalid_token_count |
usage_details was there but carried no usable positive integer |
not_submitted_streaming |
a streaming call: usage exists only after the stream is consumed, and this middleware resumes before that |
not_submitted_local_only |
submit=False, or no client — nothing left the process |
not_submitted_no_result |
call_next() returned nothing usable |
not_submitted_application_error |
your call failed. Recorded, then re-raised — swallowing it would hide a failure from you |
not_submitted_transport_error |
the measurement API was unreachable or refused |
not_submitted_internal_error |
we failed. Reported, never raised into your application |
Run them: python examples/02_refusals.py makes four real calls and
prints the billed count — zero.
Three things we measured, not assumed
🟢 Agent Framework does not invent a token count. Provider publishes
11/7/18 → usage_details carries it. Provider publishes nothing →
usage_details is None. Both cases, streaming and not, on 1.26.0.
🔴 But we cannot verify it per call. The provider's raw payload is
not reachable at this hook, so the check litellm-neomundi performs is
impossible here. The count is the framework's, from a framework measured
not to fabricate — that is weaker, and
LIMITATIONS §1
says so in full.
🔴 A middleware exception reaches the host. The framework does not isolate middleware failures, so this integration catches everything itself. Four distinct failure modes are tested.
What it costs
Each submitted observation is a billed measurement. There is no trace-only route.
🟢 Refusals cost nothing — no socket is opened to the measurement API. There is no sampling in 0.1.0, so decide what you attach this to.
What it is not
- Not Copilot Studio or Microsoft Foundry. Connectors to both exist inside the framework; whether a call routed through them surfaces usage at this layer is untested. LIMITATIONS §7.
- Not a measurement of agent runs or tool calls. Only chat invocations. An agent run making three model calls yields three outcomes and no aggregate.
- Not verified on every connector. One was probed: OpenAI Chat Completions. LIMITATIONS §2.
- Not a truth checker. NeoMundi verifies integrity and authenticity, not whether an answer was true.
More
Limitations · Value and ROI · Notebook · Examples · Changelog · Integration library
Metadata
Release files for agent-framework-neomundi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_framework_neomundi-0.1.0.tar.gz | 15.3 kB | With provenance | Details for agent_framework_neomundi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_framework_neomundi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agent_framework_neomundi-0.1.0-py3-none-any.whl |
Total release size: 26.5 kB
Release files / agent_framework_neomundi-0.1.0.tar.gz
| Download URL | agent_framework_neomundi-0.1.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1d6b0568a04514a33301034946dd09428156160fdaaead468dcf9f0c650dfe6
|
|
BLAKE2b-256 checksum How to use checksums |
0b44aa323204a17fefeab654ffdaaa71bdd9c0fccfb55d1329a3f666d8c645ef
|
| 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 Nov 27, 2026.
Transparency logRelease files / agent_framework_neomundi-0.1.0-py3-none-any.whl
| Download URL | agent_framework_neomundi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11a0fcfbe540a88be8786dbce9b02f6ba52e4069724158d25ec3ca5251b21303
|
|
BLAKE2b-256 checksum How to use checksums |
7f6c8d15b7db3552b79a5c2d45b2449c47bd1f977e2ba79984f64ca72e09ecbf
|
| 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 Nov 27, 2026.
Transparency logSecurity for agent-framework-neomundi 0.1.0
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.
Attestation for agent_framework_neomundi-0.1.0.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 Nov 27, 2026.
Transparency logA 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.