Skip to main content

waken-gemini

CI License: MIT

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

MIT

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)

Source distribution for waken-gemini 0.1.0
File Size Uploaded
waken_gemini-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for waken-gemini 0.1.0
File Interpreter ABI Platform
waken_gemini-0.1.0-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page