# How to Develop Firebase Genkit Flows

DevFeed: [How to Develop Firebase Genkit Flows](<https://devfeed.tech/articles/how-to-develop-firebase-genkit-flows-23890.md>)

Original publisher: [Read original article](<https://medium.com/firebase-developers/how-to-develop-firebase-genkit-functions-2677b386a227?source=rss----8e8b7dc6774d---4>)

Author: Nozomi Koborinai

Published: 2025-03-15T10:00:54Z

Content type: tutorial

Language: en

Sources: [Firebase Developers - Medium](<https://devfeed.tech/sources/firebase-developers-medium.md>)

Topics: [Genkit](<https://devfeed.tech/topics/genkit.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Firestore](<https://devfeed.tech/topics/firestore.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [emulator-suite](<https://devfeed.tech/tags/emulator-suite.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [firestore](<https://devfeed.tech/tags/firestore.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [genkit](<https://devfeed.tech/tags/genkit.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

This tutorial explains how to test Firebase Genkit Flows locally. It describes the limitations of the Genkit Developer UI when flows need Firebase services such as Firestore or Cloud Storage, and presents the Firebase Local Emulator Suite as a way to simulate those services for local testing.

## Source excerpt

AIHow to Develop Genkit Flows Genkit includes a powerful tool called the Genkit Developer UI that can significantly accelerate the development of Genkit Flows by enabling local testing. However, when integrating with other Firebase products, such as Firestore or Cloud Storage, the Genkit Developer UI may not be sufficient. In this article, I'll walk you through how to enhance your local testing environment by integrating the Firebase Local Emulator Suite to test Genkit Flows more effectively. Genkit Developer UI The Genkit Developer UI is an essential tool that allows you to verify the behavior of Genkit Flows locally before deploying them. (It has a great UI, and it's super exciting to use!!) While the Genkit Developer UI provides a fantastic developer experience, it does have some limitations. The Limitation The challenge comes when you need to integrate other Firebase products. For example, when you create a configuration where Genkit communicates with Firestore, such as the one I discussed in my previous article, "8 Genkit Architectures to Orchestrate Firebase & AI". To clarify this, let's look at two cases. Working with self-contained flowsOK case In this case, the entire processing is self-contained within Genkit, with no need to integrate Firebase products like Firestore or Cloud Storage, so you can run everything locally using the Genkit Developer UI. export const firebaseAuthFlow = onFlow( ai, { name: `firebaseAuthFlow`, outputSchema: z.string(), authPolicy: firebaseAuth((user) => { if (user.firebase?.sign_in_provider !== `anonymous`) { throw new Error(`Only anonymously authenticated users can access this function`) } }), httpsOptions: { secrets: [googleAIapiKey], cors: true, }, }, async () => {} ) Even though this function uses authPolicy with Firebase Authentication, Genkit Developer UI allows you to inject an authentication provider, so local testing is still possible. Working with Flows that require Firebase servicesFurther testing required case In this