Metadata-Version: 2.4
Name: aumos-agent-observability
Version: 0.2.0
Summary: OpenTelemetry-native agent tracing, cost attribution, and drift detection
Project-URL: Homepage, https://github.com/aumos-ai/agent-observability
Project-URL: Documentation, https://github.com/aumos-ai/agent-observability#readme
Project-URL: Repository, https://github.com/aumos-ai/agent-observability
Project-URL: Issues, https://github.com/aumos-ai/agent-observability/issues
Author: AumOS Contributors
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Provides-Extra: agentcore
Requires-Dist: aumos-agentcore-sdk>=0.1.0; extra == 'agentcore'
Provides-Extra: all-frameworks
Requires-Dist: anthropic>=0.30.0; extra == 'all-frameworks'
Requires-Dist: crewai>=0.50.0; extra == 'all-frameworks'
Requires-Dist: langchain-core>=0.2.0; extra == 'all-frameworks'
Requires-Dist: openai>=1.0.0; extra == 'all-frameworks'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.30.0; extra == 'anthropic'
Provides-Extra: crewai
Requires-Dist: crewai>=0.50.0; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pip-audit; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.3; extra == 'dev'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
Provides-Extra: langfuse
Requires-Dist: langfuse>=2.0; extra == 'langfuse'
Provides-Extra: microsoft
Requires-Dist: microsoft-agents>=0.1.0; extra == 'microsoft'
Provides-Extra: openai-agents
Requires-Dist: openai>=1.0.0; extra == 'openai-agents'
Description-Content-Type: text/markdown

# agent-observability

OpenTelemetry-native agent tracing, cost attribution, and drift detection

[![CI](https://github.com/aumos-ai/agent-observability/actions/workflows/ci.yaml/badge.svg)](https://github.com/aumos-ai/agent-observability/actions/workflows/ci.yaml)
[![PyPI version](https://img.shields.io/pypi/v/agent-observability.svg)](https://pypi.org/project/agent-observability/)
[![Python versions](https://img.shields.io/pypi/pyversions/agent-observability.svg)](https://pypi.org/project/agent-observability/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

Part of the [AumOS](https://github.com/aumos-ai) open-source agent infrastructure portfolio.

---

## Features

- Eight agent-semantic OTel span kinds — `llm_call`, `tool_invoke`, `memory_read`, `memory_write`, `reasoning_step`, `agent_delegate`, `human_approval`, and `agent_error` — each with typed fluent setters for tokens, cost, model, and domain-specific fields
- `AgentTracer` context-manager factory produces `AgentSpan` instances backed by a real OTel tracer when the SDK is installed, or a zero-dependency no-op fallback when it is not
- Per-call cost attribution with model pricing tables and `CostAnnotation` dataclasses recorded directly on LLM call spans
- Behavioral drift detection: `BaselineProfiler` accumulates metrics (tool call frequency, prompt length, error rate), and `DriftDetector` raises alerts when observations deviate beyond configurable thresholds
- PII-safe telemetry via a configurable `Redactor` that scrubs span attributes before they are exported
- Auto-instrumentation modules for LangChain, CrewAI, AutoGen, Anthropic SDK, OpenAI SDK, and MCP — call `instrument()` once and all framework calls emit spans automatically
- Pre-built Grafana dashboard definitions for agent throughput, cost trends, error rates, and drift alerts

## Quick Start

Install from PyPI:

```bash
pip install agent-observability
```

Verify the installation:

```bash
agent-observability version
```

Basic usage:

```python
import agent_observability

# See examples/01_quickstart.py for a working example
```

## Documentation

- [Architecture](docs/architecture.md)
- [Contributing](CONTRIBUTING.md)
- [Changelog](CHANGELOG.md)
- [Examples](examples/README.md)

## Enterprise Upgrade

For production deployments requiring SLA-backed support and advanced
integrations, contact the maintainers or see the commercial extensions documentation.

## Contributing

Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md)
before opening a pull request.

## License

Apache 2.0 — see [LICENSE](LICENSE) for full terms.

---

Part of [AumOS](https://github.com/aumos-ai) — open-source agent infrastructure.
