Metadata-Version: 2.5
Name: airprompter-agent-otel
Version: 1.0.0rc0
Summary: The AirPrompter agent SDK's telemetry spool as an OpenTelemetry exporter: minute windows become OTLP metrics (gen_ai.client.operation.duration, tokens, checks, feedback, refusals) shipped to the collector you already run, with no AirPrompter grant at all. An UploadSink for the uploader in airprompter_agent.telemetry.
Project-URL: Homepage, https://github.com/airprompter/airprompter-agent-sdk
Project-URL: Source, https://github.com/airprompter/airprompter-agent-sdk/tree/main/sdk-python/packages/agent-otel
Project-URL: Protocol, https://github.com/airprompter/airprompter-agent-sdk/tree/main/protocol
Project-URL: Changelog, https://github.com/airprompter/airprompter-agent-sdk/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/airprompter/airprompter-agent-sdk/issues
Author: AirPrompter
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: agent,airprompter,llm,metrics,opentelemetry,otlp,prompts
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: airprompter-agent==1.0.0rc0
Requires-Dist: httpx<1,>=0.27
Description-Content-Type: text/markdown

# airprompter-agent-otel

The AirPrompter agent SDK's telemetry spool as an OpenTelemetry exporter:
minute windows become OTLP metrics
(`gen_ai.client.operation.duration`, tokens, checks, feedback, refusals) and
go to the collector you already run, with no AirPrompter grant at all. A
separate distribution so the main package carries no exporter.

```python
from airprompter_agent import AirPrompterAgent, TelemetryOptions
from airprompter_agent_otel.exporter import OtlpUploadSink

sink = OtlpUploadSink(endpoint="http://localhost:4318/v1/metrics", resource={"service.name": "support-bot"})
ap = AirPrompterAgent.start(..., telemetry=TelemetryOptions(upload_sink=sink))
```

- `endpoint` posts OTLP/HTTP JSON with httpx; `exporter` takes any callable, so
  the protobuf and gRPC paths need no code here.
- A collector's 4xx or 5xx drops and counts the segment, a `Retry-After` holds
  it, and a collector that never answered keeps it under backoff.
- Attribute keys are a closed set the conformance suite pins, and the rows carry
  no prompt text.

Depends on `airprompter-agent` at the same version. Parity with
`@airprompter/agent-otel` is pinned by `protocol/vectors/otel-mapping.json`.
BSD-3-Clause.
