Open instrumentation SDK for Juvera — emit agent telemetry and business-impact signals
Project description
juvera-python
Open instrumentation SDK for AI agent business-impact events.
pip install juvera-sdk
What it is
juvera-sdk lets you instrument AI agents to emit OTel-compatible traces and business-impact signals to the Juvera ingest gateway. It answers one question: how do I emit good data? Nothing more.
Quickstart
import juvera_sdk as j
j.init(
api_key="jvr_your_key",
org_id="org_your_org",
service_name="support-agent",
domain="support", # support | marketing | sales | custom
)
with j.agent_span(agent_id="agent_01", work_item_id="wi_ZD98765") as span:
span.set_model("claude-sonnet-4-6", provider="anthropic")
span.set_tokens(input=420, output=180)
span.add_tool_call("lookup_order_status", status="success")
# ... your agent logic ...
j.record_impact_signal(
impact_type="cost_reduction",
value=180.0,
impact_category="ticket_deflection",
source_system="zendesk",
)
j.flush()
Debug mode — no network calls, prints to stdout:
j.init(api_key="any", org_id="org_test", endpoint="local")
What Juvera Cloud computes from this data
Once traces and signals reach the ingest gateway, the Juvera platform handles:
- ROI attribution — which agent actions drove which business outcomes
- Benchmarking — agent performance over time, by domain and workflow type
- Compliance scoring — policy adherence, human-in-the-loop rate, escalation patterns
- Root cause analysis — why deflection rates dropped, which tool failures cost the most
None of this logic is in this package. It runs server-side.
What this SDK does not include
- Attribution engine
- Benchmarking or evaluation
- Compliance rules or scoring
- Dashboard or analytics
- Any API beyond
/v1/tracesand/v1/impact-signals
This package has no dependency on any closed Juvera service. endpoint="local" works fully offline.
API reference
| Call | Description |
|---|---|
j.init(api_key, org_id, ...) |
Configure once at startup |
j.agent_span(agent_id, work_item_id, ...) |
Context manager for one unit of work. Yields AgentSpan. |
span.set_model(model, provider) |
Record which LLM was used |
span.set_tokens(input, output) |
Record token consumption |
span.add_tool_call(name, status) |
Record a tool/function call |
span.set_error(exception) |
Mark span as errored |
j.record_impact_signal(impact_type, value, ...) |
Emit a business outcome event |
j.record_handoff(reason, reviewer_role) |
Record a human-in-the-loop handoff |
j.flush() |
Force-export buffered spans before process exit |
j.shutdown() |
Release resources |
work_item_id
Every agent_span() is tied to a work_item_id — the unique identifier for one unit of agent work (e.g. a Zendesk ticket ID, a document ID, a task ID). This links spans to impact signals so Juvera can attribute outcomes to specific work items.
If you omit it, a UUID is generated automatically. Pass your own system's ID to enable cross-system attribution.
Examples
examples/01_manual_instrumentation.py— core loopexamples/02_openai_assistant.py— wrapping an OpenAI callexamples/03_langchain_agent.py— LangChain agent pattern
License
Apache 2.0 — see LICENSE.
Built by Juvera.
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 juvera_sdk-0.1.0.tar.gz.
File metadata
- Download URL: juvera_sdk-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3cab72a8193ecda94129b11d0818054fe4ba042dd8a0a7a52d5229f6a5929a0
|
|
| MD5 |
2634f4d2aca795c1cac77546cab39003
|
|
| BLAKE2b-256 |
b9094810f7c3c59072f292910f048f65230af7ccdc46aa6c80772cad055e91ba
|
File details
Details for the file juvera_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: juvera_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3220959823e722ceee1086f1cee9ce3ec9efe01aac2e756b4d29dc5909c0f891
|
|
| MD5 |
6e584ccefc49850f1612b1efe4ab81f5
|
|
| BLAKE2b-256 |
a86a8d572f51f6d96ef53b788b041870e68b8c8de6897e61a2ce392ee9ca1527
|