cd /news/developer-tools/genkit-1-39-retires-the-chat-beta-la… · home topics developer-tools article
[ARTICLE · art-66016] src=firerun.io ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Genkit 1.39 Retires the Chat Beta, Lands Production Agents

Genkit JS v1.39.0, released June 26, 2026, removes the beta Chat API and replaces it with a production-ready Agents framework built around defineAgent(), which includes stateful sessions, pluggable persistence via FirestoreSessionStore, streaming with JSON Patch state updates, and human-in-the-loop controls. Developers using ai.chat() or the Chat class must migrate to defineAgent() as the old API no longer compiles against 1.39.

read3 min views4 publishedJun 28, 2026
Genkit 1.39 Retires the Chat Beta, Lands Production Agents
Image: Firerun (auto-discovered)

Genkit JS v1.39.0 removes the beta Chat API and ships defineAgent, a production multi-turn agent framework with Firestore session persistence.

Genkit JS v1.39.0, released June 26, 2026, removes the beta Chat API entirely and replaces it with a production-ready Agents framework. If your app uses ai.chat()

or the Chat

class, migration is not optional. That code no longer compiles against 1.39.

The change is documented in the v1.39.0 release notes on GitHub (June 26, 2026).

What Changed #

The beta Chat

class and ai.chat(...)

method are gone. The replacement is ai.defineAgent()

, which provides everything Chat offered plus the infrastructure developers were building around it manually: stateful sessions, pluggable persistence, streaming, and human-in-the-loop controls.

The new surface looks like this:

import { genkit } from 'genkit';
import { googleAI } from '@genkit-ai/googleai';

const ai = genkit({ plugins: [googleAI()] });

const supportAgent = ai.defineAgent({
  name: 'supportAgent',
  model: googleAI.model('gemini-2.5-flash'),
  system: 'You are a helpful support agent.',
});

const session = await supportAgent.createSession();
const response = await session.chat('What plans do you offer?');

The defineAgent()

call replaces the old ai.chat()

entry point. Sessions are now explicit objects, not implicit chat instances. That gives you a place to attach persistence, pass custom state schemas via Zod, and re-open sessions by ID across requests.

Key Takeaways #

Migration is required:ai.chat()

and theChat

class are removed in 1.39. Pingenkit

to<1.39.0

if you need time to migrate, then move fast.is the new entry point for multi-turn AI conversations in Genkit JS.defineAgent()

SessionStore is pluggable: in-memory and file-based options ship in the core package; ais available for production deployments where session state must survive restarts and scale horizontally.FirestoreSessionStore

Streaming now delivers JSON Patch state updates, so clients can show incremental state changes (not just token deltas) without polling.Human-in-the-loop flows use an interrupt/resume pattern: an agent step can for external approval and resume from the same conversation state when the decision arrives.Multi-agent delegation: agent middleware handles it; one agent passes context to another without manual state threading.Vercel AI SDK integration ships viaGenkitChatTransport

, wiringdefineAgent

sessions directly into React chat UIs.

Migration Path #

The mechanical migration from Chat to Agents is straightforward for most apps:

Before (≤1.38) After (1.39+)
const chat = ai.chat(options)
const agent = ai.defineAgent(options)
await chat.send(message)
const session = await agent.createSession(); await session.chat(message)
No built-in persistence Pass sessionStore: new FirestoreSessionStore(db) to defineAgent

If you were managing conversation history manually on top of Chat, the new session.chat()

interface maintains that history automatically and exposes the full session snapshot for inspection or custom storage.

Production Session Persistence #

FirestoreSessionStore

is the production addition that matters most for server-side apps. Sessions persist to Firestore using incremental JSON Patch diffs, so a session that spans multiple HTTP requests or scales across Cloud Run instances stays consistent without any additional plumbing.

For local development and testing, the file-based store (FileSessionStore

) or the default in-memory store are sufficient.

What This Doesn’t Change #

Genkit flows, RAG, tool calling, and MCP support are unaffected by this release. The Chat API was one entry point to multi-turn conversations; everything else in the Genkit stack continues to work as documented. TypeScript and Go remain the two production-stable Genkit runtimes; Python and Dart remain in Preview.

— the other major SDK update from June 2026.Firebase SQL Connect Streaming Lands in the JavaScript SDK

── more in #developer-tools 4 stories · sorted by recency
── more on @genkit 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/genkit-1-39-retires-…] indexed:0 read:3min 2026-06-28 ·