PluginBench
Skill
Official
Fail
Audit score 45

developing-genkit-python

firebase/agent-skills

Develop AI-powered applications using Genkit in Python with flows, tools, and multi-model support.

What is developing-genkit-python?

Genkit is a framework for building AI-powered applications in Python. Use it when developing agents, flows, tools, or when troubleshooting Genkit errors, imports, or API issues.

  • Generate text and structured output using multiple AI models
  • Define and execute flows and tools for complex AI workflows
  • Stream responses for real-time AI interactions
  • Integrate embeddings and evaluators for advanced AI features
  • Run local development server with interactive Dev UI
  • Support FastAPI integration for HTTP-based AI services

How to install developing-genkit-python

npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-python
Prerequisites
  • Python 3.14 or later
  • uv package manager (install via https://docs.astral.sh/uv/getting-started/installation/)
  • genkit-cli (install via npm install -g genkit-cli)
  • GEMINI_API_KEY environment variable for Google AI provider
Claude Code
Cursor
Windsurf
Cline

How to use developing-genkit-python

  1. 1.Install dependencies using uv and set up your project with genkit bootstrap
  2. 2.Configure your AI provider (default: Google AI) and set GEMINI_API_KEY
  3. 3.Create a Python file with Genkit initialization and define your main async function
  4. 4.Use ai.generate() for text generation or define flows and tools for complex workflows
  5. 5.Run genkit start to launch the development server and access the Dev UI
  6. 6.Test your flows and tools in the Dev UI before deploying

Use cases

Good for
  • Building chatbots and conversational AI agents
  • Creating multi-step workflows that chain AI calls with tools
  • Generating structured data from unstructured prompts
  • Evaluating AI model outputs with custom evaluators
  • Deploying AI services as HTTP endpoints with FastAPI
Who it's for
  • Python developers building AI applications
  • AI engineers creating agents and workflows
  • Backend developers integrating AI into services
  • Teams evaluating and benchmarking AI models

developing-genkit-python FAQ

What Python version is required?

Python 3.14 or later is required. Use uv for dependency management.

Which AI models can I use?

Google AI (googleai/gemini-flash-latest) is the default. Other providers can be added via plugins. Always use prefixed model IDs.

How do I run my Genkit application?

Use ai.run_main(main()) as your entrypoint, not asyncio.run(). For long-lived servers, use genkit start with the Dev UI.

Where should I look when something breaks?

Always check Common Errors first. The Python SDK changes frequently, so verify imports and APIs against the provided references.

Can I use Genkit with FastAPI?

Yes. Use genkit_fastapi_handler for HTTP integration and see the FastAPI reference for parallel flows and request handling.

Full instructions (SKILL.md)

Source of truth, from firebase/agent-skills.


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 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',
)

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

  1. Default provider: Google AI (GoogleAI()), GEMINI_API_KEY in the environment.
  2. Model IDs: always prefixed, e.g. googleai/gemini-flash-latest (always-on-latest Flash alias; same pattern as other skills).
  3. Entrypoint: ai.run_main(main()) for Genkit-driven apps (not asyncio.run() for long-lived servers started with genkit start — see Common Errors).
  4. After generating code, follow Dev Workflow for genkit start and the Dev UI.
  5. 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: .prompt files and helpers.
  • Evals: Evaluators and datasets.
  • Dev Workflow: genkit start, Dev UI, checklist.