The Research Report
Google Genkit Ships Agents API with Detached Turns and Human-in-the-Loop
Source: https://www.infoq.com/news/2026/07/genkit-agents-api-preview/
For End Users
Genkit now offers an Agents API for TypeScript and Go. It lets you build AI assistants that keep context across conversations. You can start a task and walk away – the system runs it in the background and you can poll later. If a tool needs human approval, the agent pauses and asks you to confirm before continuing. Responses can stream in real time, so you see partial answers as they generate. The preview is in beta and already powers some Google products.
For Engineers and Researchers
The Agents API replaces the older Chat class with a unified defineAgent surface. Agents bundle model selection, system prompts, typed custom state (validated with Zod), and tool loops. Session persistence works via pluggable stores – Firestore, in‑memory, or file‑based – and snapshots enable deterministic resume. Detached turns are exposed as DetachedTask, allowing background execution without a live WebSocket. Interruptible tools return an AgentInterrupt that carries the pending payload and a signed resume token to prevent forgery. Streaming is handled by AgentChat.sendStream, sending JSON patches for state updates. The API is transport‑agnostic: the same shape runs in‑process or over HTTP via remoteAgent. The release adds middleware for delegation and artifact handling, plus Vercel AI SDK integration.
The Skeptical Take
Genkit’s Agents API is still in beta, so breaking changes are expected. The new abstraction is powerful but adds complexity: developers must manage session stores, snapshot IDs, and interrupt tokens. Early adopters may hit edge‑case bugs in detached background tasks or state synchronization, especially when scaling across many users. The ecosystem is younger than LangChain, so community integrations and third‑party tools are limited.
Word count: 290
Written at: 2026-07-15T01:09:02Z