OpenAI Agents callback handlers for Sigil Python SDK
Project description
Sigil Python Framework Module: OpenAI Agents
sigil-sdk-openai-agents provides callback handlers that map OpenAI Agents lifecycle events into Sigil generation recorder lifecycles.
Installation
pip install sigil-sdk sigil-sdk-openai-agents
pip install openai-agents
Quickstart
from sigil_sdk import Client
from sigil_sdk_openai_agents import with_sigil_openai_agents_hooks
client = Client()
run_options = with_sigil_openai_agents_hooks(None, client=client, provider_resolver="auto")
# Runner.run(agent, input="...", hooks=run_options["hooks"])
Native hooks wiring
from sigil_sdk import Client
from sigil_sdk_openai_agents import with_sigil_openai_agents_hooks
client = Client()
run_options = with_sigil_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
sigil:framework:openai-agents:<run_id>
Metadata and lineage
Required framework tags:
sigil.framework.name=openai-agentssigil.framework.source=handlersigil.framework.language=python
Metadata includes:
- required:
sigil.framework.run_type - optional:
sigil.framework.run_id,sigil.framework.thread_id,sigil.framework.parent_run_id,sigil.framework.component_name,sigil.framework.retry_attempt,sigil.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
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 sigil_sdk_openai_agents-0.2.0.tar.gz.
File metadata
- Download URL: sigil_sdk_openai_agents-0.2.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c133382b38e7392dc84a1c4c5cffa7946883228b6d563ba3dc75fbc3537a5244
|
|
| MD5 |
953db0f737afd40e0d15ae1734cbcc5c
|
|
| BLAKE2b-256 |
a829ca687e989a5669babf87b6a435138b871db48e05da2f87e1f664fc61b8f1
|
Provenance
The following attestation bundles were made for sigil_sdk_openai_agents-0.2.0.tar.gz:
Publisher:
python-sdks-publish.yml on grafana/sigil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigil_sdk_openai_agents-0.2.0.tar.gz -
Subject digest:
c133382b38e7392dc84a1c4c5cffa7946883228b6d563ba3dc75fbc3537a5244 - Sigstore transparency entry: 1417607112
- Sigstore integration time:
-
Permalink:
grafana/sigil-sdk@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
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@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sigil_sdk_openai_agents-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sigil_sdk_openai_agents-0.2.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 |
041cde6dfcdf33b348fd261225a3578ff8a7161e03b843cfc4f21d020281037e
|
|
| MD5 |
654d9acc38fe38eb84510cf8bc1de33b
|
|
| BLAKE2b-256 |
9b25abd53fc1f200a2bb64266e1b49bf5a063ce2def3f429775a577ec3ec6a3d
|
Provenance
The following attestation bundles were made for sigil_sdk_openai_agents-0.2.0-py3-none-any.whl:
Publisher:
python-sdks-publish.yml on grafana/sigil-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigil_sdk_openai_agents-0.2.0-py3-none-any.whl -
Subject digest:
041cde6dfcdf33b348fd261225a3578ff8a7161e03b843cfc4f21d020281037e - Sigstore transparency entry: 1417607390
- Sigstore integration time:
-
Permalink:
grafana/sigil-sdk@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
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@3cfc596f2d3ca631ce9fa8fe3107d71c17caf924 -
Trigger Event:
workflow_dispatch
-
Statement type: