github genkit-ai/genkit py/v0.10.0
Genkit Python SDK v0.10.0

4 hours ago

Release Highlights: Genkit Python SDK v0.10.0

We are excited to announce the v0.10.0 release of the Genkit Python SDK!

This release expands Genkit’s multi-cloud footprint with the official launch of the Amazon Bedrock Plugin.

This release also brings enterprise-grade Firestore agent persistence to Python with the Firestore Session Store, achieves full cross-SDK Agent Conformance parity, and improves the local developer experience by reducing noisy logging in Terminal.


Major Highlights

1. Official Amazon Bedrock Plugin (genkit-amazon-bedrock)

Developers building on AWS can now leverage Genkit's unified abstractions across Bedrock-hosted foundation models:

  • Converse & ConverseStream APIs: Unified text generation, streaming, tool-calling, and multimodal input across Anthropic Claude on Bedrock, Amazon Nova, Amazon Titan, Mistral, and Cohere.
  • Embeddings & Reranking: Direct integration with Amazon Titan Embeddings (v1/v2) and Cohere Rerank for high-precision RAG pipelines.
  • Image Generation: First-class support for Amazon Titan Image Generator and Stability AI (SDXL).
  • Async Boto3 Engine: High-throughput async client dispatch with automatic AWS credential resolution (IAM roles, SSO, environment variables) and exponential backoff retry.
from genkit import Genkit
from genkit_amazon_bedrock import Bedrock

# 1. Initialize Bedrock (uses ambient AWS credentials and region)
ai = Genkit(plugins=[Bedrock()])

# 2. Generate with flagship Bedrock models
res = await ai.generate(
    model='bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0',
    prompt='Summarize the benefits of declarative AI orchestration in three bullets.',
)

# 3. Inspect the output
print(res.text)
# => • Type-safe tool definitions and schema validation
#    • Cloud-agnostic provider switching without code changes
#    • Integrated observability and multi-turn state management

2. Enterprise Agent Persistence: FirestoreSessionStore

Building production-grade conversational agents requires durable state management that survives container restarts, scales horizontally across serverless workers (Cloud Run, Cloud Functions), and doesn't degrade on long conversations.

Unlike naive single-document session stores that quickly hit Firestore's 1 MiB document limit and incur heavy read/write costs, the new FirestoreSessionStore in genkit-google-cloud is engineered for long-lived sessions:

  • Incremental Diffs & Sharded Checkpoints: Persists each turn as an incremental RFC 6902 JSON Patch diff anchored to periodic full-state checkpoints, so state is sharded and sessions scale indefinitely without hitting document size limits.
  • Bounded Document I/O: The number of documents read or written per turn is bounded by checkpoint_interval (default 25) rather than total conversation length, keeping latency and Firestore costs predictable.
  • Zero Secondary Indexes (Strong Consistency): State reconstruction and turn lookups use only direct document-ID fetches inside read transactions, requiring no composite indexes.
  • Atomic Transactions: Snapshot writes and session pointer updates commit together in atomic Firestore transactions with automatic retry handling on concurrent writes.
  • Realtime Status Streaming: Uses native Firestore listeners (on_snapshot_status_change) to stream live turn statuses across processes and support distributed aborts.
from genkit import Genkit
from genkit_google_cloud import FirestoreSessionStore
from genkit_google_genai import GoogleAI

ai = Genkit(plugins=[GoogleAI()])

# 1. Instantiate persistent Firestore session store
store = FirestoreSessionStore(collection='agent_sessions')

# 2. Define an agent with Firestore persistence
agent = ai.define_agent(
    name='customer_assistant',
    model='googleai/gemini-pro-latest',
    system='You are a helpful customer support assistant.',
    store=store,
)

# 3. Resume multi-turn conversations seamlessly across distributed instances
chat = agent.chat(session_id='session_user_12345')
response = await chat.send('Where did we leave off on my order?')

3. Pinned Catalog Entries: Gemini 3.6 & 3.7 Flash

While dynamic aliases like googleai/gemini-flash-latest automatically point to the current Gemini Flash release, we have officially added googleai/gemini-3.6-flash and googleai/gemini-3.7-flash to the known models catalog in genkit-google-genai. This allows production applications to explicitly pin their model versions for reproducible inference and regression testing.


4. Cross-SDK Agent Conformance & Protocol Hardening

  • Shared Conformance Harness: Added an automated cross-SDK test suite (agent_conformance_test.py) validating the Python SDK against the shared Genkit agent specification (agents.yaml).
  • Turn Lifecycle & Aborts: Hardened client-side and server-side abort signal handling, turn snapshot serialization, and session branch resumes.
  • Actionable Tool Restart Errors: When resuming interrupted turns, underlying reasons (such as missing toolApproved metadata) are now surfaced clearly in GenkitError rather than as generic runtime failures.

🔧 Developer Experience & Terminal Logging

  • Refined Local Terminal Logging: Cleaned up the local development logging experience by demoting verbose framework discovery and health-check chatter on the shared terminal console (#5979).
  • Sanitized Model Payloads: Debug logs now suppress dumping full prompt strings and raw model response bodies by default, protecting sensitive developer data and keeping terminal streams readable (#5968).
  • Standardized Error Taxonomy: Model resolution failures now cleanly raise GenkitError(status='NOT_FOUND') instead of uncaught key errors (#5982).
  • Dev UI Model Capabilities: Serialized ModelInfo with camelCase aliases, ensuring model features (tool calling, streaming, multimodality) render correctly in the Developer UI (#5964).

Breaking Changes

Custom SessionStore Protocol Contract Update

For developers implementing custom session persistence backends (e.g. for Redis, Postgres, or DynamoDB), the SessionStore protocol has been updated to support cross-process snapshot status subscriptions (SnapshotSubscriber) and strict state transition invariants (#6028). Custom store implementations will need to update their class signatures to implement these lifecycle methods.


Package Releases

Package Version
genkit (Core SDK) 0.10.0
genkit-amazon-bedrock (New) 0.10.0
genkit-anthropic 0.10.0
genkit-django 0.10.0
genkit-evaluators 0.10.0
genkit-fastapi 0.10.0
genkit-flask 0.10.0
genkit-google-cloud 0.10.0
genkit-google-genai 0.10.0
genkit-middleware 0.10.0
genkit-ollama 0.10.0
genkit-openai 0.10.0
genkit-vertexai 0.10.0

Don't miss a new genkit release

NewReleases is sending notifications on new releases.