OpenAI Target adapter for Waken — routes waken Events to the OpenAI Responses API.
Project description
waken-openai
OpenAI Target adapter for Waken — "nginx
for AI agents." Routes a waken Event to the
OpenAI Responses API
and returns a Response.
Install
pip install waken-openai
OPENAI_API_KEY must be set in the environment — that's the openai SDK's
own convention, nothing waken-specific.
Usage
from waken import Runtime
from waken_openai import OpenAIAdapter
runtime = Runtime()
runtime.target("openai", OpenAIAdapter())
runtime.run()
waken send openai "Build tic tac toe." --wait
OpenAIAdapter keeps a waken session_id -> OpenAI response id map
internally, so a multi-turn conversation (same event.session_id across
calls) resumes via the Responses API's own previous_response_id — its
native server-side continuation mechanism — instead of starting over each
turn. Pass a model or extra client options at construction time:
runtime.target("openai", OpenAIAdapter(model="gpt-4o", organization="org-..."))
model defaults to "gpt-4.1". Any other keyword argument is forwarded
straight to AsyncOpenAI(...) (api_key, organization, base_url, ...).
Development
git clone https://github.com/WakenHQ/waken-openai
cd waken-openai
pip install -e ".[dev]"
pytest
Tests mock openai.AsyncOpenAI entirely — no API key or network access
needed to run the suite.
License
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 waken_openai-0.1.0.tar.gz.
File metadata
- Download URL: waken_openai-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ddc4318ea10b15813d5500aa02b0ebdfd68758b8725d2c94024189d17d6b19c
|
|
| MD5 |
3aee3f54ca54777d123410ef7b985101
|
|
| BLAKE2b-256 |
0d32f1d998b6c4e56a24a4bd6b4c36ea70436f38c781b05f52fbb787981e7073
|
Provenance
The following attestation bundles were made for waken_openai-0.1.0.tar.gz:
Publisher:
publish.yml on WakenHQ/waken-openai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waken_openai-0.1.0.tar.gz -
Subject digest:
0ddc4318ea10b15813d5500aa02b0ebdfd68758b8725d2c94024189d17d6b19c - Sigstore transparency entry: 2082012320
- Sigstore integration time:
-
Permalink:
WakenHQ/waken-openai@b70a10a1e8b04bff68dfe0ad4cec00877ee80a80 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WakenHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b70a10a1e8b04bff68dfe0ad4cec00877ee80a80 -
Trigger Event:
push
-
Statement type:
File details
Details for the file waken_openai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: waken_openai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad09c8e224dbc176ee5b70b378792a65db197b94216fd73adec4e034c90771a9
|
|
| MD5 |
3d95e8c30f554e47fb77fb87cf6935d4
|
|
| BLAKE2b-256 |
0f093dc00a8192d52bcc971ce3864d750507142a73a464a78a831b94671bdb22
|
Provenance
The following attestation bundles were made for waken_openai-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on WakenHQ/waken-openai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
waken_openai-0.1.0-py3-none-any.whl -
Subject digest:
ad09c8e224dbc176ee5b70b378792a65db197b94216fd73adec4e034c90771a9 - Sigstore transparency entry: 2082012339
- Sigstore integration time:
-
Permalink:
WakenHQ/waken-openai@b70a10a1e8b04bff68dfe0ad4cec00877ee80a80 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/WakenHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b70a10a1e8b04bff68dfe0ad4cec00877ee80a80 -
Trigger Event:
push
-
Statement type: