Google has released a preview of the Agents API for the Genkit framework. It supports TypeScript and Go, allowing developers to handle everything from server-side agent definition to streaming conversations via the chat() interface, state management, tool loops, human approval, and HTTP serving in a unified way. Integration with Firebase and Firestore makes it suitable for production use.

📑Table of Contents
  1. Overview and Background of Genkit Agents API
  2. Core Features of the Agents API (Definition, State, Streaming, Interrupts)
  3. Full-Stack Integration and Client Connectivity
  4. Differences from ADK and Selection Criteria
  5. Genkit Agents vs Traditional generate() Approach
  6. Frequently Asked Questions (FAQ)
  7. Summary

Overview and Background of Genkit Agents API

Genkit is Google’s framework for building AI applications. Previously, the simple generate() call was the norm. With the Agents API, developers can now systematically build complex agent logic on the server side. According to the official Google Developers Blog, you define agents using DefineAgent with system prompts, tools, and state. The feature has gained attention on X as a potential new standard for agentic development.


Core Features of the Agents API (Definition, State, Streaming, Interrupts)

The heart of the Agents API lies in the DefineAgent function. You specify a system prompt, available tools, and a session store to create an agent. Conversations run through RunText or the streaming-enabled chat() interface.

A key capability is support for human-in-the-loop interrupts during tool execution. Session stores include FirestoreSessionStore, in-memory, file-based, or custom options. Long-running tasks can be detached and polled later.

Here is a Go example for defining an agent:

agent := genkit.DefineAgent("my-agent", systemPrompt, tools, FirestoreSessionStore{})

TypeScript offers equivalent definitions. The Developer UI Agent Runner makes testing conversations and interrupts straightforward.


Full-Stack Integration and Client Connectivity

A major strength is full-stack support. AllAgentRoutes lets you build an HTTP server, while remoteAgent on the frontend uses the same chat() interface.

This enables natural combinations of JavaScript/TypeScript frontends with Go or TypeScript backends. Delegation to sub-agents and artifact handling are also possible. Firebase integration provides production-grade session persistence.


Differences from ADK and Selection Criteria

Google’s ADK (Agent Development Kit) and the Agents API serve different purposes. ADK focuses on complex multi-agent orchestration and managed runtimes. In contrast, Genkit Agents API excels at embedding agents directly within applications.

Selection guidelines:

  • Single-app embedded agent control → Genkit Agents API
  • Complex multi-agent workflow management → ADK

For Claude Code and Cursor users, the ability to extend existing Genkit experience with agent features is particularly appealing.


Genkit Agents vs Traditional generate() Approach

Aspect Traditional generate() Genkit Agents API
Agent Definition Simple prompt invocation DefineAgent with tools, state, and sessions
Streaming Basic support Advanced streaming and interrupts via chat()
Human Approval Manual implementation required Standard support via InterruptibleTool
State Management Developer implements manually Official stores (Firestore etc.) for simplicity
Full-Stack Separate HTTP implementation needed Unified via AllAgentRoutes + remoteAgent
Production Integration Custom handling Native Firebase/Firestore support

Source: Google Developers Blog (as of July 2026)


Frequently Asked Questions (FAQ)

Q: Is the Genkit Agents API ready for production use?

It is in preview, but Firestore integration and HTTP serving provide a solid foundation for production. Watch for possible breaking changes in minor releases.

Q: Can I use stores other than Firestore?

Yes. In-memory, file-based, and custom stores are available. In-memory is convenient for development, while Firestore is recommended for production.

Q: How does the human approval mechanism work?

InterruptibleTool allows confirmation before tool execution. Official documentation includes examples such as shell command execution.

Q: Is migration from existing Genkit projects straightforward?

You can introduce it gradually by adding DefineAgent. Coexistence with generate() is supported.


Related articles:

Summary

The preview release of the Genkit Agents API significantly simplifies building full-stack conversational AI agents. By understanding the TypeScript/Go support, state management, interrupts, and HTTP integration based on official sources, Claude Code and Cursor users can apply these capabilities in real projects.

Start by reviewing the official Agents overview documentation and the Google Developers Blog announcement, then experiment with small agents. Leveraging Firebase integration enables efficient development of production-grade agent applications.

Related new article:

krona23

Author

krona23

Over 20 years in the IT industry, serving as Division Head and CTO at multiple companies running large-scale web services in Japan. Experienced across Windows, iOS, Android, and web development. Currently focused on AI-native transformation. At DevGENT, sharing practical guides on AI code editors, automation tools, and LLMs in three languages.

DevGENT about →

Leave a Reply

Trending

Discover more from DevGENT

Subscribe now to keep reading and get access to the full archive.

Continue reading