OpenAI Agents callback handlers for the Grafana Agent Observability Python SDK
Project description
Sigil Python Framework Module: OpenAI Agents
agento11y-openai-agents provides callback handlers that map OpenAI Agents lifecycle events into Sigil 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:
conversation_id/session_id/group_idthread_id- deterministic fallback
agento11y:framework:openai-agents:<run_id>
Metadata and lineage
Required framework tags:
agento11y.framework.name=openai-agentsagento11y.framework.source=handleragento11y.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_idorconversation_idin callback metadata. - If provider is inferred as
custom, setprovider="openai"(or another provider) on handler init. - Always call
client.shutdown()during teardown.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agento11y_openai_agents-0.10.0.tar.gz.
File metadata
- Download URL: agento11y_openai_agents-0.10.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f3d3b9ce1d1ccef39eb688029461ac19e35ec96410ba72fc1c8a0a34b1c912
|
|
| MD5 |
c7a160242348cf1b2f1ca34eb22705fc
|
|
| BLAKE2b-256 |
5a71a47ab6196897e6e10eae78f34d9e2d73721266b586893042f38a1db19584
|
Provenance
The following attestation bundles were made for agento11y_openai_agents-0.10.0.tar.gz:
Publisher:
python-sdks-publish.yml on grafana/agento11y
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agento11y_openai_agents-0.10.0.tar.gz -
Subject digest:
07f3d3b9ce1d1ccef39eb688029461ac19e35ec96410ba72fc1c8a0a34b1c912 - Sigstore transparency entry: 2212045835
- Sigstore integration time:
-
Permalink:
grafana/agento11y@a4e0bb2da205e2db40e7668df4e343263872cb3a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/grafana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdks-publish.yml@a4e0bb2da205e2db40e7668df4e343263872cb3a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file agento11y_openai_agents-0.10.0-py3-none-any.whl.
File metadata
- Download URL: agento11y_openai_agents-0.10.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
349e9ab540454c51a5e50a3eeb99c14916c77ee8316f6d4fc16ecd414707f50d
|
|
| MD5 |
a50937963a709d791a6d8f221f08754c
|
|
| BLAKE2b-256 |
d28add86636b7a82654b9bdb8ba76047af66fe6e45e29fbde5c6f09447236431
|
Provenance
The following attestation bundles were made for agento11y_openai_agents-0.10.0-py3-none-any.whl:
Publisher:
python-sdks-publish.yml on grafana/agento11y
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agento11y_openai_agents-0.10.0-py3-none-any.whl -
Subject digest:
349e9ab540454c51a5e50a3eeb99c14916c77ee8316f6d4fc16ecd414707f50d - Sigstore transparency entry: 2212045853
- Sigstore integration time:
-
Permalink:
grafana/agento11y@a4e0bb2da205e2db40e7668df4e343263872cb3a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/grafana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdks-publish.yml@a4e0bb2da205e2db40e7668df4e343263872cb3a -
Trigger Event:
workflow_dispatch
-
Statement type: