# internal AI: A Genkit-Based Internal AI Chat Released as Open Source!

DevFeed: [internal AI: A Genkit-Based Internal AI Chat Released as Open Source!](<https://devfeed.tech/articles/internal-ai-a-genkit-based-internal-ai-chat-released-as-open-source-23891.md>)

Original publisher: [Read original article](<https://medium.com/firebase-developers/internal-ai-a-genkit-based-internal-ai-chat-released-as-open-source-37795896a106?source=rss----8e8b7dc6774d---4>)

Author: tanabee

Published: 2025-02-17T17:14:41Z

Content type: article

Language: en

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

Topics: [Genkit](<https://devfeed.tech/topics/genkit.md>), [AI Chat](<https://devfeed.tech/topics/ai-chat.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Retrieval-Augmented Generation](<https://devfeed.tech/topics/retrieval-augmented-generation.md>), [Generative AI](<https://devfeed.tech/topics/generative-ai.md>)

Tags: [emulator](<https://devfeed.tech/tags/emulator.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [firestore](<https://devfeed.tech/tags/firestore.md>), [function-calling](<https://devfeed.tech/tags/function-calling.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [genkit](<https://devfeed.tech/tags/genkit.md>), [google-cloud-platform](<https://devfeed.tech/tags/google-cloud-platform.md>), [llm](<https://devfeed.tech/tags/llm.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [rag](<https://devfeed.tech/tags/rag.md>), [vertex-ai](<https://devfeed.tech/tags/vertex-ai.md>)

## AI overview

This article introduces internal AI, an open-source Genkit-based internal chat implementation. It describes its usage-based pricing, customizable RAG and function-calling support, Firebase deployment, monitoring, domain restrictions, and local testing with the Firebase Emulator.

## Source excerpt

internal AI: An open-source Genkit-based internal AI chat implementation I have released internal AI, an AI chat solution you can easily and cost-effectively run internally, under an open-source license! Recently, Firebase Genkit reached version 1.0 and became stable for production use. With Genkit, you can quickly build applications that leverage generative AI. However, Genkit itself does not include a user interface. As a use case for an internal AI chat, I decided to make internal AI available as open source. Because internal AI uses a pay-as-you-go model instead of charging per user, you can optimize costs by only paying for the amount of usage. Moreover, thanks to Genkit's extensibility, you can combine RAG (Retrieval-Augmented Generation) and Function Calling to tailor AI features to your organization's needs. This opens the door to more practical AI applications, such as specialized internal information retrieval or automated workflow processes! GitHub - tanabee/internal-ai internal AI -- ChatKey Features Open-source project, allowing customization to fit your organization's needs Abstracted interface with generative AI via Genkit Deployable on Firebase Firebase AI Monitoring for monitoring requests to generative AI Restricting Usage to Specific Domains Usage-based pricing, independent of the number of users Open-source project, allowing customization to fit your organization's needs internal AI is provided as a boilerplate, which you can freely fork and customize according to your organization's requirements. Genkit can be extended in many ways, such as using RAG for accessing internal data or utilizing Google Search for grounding. To keep things simple for initial adoption, this example just communicates with Gemini 2.0. const ai = genkit({ // ... model: gemini20Flash001, }) export const chatFlow = ai.defineFlow( // ... async (messages) => { const response = await ai.generate({ messages }) return response.messages }, ) internal-ai/functions/src/genkit/chatFlow.t