Econ Instrumentation SDK
LLM ROI tracking in production (value, cost, uncertainty) in <30 minutes.
Production-ready Python SDK for Regulus ECP telemetry:
- non-blocking execution/outcome telemetry transport
- hierarchical auto-instrumentation for LangGraph/LangChain/provider SDKs
- strict join-key continuity for business attribution
Install
pip install econ-instrumentation-sdk
With integrations:
pip install "econ-instrumentation-sdk[integrations]"
With OpenTelemetry bridge:
pip install "econ-instrumentation-sdk[otel]"
Quickstart (10 lines, real metric)
from econ_instrumentation import InstrumentationConfig, AutoInstrumentationConfig
from econ_instrumentation import configure, enable_auto_instrumentation, join_key_context
from econ_instrumentation import instrument_langchain_app, track_outcome, OutcomeEvent
configure(InstrumentationConfig(base_url="http://localhost:8000/v1", enabled=True))
enable_auto_instrumentation(AutoInstrumentationConfig(capture_mode="hierarchical"))
with join_key_context("CASE-123"):
app = instrument_langchain_app(chain, "SupportRefundTriage", "model_v2")
_ = app.invoke({"input": "refund?"})
track_outcome(OutcomeEvent(execution_id="out_case_123", join_key="CASE-123", capability_id="SupportRefundTriage", outcome_type="custom", outcome_value="approved"))
# then run: python3 demo/live_poc_simulation.py --days 2 --requests-per-day 40 --strict
# inspect AER + margin in demo/output/report_*.json
Capture modes
hierarchical(default): framework-first, provider fallback onlyall_layers: capture every layer and markprimary_for_rollupprovider_only: OpenAI/Anthropic-only capture
CLI
regulus init --base-url http://localhost:8000/v1
regulus demo --repo-root . --days 2 --requests-per-day 40 --strict
regulus compute --repo-root . --last 7d
Recommended env flags
export ECP_AUTO_INSTRUMENT=true
export ECP_CAPTURE_MODE=hierarchical
export ECP_INSTRUMENT_LANGCHAIN=true
export ECP_INSTRUMENT_OPENAI=true
export ECP_INSTRUMENT_ANTHROPIC=true
Compatibility (tested ranges)
openai >=1.40,<2.0anthropic >=0.34,<1.0langchain >=0.2,<0.4langgraph >=0.2,<0.4
Notes
- Prompts/responses are not captured by default (
capture_content=False). - Telemetry delivery never blocks inference path (buffer + background retries).
Metadata
Release files for econ-instrumentation-sdk 0.1.1
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 |
|---|---|---|---|---|
| econ_instrumentation_sdk-0.1.1.tar.gz | 20.0 kB | Without provenance | Details for econ_instrumentation_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| econ_instrumentation_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for econ_instrumentation_sdk-0.1.1-py3-none-any.whl |
Total release size: 51.4 kB
Release files / econ_instrumentation_sdk-0.1.1.tar.gz
| Download URL | econ_instrumentation_sdk-0.1.1.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d89454bec11f6fa67be6f565d595314a722524a343534db785aeae3a2cb15299
|
|
BLAKE2b-256 checksum How to use checksums |
3887810ea1e227a70c32e6f6b766bdb710b1fe230aa6b327d24dc7cecde63f83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / econ_instrumentation_sdk-0.1.1-py3-none-any.whl
| Download URL | econ_instrumentation_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04947c466bbe9fdbfc24f913e2b22acef78ea0bd9bdc014939b9ecdc4065211d
|
|
BLAKE2b-256 checksum How to use checksums |
130b083d2012c70bf8c8bc86163b780f8f2a9fad9468492315600654764147c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for econ-instrumentation-sdk 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.