Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Genkit Google Cloud Plugin

Export Genkit telemetry to Google Cloud Trace, Cloud Monitoring, and Cloud Logging.

Building with a coding agent? Install the Genkit Python skill first.

npx skills add genkit-ai/skills --skill developing-genkit-python

It teaches your agent the current Genkit Python APIs and common gotchas. Source, manual install and skills for other languages: genkit-ai/skills.

Installation

uv add genkit-google-cloud genkit-google-genai

Usage

from genkit import Genkit
from genkit_google_cloud import enable_google_cloud_telemetry
from genkit_google_genai import GoogleAI

enable_google_cloud_telemetry(project='my-project')

ai = Genkit(plugins=[GoogleAI()], model=GoogleAI.gemini('gemini-flash-latest'))

Requires Google Cloud Application Default Credentials (ADC) or explicit credentials.

Sampling

Every trace is exported by default (unless OTEL_TRACES_SAMPLER says otherwise). To export a fraction, pass sampler=. ParentBased keeps the caller's decision when a request arrives with a traceparent, so a trace that started upstream is not cut in half:

from opentelemetry.sdk.trace.sampling import ParentBased, TraceIdRatioBased

enable_google_cloud_telemetry(
    project='my-project',
    sampler=ParentBased(TraceIdRatioBased(0.1)),
)
# => about 1 in 10 new traces reach Cloud Trace

sampler= applies to the tracer provider this helper creates. If your app already set one, put the sampler on that provider instead; passing sampler= then raises INVALID_ARGUMENT:

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider

trace.set_tracer_provider(TracerProvider(sampler=ParentBased(TraceIdRatioBased(0.1))))
enable_google_cloud_telemetry(project='my-project')
# => Cloud Trace joins your provider and uses its sampler

Sessions on Firestore

FirestoreSessionStore persists agent sessions durably: every turn is stored as a snapshot, sessions survive restarts and resume across processes, and status subscriptions enable features like a cross-process stop button.

It needs the firestore extra; telemetry-only installs skip the Firestore and gRPC dependencies:

pip install 'genkit-google-cloud[firestore]'
# or: uv add 'genkit-google-cloud[firestore]'
from genkit.exp import Genkit
from genkit_google_cloud.exp import FirestoreSessionStore
from genkit_google_genai import GoogleAI

ai = Genkit(plugins=[GoogleAI()], model=GoogleAI.gemini('gemini-flash-latest'))
store = FirestoreSessionStore()  # uses Application Default Credentials
agent = ai.define_agent(name='assistant', store=store)

Notes:

  • Data lives under three collection roots derived from collection (default genkit-sessions, plus -shards and -pointers). Delete all three together when cleaning up.
  • Multi-tenant apps pass snapshot_path_prefix to derive a per-tenant path segment from call context.
  • After a regenerate/branch, resume a specific branch by snapshot_id; session_id lookup follows the most recently written branch.
  • See the class docstring for costs, limits, and lifecycle details.

Metadata

Release files for genkit-google-cloud 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for genkit-google-cloud 0.14.0
File Size Uploaded Provenance Actions
genkit_google_cloud-0.14.0.tar.gz 79.7 kB With provenance Details for genkit_google_cloud-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genkit-google-cloud 0.14.0
File Interpreter ABI Platform Actions
genkit_google_cloud-0.14.0-py3-none-any.whl Python 3 none any Details for genkit_google_cloud-0.14.0-py3-none-any.whl

Total release size: 129.2 kB

Release files / genkit_google_cloud-0.14.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL genkit_google_cloud-0.14.0.tar.gz
Size 79.7 kB
Tags Source
SHA-256 checksum
How to use checksums
272336092b520f4e3b243d5a5bc52eb2d9a710ac0116464447f1d2df7b30c2a9
BLAKE2b-256 checksum
How to use checksums
620272112ef157f933d42d97f01688e75f9dfd537d439a388bbbbc2779c88960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / genkit_google_cloud-0.14.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL genkit_google_cloud-0.14.0-py3-none-any.whl
Size 49.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb08b12f727112e3614fa2477e9f05d694afd1ef435acb2313e8c9aecab32234
BLAKE2b-256 checksum
How to use checksums
09a4b4c76326c89f520a4d73fc988ba804bad79161b13ac781f239e3a3625f11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Security for genkit-google-cloud 0.14.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.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for genkit_google_cloud-0.14.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 Nov 19, 2026.

Transparency log

A 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.

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