developing-genkit-python
Originally fromgenkit-ai/skills
Installation
Summary
Build AI applications in Python using Genkit with flows, tools, and multiple model providers.
- Requires Python 3.14+,
uvpackage manager, and the Genkit CLI; Google AI is the default provider withGEMINI_API_KEYenvironment variable - Supports structured output, streaming, flows, tools, embeddings, and evaluators through a unified async API
- Includes FastAPI integration for HTTP endpoints and parallel flow execution, plus
.promptfile support for prompt templates - Use
ai.run_main()as the entrypoint for Genkit-driven apps; always verify imports and APIs against references due to frequent SDK changes
SKILL.md
Genkit Python
Prerequisites
- Runtime: Python 3.14+,
uvfor deps (install). - CLI:
genkit --version— install vianpm install -g genkit-cliif missing.
New projects: Setup (bootstrap + env). Patterns and code samples: Examples.
Hello World
from genkit import Genkit
from genkit.plugins.google_genai import GoogleAI
ai = Genkit(
plugins=[GoogleAI()],
model='googleai/gemini-flash-latest',
)