waken-gemini
A Gemini Target adapter for
Waken — "nginx for AI agents." Routes
waken Events to Google's google-genai SDK and returns the result as a
waken Response.
Install
pip install waken-gemini
Usage
from waken import Runtime
from waken_gemini import GeminiAdapter
runtime = Runtime()
runtime.target("gemini", GeminiAdapter())
runtime.run()
GeminiAdapter reads GEMINI_API_KEY from the environment — that's
google-genai's own convention (see genai.Client()), nothing
waken-specific. Pass api_key=... (or any other genai.Client keyword) to
override:
runtime.target("gemini", GeminiAdapter(model="gemini-2.5-pro", api_key="..."))
Sessions
Gemini's SDK, unlike some other providers, has no server-side resumable
session id — the google-genai Chat object keeps conversation history
client-side, in process memory. So GeminiAdapter maps a waken session_id
to the SDK's Chat object itself (not a string id) and keeps reusing that
same object turn over turn. A practical consequence: conversation history for
a given waken session does not survive an adapter process restart, since
there is nothing server-side to resume from. An Event with no session_id
gets a fresh one-off Chat every call and is never stored.
Development
git clone https://github.com/WakenHQ/waken-gemini
cd waken-gemini
pip install -e ".[dev]"
pytest
Tests mock google.genai.Client entirely — no API key or network access
needed to run the suite.
License
Metadata
Release files for waken-gemini 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| waken_gemini-0.1.0.tar.gz | 5.2 kB | With provenance | Details for waken_gemini-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| waken_gemini-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for waken_gemini-0.1.0-py3-none-any.whl |
Total release size: 9.5 kB
Release files / waken_gemini-0.1.0.tar.gz
| Download URL | waken_gemini-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
873e3dfd3df97f8245c4dd7c3b81eaf60b176f6e8e83622fca963ccfa5e7f0df
|
|
BLAKE2b-256 checksum How to use checksums |
ad3e7a374a8c8e9343d1c02ba65f07acb79abaed900d5b1e0a25f5c611ad74e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / waken_gemini-0.1.0-py3-none-any.whl
| Download URL | waken_gemini-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f693e1ec153bd3ea5c4f64728dccdd6323d73e0460e986fef4912caa8e3c084a
|
|
BLAKE2b-256 checksum How to use checksums |
4ea0a1db7e6d2edf48b7c5925887800576279097127d267c0f1a8b1444909284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logSecurity for waken-gemini 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for waken_gemini-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.