Skip to main content

Respan instrumentation plugin for BeeAI Framework

Project description

Respan BeeAI Instrumentation

Respan instrumentation plugin for the BeeAI Framework.

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

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

Usage

Initialize Respan before creating or running BeeAI Framework components.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

respan_instrumentation_beeai-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

respan_instrumentation_beeai-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file respan_instrumentation_beeai-0.1.0.tar.gz.

File metadata

File hashes

Hashes for respan_instrumentation_beeai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ae0b3e01d2ceaa089890f9207d0cd8b83fe3f492988404d03ec4835a699d6d0
MD5 60cab350ec61203536997ee2b3f79c7e
BLAKE2b-256 3698def221b9200149e8729f0cfd00e2570169f4f96437e3718cd463cb548e47

See more details on using hashes here.

File details

Details for the file respan_instrumentation_beeai-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for respan_instrumentation_beeai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 198b57c2df6cb795a9d4bff2cba59872f2de9a2b3b82dfe6d88c894865ee714d
MD5 20429b5ea91f29cfb0adf7e80e7389aa
BLAKE2b-256 7f5527d89879f6b90380197840498443012b8abed15f0336560c612bcbe9618c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page