# Build Genkit Python Apps

Python developers need reliable Genkit guidance because the SDK changes quickly. This skill provides current patterns for setup, flows, tools, Dotprompt, FastAPI, evals, and troubleshooting.

## Install

```bash
npx skillstore add firebase/developing-genkit-python
```

## Metadata

- Status: approved
- Slug: firebase-developing-genkit-python
- Skillstore revision: r1
- Version status: missing
- Tree hash: 4b01defb9d37e1036a8cd5561106fc892dc79eb35bba9ffa1dc486d4c469a2f8
- Author: firebase
- GitHub username: firebase
- License: MIT
- Repository: https://github.com/firebase/agent-skills/tree/main/skills/developing-genkit-python/
- Ref: 30c73eac2afe762f6aa9c4553158769369d47351
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: blocked
- Manual install advisory: allowed\_with\_warning
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: network, filesystem, env\_access, external\_commands
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/firebase-developing-genkit-python
- Manifest: https://skillstore.pages.dev/api/skills/firebase-developing-genkit-python/manifest

## Capabilities

- Explains Genkit Python setup with uv, virtual environments, plugins, and provider configuration.
- Provides examples for generation, structured output, streaming, flows, tools, and embeddings.
- Guides FastAPI integration with Genkit handlers, SSE streaming, and route decorator order.
- Documents Dotprompt files, prompt variants, helpers, partials, and rendering for evals.
- Covers Genkit evaluators, datasets, CLI eval runs, and common SDK error fixes.

## Use Cases

- Start a Genkit Python Project: Create a new project with uv, install Genkit packages, configure a provider, and run the Dev UI.
- Serve AI Flows with FastAPI: Expose Genkit flows through FastAPI routes, stream responses, and test local endpoints.
- Improve AI App Quality: Organize prompts, add evaluators, use structured outputs, and diagnose common Genkit errors.

## Prompt Templates

### Create a Starter App

```
Create a Genkit Python starter app with Google AI. Include setup steps, flow structure, and Dev UI testing instructions.
```

### Add a Tool

```
Add a Pydantic-backed tool to my Genkit flow. Explain the schema, decorator, and common Gemini parameter errors.
```

### Serve a Streaming Flow

```
Design a streaming FastAPI endpoint for this Genkit flow. Include decorator order, chunk behavior, and local verification steps.
```

### Review Production Readiness

```
Review this Genkit Python project for API mismatches, prompt organization, eval coverage, and production readiness. Prioritize actionable fixes.
```

## Limitations

- Requires a working Python environment and a provider API key supplied by the developer.
- Examples mainly assume Google AI and must be adapted for other providers.
- Cannot verify live SDK changes unless the agent checks upstream documentation.
- Does not deploy infrastructure or secure production endpoints automatically.

## Best Practices

- Verify imports and API names against the included references or upstream documentation.
- Keep API keys out of source control, shell profiles, screenshots, and shared logs.
- Test flows in the Dev UI before adding FastAPI serving or eval automation.

## Anti Patterns

- Using internal Genkit modules instead of public package paths.
- Defining tool parameters as bare scalar values instead of Pydantic models.
- Binding local development servers to all interfaces without a clear need.

## Security Audit

- Audited at: 2026-07-05T15:56:30.819\+00:00
- Summary: Most static alerts are documentation false positives from markdown backticks, localhost URLs, and placeholder GEMINI\_API\_KEY usage. Confirmed issues are persistent shell-profile secret storage, curl-to-shell installation advice, and a FastAPI example that binds to all interfaces.

## Stats

- Views: 33
- Downloads: 6
- Favorites: 0
- Popularity score: 0
