Metadata-Version: 2.4
Name: openinference-instrumentation-agentminds
Version: 0.1.0
Summary: OpenInference auto-instrumentation for the AgentMinds Python SDK. Emits OTel spans tagged with openinference.span.kind + agentminds.* attributes when agentminds.capture_* and agentminds.init are called.
Project-URL: Homepage, https://agentminds.dev
Project-URL: Documentation, https://agentminds.dev/profile/adapters
Project-URL: Repository, https://github.com/agentmindsdev/agentminds
Project-URL: Issues, https://github.com/agentmindsdev/agentminds/issues
Project-URL: Profile, https://github.com/agentmindsdev/profile
Project-URL: OpenInference Spec, https://github.com/Arize-ai/openinference
Author: AgentMinds
License: Apache-2.0
Keywords: agentminds,ai-agents,instrumentation,llm,observability,openinference,opentelemetry,otel
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Requires-Dist: opentelemetry-api>=1.20
Requires-Dist: opentelemetry-instrumentation>=0.41b0
Requires-Dist: wrapt>=1.14
Provides-Extra: agentminds
Requires-Dist: agentminds>=0.4.2; extra == 'agentminds'
Provides-Extra: test
Requires-Dist: agentminds>=0.4.2; extra == 'test'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'test'
Requires-Dist: opentelemetry-test-utils>=0.41b0; extra == 'test'
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# `openinference-instrumentation-agentminds`

OpenInference auto-instrumentation for the
[`agentminds`](https://pypi.org/project/agentminds/) Python SDK.
When attached, every call to `agentminds.capture_message`,
`agentminds.capture_exception`, and `agentminds.init` emits an
OpenTelemetry span carrying the canonical
[OpenInference](https://github.com/Arize-ai/openinference) attribute
namespace plus an `agentminds.*` extension namespace for
ARP-specific fields.

ARP §8.4 — 5-layer identity compliance: AgentMinds becomes
OpenInference-instrumented when this package is installed.

## Install

```bash
pip install openinference-instrumentation-agentminds
```

## Use

```python
from openinference_instrumentation_agentminds import AgentMindsInstrumentor

# Attach to your existing OTel SDK setup
AgentMindsInstrumentor().instrument()

# From here, agentminds calls produce spans automatically:
import agentminds
agentminds.init(dsn="https://pk_yoursite_xxx@api.agentminds.dev/yoursite")
# ↑ emits span: name="agentminds.init", kind=CHAIN

agentminds.capture_message("p95 climbed", level="warning")
# ↑ emits span: name="agentminds.capture_message",
#               openinference.span.kind="CHAIN",
#               agentminds.event.level="warning"
```

## Span attributes

| Attribute | Source | Type | Notes |
|---|---|---|---|
| `openinference.span.kind` | OpenInference v1 | string | One of LLM/CHAIN/TOOL/RETRIEVER/EMBEDDING/AGENT/GUARDRAIL/EVALUATOR/RERANKER/UNKNOWN |
| `agentminds.profile_version` | ARP §2 | string | Always `"1.2.0"` while this package is on 0.1.x |
| `agentminds.profile.spec_url` | ARP §2 | string | `https://github.com/agentmindsdev/profile` |
| `agentminds.dsn.host` | ARP §2 | string | The host segment of the DSN, e.g. `api.agentminds.dev` |
| `agentminds.dsn.site_id` | ARP §2 | string | Site identifier from the DSN |
| `agentminds.release` | ARP §2 | string | Release / git sha if `agentminds.init(release=...)` was called |
| `agentminds.environment` | ARP §2 | string | `production` / `staging` / `dev` |
| `agentminds.event.level` | ARP §3.3 | string | Sentry-aligned: fatal/error/warning/info/debug |
| `agentminds.event.severity` | ARP §3.3 | string | critical/high/medium/low/info (capture_exception only) |
| `agentminds.event.category` | ARP §3.3 | string | performance/security/... (capture_exception only) |
| `agentminds.operation` | (extension) | string | `capture_message` / `capture_exception` / `init` |
| `exception.type` | OTel | string | Class name (capture_exception only) |

## Why an extension package vs auto-instrumentation in `agentminds` itself?

- **Optional.** Most `agentminds` users don't run an OTel SDK. Bundling
  this into the main package would force the dep on everyone.
- **Apache-2.0.** OpenInference attribute names are spec-text only
  (Apache-2.0). This wrapper uses them; the main SDK doesn't have to
  inherit the licensing surface.
- **Phoenix isolation.** Per ARP REJECT list (deepdive Section 5),
  AgentMinds explicitly does NOT take a runtime dependency on Arize
  Phoenix (ELv2 + US patent claims). This package depends only on the
  Apache-2.0 OpenTelemetry stack.

## Compatibility

- Python ≥ 3.9
- `agentminds` ≥ 0.4.2
- `opentelemetry-api` ≥ 1.20

## License

Apache-2.0.

## Spec references

- ARP v1.2 spec: https://github.com/agentmindsdev/profile
- OpenInference v1 attributes: https://github.com/Arize-ai/openinference
- OTel GenAI semconv: https://opentelemetry.io/docs/specs/semconv/gen-ai/
