openai-sdk-helpers
Small, typed, SDK-first primitives for composing OpenAI Responses, Agents, files, vector stores, tools, and Codex plugins.
Install · Choose a surface · Capabilities · Security · Roadmap
Product contract
openai-sdk-helpers complements the official openai and openai-agents
Python packages. It provides reusable production primitives without replacing
the SDKs, hiding API calls, owning application prompts, or becoming a universal
agent framework.
Every public helper should be:
- typed and predictable;
- thin enough that official SDK concepts remain recognizable;
- explicit about network calls, resource ownership, and cleanup;
- usable without unrelated optional integrations;
- tested without requiring paid API calls in pull-request CI;
- backward-compatible or accompanied by deliberate migration guidance.
See PRODUCT.md for the full product vision and feature acceptance test.
Installation
The core package installs both official OpenAI Python SDKs and no UI or LangExtract dependency:
pip install openai-sdk-helpers
Optional profiles:
pip install "openai-sdk-helpers[extract]" # LangExtract-backed extraction
pip install "openai-sdk-helpers[ui]" # Streamlit application helpers
pip install "openai-sdk-helpers[all]" # All current optional capabilities
Python 3.10–3.13 is validated in CI. The distribution includes py.typed.
See docs/installation.md for profile details and
missing-extra behavior.
Choose a surface
Responses
Use openai_sdk_helpers.response when the application needs direct control of
Responses API inputs, response identifiers, message history, custom tool
handlers, files, or raw streaming events.
from openai_sdk_helpers import OpenAISettings
from openai_sdk_helpers.response import ResponseBase
settings = OpenAISettings.from_env()
with ResponseBase(
name="reviewer",
instructions="Review the supplied code.",
tools=None,
output_structure=None,
tool_handlers={},
openai_settings=settings,
) as response:
result = response.run_sync("Review: def add(a, b): return a + b")
print(result)
Agents
Use openai_sdk_helpers.agent when the application benefits from the official
Agents SDK loop, tools, sessions, guardrails, handoffs, or tracing.
from openai_sdk_helpers.agent import SummarizerAgent
agent = SummarizerAgent(default_model="your-model")
result = agent.run_sync("Summarize this text in one sentence.")
print(result.text)
Codex plugins
Use openai_sdk_helpers.codex when a separately packaged capability should
register typed commands through deterministic entry-point discovery.
openai-helpers codex plugins
openai-helpers codex commands
See docs/codex-plugins.md for the plugin protocol, lifecycle, discovery, compatibility, and packaging guide.
Direct SDK calls
Use the official SDK directly when a package helper would only rename parameters or obscure the underlying client, resource, response, event, or exception. Access to underlying SDK objects is part of this project's escape- hatch policy.
The canonical inventory of shipped and planned surfaces is docs/capabilities.md.
Core capabilities
- centralized OpenAI settings and client creation;
- optional shared operation metadata and lifecycle observers;
- explicit conversation-state ownership and persistence contracts;
- Responses API orchestration, structured outputs, files, tools, and websocket helpers;
- Agents SDK wrappers, runners, search workflows, and reusable text agents;
- typed Pydantic structures and Jinja prompt rendering;
- file and vector-store helpers;
- output validation and shared tool contracts;
- deterministic Codex plugin registration, discovery, inspection, and lifecycle;
- optional LangExtract and Streamlit integrations;
- local CLI inspection without hidden API calls.
Detailed maturity, installation, execution, and escape-hatch information lives only in the capability matrix.
Configuration
OpenAISettings loads standard configuration from environment variables or a
local .env file and creates official SDK clients:
from openai_sdk_helpers import OpenAISettings
settings = OpenAISettings.from_env()
client = settings.create_client()
Common variables include OPENAI_API_KEY, OPENAI_ORG_ID,
OPENAI_PROJECT_ID, OPENAI_BASE_URL, OPENAI_MODEL, OPENAI_TIMEOUT, and
OPENAI_MAX_RETRIES. Uncommon official client parameters remain available
through extra_client_kwargs.
Security
Report suspected vulnerabilities through the repository's confidential GitHub private vulnerability reporting flow, not a public issue. Never include real credentials, customer prompts, model responses, uploaded files, or production logs. See SECURITY.md for supported versions, reporting guidance, and trust boundaries.
Documentation
- Capability matrix — canonical feature inventory and maturity
- Public API — intentional import surface
- Operation context — lifecycle hooks, usage, diagnostics, and SDK boundaries
- Conversation state — ownership modes, compatibility, persistence, and migration
- Installation profiles — core and optional dependencies
- Supported examples — executable and illustrative example policy
- Security policy — confidential reporting and supported versions
- Release checklist — security and publication gates
- Codex plugins — protocol, lifecycle, discovery, and packaging
- 0.8 Codex migration — compatibility guidance
- Publishing — OIDC release process and recovery
- Product vision — mission, users, principles, and non-goals
- Roadmap — shipped foundations and release gates
- Changelog — user-visible changes
Development
git clone https://github.com/fatmambot33/openai-sdk-helpers.git
cd openai-sdk-helpers
pip install -e ".[dev]"
pydocstyle src
black --check --diff .
pyright src
pytest -q --cov=src --cov-report=term-missing --cov-fail-under=70
python scripts/check_markdown_links.py
Additional CI validates Python 3.10–3.13, minimum and latest compatible OpenAI
SDK versions, built distributions, installed entry points, supported examples,
and isolated core, extract, ui, and all profiles.
See CONTRIBUTING.md and AGENTS.md before changing public behavior.
Scope boundaries
This project is not an end-user application, hosted platform, replacement SDK, universal agent framework, prompt catalog, or storage service. Application- specific business logic belongs in consuming projects.
MCP, consolidated retrieval, and Realtime helpers are roadmap items, not current package promises. Their issue order and release gates are tracked in ROADMAP.md.
License
Licensed under the MIT License.
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 openai_sdk_helpers-0.9.0.tar.gz.
File metadata
- Download URL: openai_sdk_helpers-0.9.0.tar.gz
- Upload date:
- Size: 172.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08773a1bb555e66bdeb6f06967c6cb85655f0246513e46a8cc96b1dcc7b3ecb7
|
|
| MD5 |
d8059949b060100f8b936e82e3f7abee
|
|
| BLAKE2b-256 |
e6b65a52dc116d0ae7cac351bfe61135aff7eca09cb622024b58531bcf2a2a12
|
Provenance
The following attestation bundles were made for openai_sdk_helpers-0.9.0.tar.gz:
Publisher:
python-publish.yml on fatmambot33/openai-sdk-helpers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openai_sdk_helpers-0.9.0.tar.gz -
Subject digest:
08773a1bb555e66bdeb6f06967c6cb85655f0246513e46a8cc96b1dcc7b3ecb7 - Sigstore transparency entry: 2582195013
- Sigstore integration time:
-
Permalink:
fatmambot33/openai-sdk-helpers@e2e13feef30b09f42c822f400b1c84d337ded59d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fatmambot33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e2e13feef30b09f42c822f400b1c84d337ded59d -
Trigger Event:
push
-
Statement type:
File details
Details for the file openai_sdk_helpers-0.9.0-py3-none-any.whl.
File metadata
- Download URL: openai_sdk_helpers-0.9.0-py3-none-any.whl
- Upload date:
- Size: 230.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27dd9027066484633ae5d60593f0699d5754b42f571ba2310085587a20e6a08e
|
|
| MD5 |
37eb7c2476bdb0d1c7b304f37cb1f45c
|
|
| BLAKE2b-256 |
5e1878b2f68e16672ae18bf1be2f81a6d139cc5fa92a3343235a9211a8771ad4
|
Provenance
The following attestation bundles were made for openai_sdk_helpers-0.9.0-py3-none-any.whl:
Publisher:
python-publish.yml on fatmambot33/openai-sdk-helpers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openai_sdk_helpers-0.9.0-py3-none-any.whl -
Subject digest:
27dd9027066484633ae5d60593f0699d5754b42f571ba2310085587a20e6a08e - Sigstore transparency entry: 2582195026
- Sigstore integration time:
-
Permalink:
fatmambot33/openai-sdk-helpers@e2e13feef30b09f42c822f400b1c84d337ded59d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fatmambot33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e2e13feef30b09f42c822f400b1c84d337ded59d -
Trigger Event:
push
-
Statement type: