<< All versions
Skill v1.0.2
Automated scan100/100firebase/agent-skills/developing-genkit-python
1 files
──Details
PublishedApril 26, 2026 at 10:53 AM
Content Hashsha256:9617212ae589236e...
Git SHA30bcb303e56f
Bump Typepatch
──Files
Files (1 file, 2.4 KB)
SKILL.md2.4 KBactive
SKILL.md · 58 lines · 2.4 KB
version: "1.0.2" name: developing-genkit-python description: Develop AI-powered applications using Genkit in Python. Use when the user asks about Genkit, AI agents, flows, or tools in Python, or when encountering Genkit errors, import issues, or API problems. metadata: genkit-managed: true
Genkit Python
Prerequisites
- Runtime: Python 3.14+, `uv` for deps (install).
- CLI:
genkit --version— install vianpm install -g genkit-cliif missing.
New projects: Setup (bootstrap + env). Patterns and code samples: Examples.
Hello World
python
from genkit import Genkitfrom genkit.plugins.google_genai import GoogleAIai = Genkit(plugins=[GoogleAI()],model='googleai/gemini-flash-latest',)async def main():response = await ai.generate(prompt='Tell me a joke about Python.')print(response.text)if __name__ == '__main__':ai.run_main(main())
Critical: Do Not Trust Internal Knowledge
The Python SDK changes often — verify imports and APIs against the references here or upstream docs. On any error, read Common Errors first.
Development Workflow
- Default provider: Google AI (
GoogleAI()), `GEMINI_API_KEY` in the environment. - Model IDs: always prefixed, e.g. `googleai/gemini-flash-latest` (always-on-latest Flash alias; same pattern as other skills).
- Entrypoint: `ai.run_main(main())` for Genkit-driven apps (not
asyncio.run()for long-lived servers started withgenkit start— see Common Errors). - After generating code, follow Dev Workflow for
genkit startand the Dev UI. - On errors: step 1 is always Common Errors.
References
- Examples: Structured output, streaming, flows, tools, embeddings.
- Setup: New project bootstrap and plugins.
- Common Errors: Read first when something breaks.
- FastAPI: HTTP,
genkit_fastapi_handler, parallel flows. - Dotprompt:
.promptfiles and helpers. - Evals: Evaluators and datasets.
- Dev Workflow:
genkit start, Dev UI, checklist.