Metadata-Version: 2.4
Name: respan-instrumentation-beeai
Version: 0.1.0
Summary: Respan instrumentation plugin for BeeAI Framework
License: Apache 2.0
Author: Respan
Author-email: team@respan.ai
Requires-Python: >=3.11,<3.14
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: beeai-framework (>=0.1.51)
Requires-Dist: openinference-instrumentation-beeai (>=0.1.16)
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.1)
Requires-Dist: respan-instrumentation-openinference (>=1.2.2)
Requires-Dist: respan-sdk (>=2.5.0)
Requires-Dist: respan-tracing (>=2.16.1,<3.0.0)
Description-Content-Type: text/markdown

# Respan BeeAI Instrumentation

Respan instrumentation plugin for the [BeeAI Framework](https://framework.beeai.dev/).

The package wraps `openinference-instrumentation-beeai` with Respan's
instrumentation lifecycle and registers Respan's OpenInference translator so
BeeAI agent, workflow, tool, chat model, and embedding spans are exported
through the Respan OTLP pipeline.

## Install

```bash
pip install respan-ai respan-instrumentation-beeai beeai-framework
```

## Usage

Initialize Respan before creating or running BeeAI Framework components.

```python
import asyncio

from beeai_framework.agents.requirement import RequirementAgent
from beeai_framework.backend import ChatModel
from respan import Respan
from respan_instrumentation_beeai import BeeAIInstrumentor


async def main() -> None:
    respan = Respan(instrumentations=[BeeAIInstrumentor()])

    agent = RequirementAgent(
        llm=ChatModel.from_name("openai:gpt-4.1-nano"),
        role="friendly AI assistant",
        instructions="Answer clearly and concisely.",
    )
    response = await agent.run("Explain why observability matters for agents.")
    print(response.last_message.text)

    respan.flush()


if __name__ == "__main__":
    asyncio.run(main())
```

Any keyword arguments passed to `BeeAIInstrumentor(...)` are forwarded to the
underlying OpenInference BeeAI instrumentor.

