Skip to main content

Agent Observability Python Framework Module: OpenAI Agents

agento11y-openai-agents provides callback handlers that map OpenAI Agents lifecycle events into agento11y generation recorder lifecycles.

Installation

pip install agento11y agento11y-openai-agents
pip install openai-agents

Quickstart

from agento11y import Client
from agento11y_openai_agents import with_agento11y_openai_agents_hooks

client = Client()
run_options = with_agento11y_openai_agents_hooks(None, client=client, provider_resolver="auto")
# Runner.run(agent, input="...", hooks=run_options["hooks"])

Native hooks wiring

from agento11y import Client
from agento11y_openai_agents import with_agento11y_openai_agents_hooks

client = Client()
run_options = with_agento11y_openai_agents_hooks(None, client=client, provider_resolver="auto")
# Runner.run(agent, input="...", hooks=run_options["hooks"])

Conversation mapping

Conversation ID precedence:

  1. conversation_id / session_id / group_id
  2. thread_id
  3. deterministic fallback agento11y:framework:openai-agents:<run_id>

Metadata and lineage

Required framework tags:

  • agento11y.framework.name=openai-agents
  • agento11y.framework.source=handler
  • agento11y.framework.language=python

Metadata includes:

  • required: agento11y.framework.run_type
  • optional: agento11y.framework.run_id, agento11y.framework.thread_id, agento11y.framework.parent_run_id, agento11y.framework.component_name, agento11y.framework.retry_attempt, agento11y.framework.event_id

Provider resolver

Resolver order: explicit provider option -> framework metadata -> model prefix inference -> custom.

Troubleshooting

  • If conversations are fragmented, pass stable session_id or conversation_id in callback metadata.
  • If provider is inferred as custom, set provider="openai" (or another provider) on handler init.
  • Always call client.shutdown() during teardown.

Download files

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

Source Distribution

agento11y_openai_agents-0.16.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

agento11y_openai_agents-0.16.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file agento11y_openai_agents-0.16.0.tar.gz.

File metadata

  • Download URL: agento11y_openai_agents-0.16.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for agento11y_openai_agents-0.16.0.tar.gz
Algorithm Hash digest
SHA256 19fcc7fecd5234b500d9c39af237233feb12f1993ff3c09c77371bfb5b85901c
MD5 fc73c267089705d313e6b49ec1b90573
BLAKE2b-256 3779d36a19582087e7201bef29aaa2e3aed4b336571c1220d20f0a4ffecf99df

See more details on using hashes here.

Provenance

The following attestation bundles were made for agento11y_openai_agents-0.16.0.tar.gz:

Publisher: python-sdks-publish.yml on grafana/agento11y

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agento11y_openai_agents-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agento11y_openai_agents-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d56d2332ba7e7083d4052ac5fec2eb476160883ff4bfd363c6abd31e9e2e9cf9
MD5 7c1d8a6e8a180f2e5f349e3627053b55
BLAKE2b-256 230f5e1e2cf5f25e359e3233e62d42f786c6e3e2c8b85bfe4dee4421af560c7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agento11y_openai_agents-0.16.0-py3-none-any.whl:

Publisher: python-sdks-publish.yml on grafana/agento11y

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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