Genkit vs Google ADK: moving from flows to orchestration

By ALEXANDRE DERGHAM · 2026-11-30

Picking a generative AI framework is often a bet on speed, until more demanding use cases expose the limits of the initial architecture. While building a search assistant for a business management application, I had to migrate the whole system from Genkit to Google ADK. This field report explains why I switched, how the transition went and what I take away from it for your projects.

Tags : Google ADK, Genkit, Firebase, Firestore

Picking a generative AI framework at the start of a project is often a bet on the future. When you build a business assistant, speed comes first: ship a first prototype that works, plug it into the database and check that users actually rely on it. Then the use cases get harder, and the initial architecture starts to crack.

That is what happened to me while building a search assistant for a business management application. I started with Genkit and ended up migrating the whole system to Google ADK (Agent Development Kit). Here is why I switched, how the transition went and what I take away from it for your own projects.

Project context

The starting point

On paper, the goal was simple: give a business management application an assistant that can query business data in natural language. The user asks a question ("Which invoices for customer X are more than 30 days overdue?") and the assistant brings back the right information.

For this first version, I built the agent around a Genkit flow. The choice was obvious:

  • Prototyping is very fast: within minutes, a first pipeline was running locally.
  • Integration into the application is frictionless: Genkit slots into the existing stack as just one more software building block.
  • Flows are explicit: the code stays readable and strongly typed, and you stay in control from end to end.
  • The Developer UI: this local interface lets you test prompts, inspect traces and iterate without redeploying the application.

The agent's initial architecture

Initial architecture: a coordinator agent picks a single one of three search agents and delegates the request to it

What triggered the migration

Everything went well as long as searches stayed predictable. We hit the wall when we met real data in indexed NoSQL databases: for the assistant to answer any question, every combination of fields and filters had to be anticipated, otherwise it stumbled on a missing index or an invalid query.

With a classic Genkit flow, the logic stays deterministic: you code an execution path, plug in a few search tools, and hope the model will manage in one or two calls. As soon as a query had to join several entities, check which indexes were available or rephrase a search after a failure, the flow turned into a plate of spaghetti full of if/else.

I no longer wanted to keep a model on rails. It needed enough autonomy to plan, explore and correct its own trajectory, in other words a real multi-agent system. That is what led me to Google ADK.

Genkit vs Google ADK: the differences seen from the field

Genkit and ADK both come from Google, but they do not start from the same philosophy.

  • Genkit starts from integration into the application. You keep control of the execution flow through flows, middlewares and fine-grained handling of inputs and outputs. The agent is a feature of your code.
  • Google ADK starts from the agent and its orchestration. The application is organized around a hierarchy of specialized agents and sub-agents. The framework is designed for dynamic delegation, routing of complex intents, long-running sessions and evaluation of the model's decision trajectories.
Criterion Genkit Google ADK
Modeling Flows, prompts and tools built directly into the app Agents, sub-agents, orchestration and dynamic delegation
Tool handling Discovered and called by the model within the flow Discovered and used by the agent according to its scope
State management Handled in the flow's code Declared and managed natively at the root agent level (sessions/state)
Observability, debugging & evaluation Genkit Developer UI ADK Web UI (with a view of delegations and trajectories)
Supported languages TypeScript, Go, Dart and Python (preview) Python, TypeScript, Go, Java, Kotlin

Anatomy of the migration

Transition strategy

The assistant's functional scope was modest. Running both systems side by side in production would have cost more than it brought. So I migrated in one go (a controlled big bang on a dedicated branch), validated by a set of test queries covering the edge cases we had met in production.

Target architecture

Target architecture: the coordinator agent orchestrates a search agent, backed by an indexes agent and skills, then a formatting agent produces the result

What carried over easily

Good news: none of the business core ended up in the bin.

  • System prompts: business rules, tone and formatting constraints were 80% preserved, simply split by role.
  • The business logic of the tools: the functions that access the databases and call internal APIs barely changed.
  • Input and output schemas: the Zod types and structures were reused as is.

What needed a real redesign

Moving from a single flow to an ADK architecture still forced me to rethink several things:

  1. Splitting responsibilities: instead of "super-prompts" describing the agent's behavior in every possible case, I split some agents into several specialized agents. Their prompts are less detailed, and they get finer-grained and more varied tools (vector search, field search, in-memory filtering…).
  2. Context, memory and guardrails: in Genkit, I passed the history and state variables by hand from one step to the next. With ADK, I had to rely on the session state shared between the parent agent and its sub-agents, and set strict guardrails so that agents would not loop forever on a fruitless search.
  3. Integration with the UI: the UI calls the agent through a Cloud Run function. To keep that interface without touching the UI code, I wrapped the agent's execution in a runner. The hard part was capturing the output of the last orchestrated agent and turning it into the runner's output. Hence the addition of an agent dedicated to output formatting.

Here is what this runner looks like:

import { Runner, InMemorySessionService } from '@google/adk';
import { z } from 'zod';
...

export async function runCoordinator(
    userPrompt: string,
    options: { userId: string; sessionId?: string }
): Promise<AssistantResponse> {
    const appName = 'my-editor';
    const userId = options.userId;

    try {
        // 1. Resolve or create the ADK session
        let sessionId = options.sessionId;
        if (!sessionId) {
            const session = await sessionService.createSession({
                appName,
                userId,
            });
            sessionId = session.id;
        }

        // 2. Run the runner through its asynchronous event stream
        let rawFinalResponse = '';

        for await (const event of coordinatorRunner.runAsync({
            userId,
            sessionId,
            newMessage: {
                role: 'user',
                parts: [{ text: userPrompt }],
            },
        })) {
            // Capture the final message produced by the output formatting agent
            if (event.content && event.author === outputFormattingAgent.name) {
                const textParts = event.content.parts
                    ?.map((p: any) => p.text || '')
                    .join('') || '';
                if (textParts) {
                    rawFinalResponse = textParts;
                }
            }
        }

        // 3. Strict parsing and validation with AgentOutputSchema
        let parsedOutput: z.infer<typeof AgentOutputSchema>;
        try {
            const sanitizedJson = parseRawResponse(rawFinalResponse);
            parsedOutput = AgentOutputSchema.parse(JSON.parse(sanitizedJson));
        } catch (parseError) {
            console.warn('Could not parse strict structured JSON from ADK output. Raw output:', rawFinalResponse);
            return {
                ...DEFAULT_RESPONSE,
                isRequestValid: true,
                message: rawFinalResponse,
            };
        }

        // 4. Map directly to the contract expected by the frontend client
        return {
            isRequestValid: parsedOutput.custom.isRequestValid ?? true,
            hasError: false,
            actionTaken: parsedOutput.custom.actionTaken,
            foundIds: parsedOutput.custom.foundIds ?? [],
            filterProperties: parsedOutput.custom.filterProperties ?? [],
            orderProperties: parsedOutput.custom.orderProperties ?? [],
            message: parsedOutput.message,
        };
    } catch (error: any) {
        console.error('Error during ADK Runner execution:', error);
        return {
            ...DEFAULT_RESPONSE,
            isRequestValid: false,
            hasError: true,
            error: { details: error?.message || 'An unknown error occurred during agent execution.' },
        };
    }
}

Concrete gains (and friction)

What ADK clearly improved

  • More accurate, more reliable answers: now that analyzing a query is separate from executing it, the assistant no longer gets trapped by complex field combinations. When it sees that a direct query is impossible for lack of an index, it splits the search into two steps or filters on the application side.
  • Readable delegation chains: an ADK system's architecture reads far more naturally than a graph of nested flows. Each sub-agent has a clear job description, which makes maintenance and adding new capabilities simpler.
  • Skills: ADK offers an experimental API to add skills to an agent's tools. Compared with a tool, a skill adds to the agent's execution context when it needs it, without necessarily shipping executable code.

Friction and pitfalls to anticipate

All this comes at a price.

  • The learning curve is real: moving from imperative logic ("do A, then B") to declarative orchestration ("here are your agents and your rules, figure it out") requires a change of mindset.
  • Over-engineering is lurking: for a simple task (summarizing a text, extracting three fields from a PDF), ADK is far too heavy. Piling agents onto a trivial problem only adds complexity.
  • Debugging the model's decisions takes time: when a sub-agent picks the wrong branch or invents a delegation parameter, understanding why the LLM made that choice remains tedious, even with ADK Web.
  • Costs and latency go up: every delegation from the orchestrator to a sub-agent costs one more LLM call and resends part of the context. The token bill climbs fast, and response time grows unless you choose your models carefully: a fast, light model for routing, a more powerful one only for complex reasoning.

Verdict: when to keep Genkit, when to choose ADK?

Having run both approaches in production, I don't think the question is "which tool is best". It is rather: how much autonomy does your product need?

Keep (or choose) Genkit if:

  • You are adding targeted AI features to an existing web or mobile application.
  • Your processing follows deterministic, well-bounded steps (classic RAG, data extraction, structured generation).
  • You want a lightweight full-stack integration, quick to deploy and independent of the model provider.

Move to Google ADK if:

  • You are designing an autonomous multi-agent system whose execution path cannot be hard-coded in advance.
  • You need fine-grained orchestration, with dynamic delegation across several business domains.
  • You are aiming for serious industrialization, with rigorous tracking of sessions and shared state, and systematic evaluation of agent trajectories.

Final word

Don't go all-in on multi-agent from day one. Starting with Genkit let me ship fast and understand my users' real business constraints, which I could never have guessed on paper. Switching to ADK at the moment the deterministic flow hit its limits was the right timing.

The boundaries between the two frameworks are blurring, by the way: Genkit now offers an experimental API to define autonomous agents, which moves closer to ADK's concepts. Enough to start light without closing the door to more autonomy.