OpenAI Agents SDK × NeoMundi
Measure every model call your agent loop makes, including the call that decides on a tool and the call that reads its result. One trace processor next to the ones you already run, the latency the SDK recorded, and only token counts the provider published.
Quickstart · What it refuses to do · Notebook · Limitations · Cost
Evidence level: E1, offline only. No real measurement has been taken with this package. The window that built it had no NeoMundi service verification key. The suite drives a real
Agent, the realRunnerand the real SDK model classes through mock transports. See LIMITATIONS.md §9.
What this is
NeoMundiTraceProcessor is an Agents SDK TracingProcessor. You install
it once, and it appends itself to the processors already registered.
For each model call on the Responses API (the SDK's default model class)
it takes three things. The token count comes from the provider's own
Response object. The latency is the span's ended_at - started_at, as
the SDK recorded it. The agent and the tools come from the agent loop. It
then submits to NeoMundi's POST /v1/govern through the neomundi SDK, on
a worker thread, so the agent never waits for it.
A tool-using run makes one model call per step, and each one is measured separately. Tool executions, agent steps, turns and the run total are reported by name and not measured: they are not model calls, or they are sums of calls already measured.
What it is not
- Not a way to measure Chat Completions or LiteLLM agents. Their spans carry a usage dict the SDK rebuilt. It is zero-filled when the provider is silent, and on the LiteLLM route we measured it carrying a local estimate (21/7/28) where the provider published nothing. These spans are refused (LIMITATIONS §1).
- Not a reader of exported traces.
export()drops the provider'sResponse. The measurement is only possible in-process, from a processor. - Not a measurement of tools. A tool execution has no model and no token count, so it is named on the outcome, never billed.
- Not a tracer, evaluator or truth checker. Every submission is a billed measurement. NeoMundi verifies integrity and authenticity, not whether an answer was true.
Install
Not on PyPI yet, so pip install openai-agents-neomundi does not work.
Install from the repository:
pip install 'git+https://github.com/neomundi-io/neomundi-integrations.git#subdirectory=integrations/openai-agents'
Python ≥ 3.11. Depends on openai-agents>=0.26.0,<0.27 (pinned to the
minor whose tracing surface was verified) and neomundi>=2.1.0,<3.0.
Quickstart
from openai_agents_neomundi import NeoMundiTraceProcessor
processor = NeoMundiTraceProcessor(
api_key=..., base_url="https://api.neomundi.io"
).install() # add_trace_processor -- NEVER set_trace_processors
result = await Runner.run(agent, "What is the weather in Paris?")
processor.flush() # submissions run off the agent's thread
for outcome in processor.outcomes:
print(outcome.span_type, outcome.status, outcome.token_count, outcome.request_id)
🔴 Do not use set_trace_processors([processor]). It replaces the
list. That silently removes the SDK's own exporter to the OpenAI dashboard,
and any processor your application registered.
Free first: NeoMundiTraceProcessor(submit=False) needs no key, opens no
socket, and tells you which of your calls would be measured. Runnable,
offline: examples/01_offline_agent.py
and the notebook.
Refusals
Every span ends with an Outcome and an explicit status. Nothing is
submitted, and nothing is billed, when:
| Status | Why |
|---|---|
not_submitted_unverified_token_count |
a Chat Completions / LiteLLM generation span; the provider published no usage or a partial one; or AnyLLMModel is loaded, which rebuilds Response objects |
not_submitted_no_provider_response |
the run does not record sensitive data (trace_include_sensitive_data=False), so the span carries no provider object |
not_submitted_aggregate_span |
a turn or task span: a sum of calls already measured |
not_submitted_not_a_model_call |
a tool execution, an agent step, a handoff or a guardrail, named on the outcome |
not_submitted_unsupported_span |
speech, transcription, or an unknown span type |
not_submitted_application_error |
the model call failed, or the response did not complete |
not_submitted_no_latency |
the span has no usable start and end |
skipped_sampling / not_submitted_local_only |
sample_rate excluded it / submit=False |
not_submitted_queue_full / not_submitted_processor_closed |
dropped rather than blocking the agent / after shutdown() |
not_submitted_transport_error |
the API was unreachable, and your run was not affected |
No exception from this package reaches your agent. Outcomes carry no
prompt, response, tool input or output, or key. They carry only lengths,
names and identifiers. examples/02_refusals.py
shows each refusal on a real run.
What it costs
🔴 Every submitted observation is a billed measurement (0.030 CHF on
TIER_03). An agent run is billed once per model call: a run that calls
one tool makes two calls and costs two observations. sample_rate
(default 1.0) is deterministic in the span id. Kill switch:
processor.sample_rate = 0.0, immediate. Installing a second processor
retires the first, so re-running a notebook cell does not bill twice.
Honest status
| Offline test suite | 45 tests, green on Python 3.12 / Linux locally; CI runs 3.11–3.13 on Linux, macOS, Windows |
| Real execution | none: E1. 0 observations submitted, 0 re-read. qualify.py is ready and its dry run is green against a mock provider. It has not been run against Ollama |
| Maturity | experimental |
Read LIMITATIONS.md before drawing a conclusion from any score.
License
Apache-2.0. See LICENSE.
Metadata
Release files for openai-agents-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 |
|---|---|---|---|---|
| openai_agents_neomundi-0.1.0.tar.gz | 24.1 kB | With provenance | Details for openai_agents_neomundi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_agents_neomundi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_agents_neomundi-0.1.0-py3-none-any.whl |
Total release size: 38.7 kB
Release files / openai_agents_neomundi-0.1.0.tar.gz
| Download URL | openai_agents_neomundi-0.1.0.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9e7719d39f4245e6fbd131f552d7b1e18d4cf1c92e216248f2401379271b539
|
|
BLAKE2b-256 checksum How to use checksums |
36d436e449743e6425f3d964027d401ec3daaf0a889a3fa3cdc3e4349751b754
|
| 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 26, 2026.
Transparency logRelease files / openai_agents_neomundi-0.1.0-py3-none-any.whl
| Download URL | openai_agents_neomundi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
263e82e64f2876f5da06b390b91b20ce6df9a0a51c939d747ebfba1ab8afde42
|
|
BLAKE2b-256 checksum How to use checksums |
cb41c4b6a45aa34c132a8f21a8f257ab5876fdab9f91886166f9013e9b5dde73
|
| 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 26, 2026.
Transparency logSecurity for openai-agents-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 openai_agents_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 26, 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.