后端与数据库

developing-genkit-python

firebase/agent-skills

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.

  • 3.4万 次安装
  • 491 星标
  • 收录于

安装命令

npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-python

要点

Build AI applications in Python using Genkit with flows, tools, and multiple model providers.

  • Requires Python 3.14+, uv package manager, and the Genkit CLI; Google AI is the default provider with GEMINI_API_KEY environment 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 .prompt file 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+, uv for deps (install).
  • CLI: genkit --version — install via npm install -g genkit-cli if 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',
)