[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69928X4PSQHA6GRE3MFNQQG":3,"skill-same:01M69928X4PSQHA6GRE3MFNQQG":140},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M69928X4PSQHA6GRE3MFNQQG","developing-genkit-python",null,"Provides guidance on developing AI-powered applications using Genkit Python (0.13) and migrating Genkit Python 0.12 projects to 0.13. Use when building AI agents, flows, tools, structured outputs, or FastAPI routes in Python, upgrading from Genkit 0.12, or debugging Genkit imports, config errors, or traces. Don't use for Genkit in JavaScript\u002FTypeScript, Go, or Dart.","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",23830,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"python","developing genkit python","genkit","guidance","typescript","config","imports","javascript","debugging","dart","fastapi","outputs","for","projects","when","use","errors","flows","applications","ai agents","2026-11-10 10:12:30",false,"---\nname: developing-genkit-python\ndescription: >-\n  Provides guidance on developing AI-powered applications using Genkit Python\n  (0.13) and migrating Genkit Python 0.12 projects to 0.13. Use when building AI\n  agents, flows, tools, structured outputs, or FastAPI routes in Python,\n  upgrading from Genkit 0.12, or debugging Genkit imports, config errors, or\n  traces. Don't use for Genkit in JavaScript\u002FTypeScript, Go, or Dart.\nmetadata:\n  version: \"1.0.0\"\n  category: AiAndMachineLearning\n---\n\n# Genkit Python\n\nBuild AI features in Python — generation, structured output, streaming, tools,\nflows, and multi-turn agents — with Genkit Python 0.13.\n\n- **New project?** See [Setup](references\u002Fsetup.md) and\n  [Examples](references\u002Fexamples.md).\n- **Upgrading from 0.12 or fixing broken 0.12 imports\u002Fsignatures?** Read\n  [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md) first.\n\n## Prerequisites\n\n- Python **3.10+** and **`uv`**\n  ([install](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F))\n- Genkit CLI: `npm install -g genkit-cli` if `genkit --version` is missing\n\n## Hello World\n\n```python\nfrom genkit import Genkit\nfrom genkit_google_genai import GoogleAI\n\nai = Genkit(\n    plugins=[GoogleAI()],\n    model=GoogleAI.gemini('gemini-flash-latest'),\n)\n\n\nasync def main() -> None:\n    response = await ai.generate(prompt='Suggest one seasonal pasta dish.')\n    if response.error:\n        raise RuntimeError(response.error.message)\n    print(response.text)\n    # => Lemony tagliatelle with asparagus, sweet peas, and herb ricotta\n\n\nif __name__ == '__main__':\n    ai.run_main(main())\n```\n\n`ai.generate` does not raise when the provider rejects or fails a call\n(`INVALID_ARGUMENT`, `UNAVAILABLE`, rate limits). It returns `response.error`\n(`Failure` with `.status` and `.message`), `finish_reason == 'failed'`, and\nempty text. Problems caught before the call raise: `GoogleAI()` raises\n`ValueError` without `GEMINI_API_KEY`; an unknown model, invalid key, or unknown\nconfig field raises `GenkitError`. See\n[Common Errors](references\u002Fcommon-errors.md).\n\n## Agents (Experimental)\n\nMulti-turn chats with history, typed state, human approval, branching, and\nbackground work live under `genkit.exp` and `genkit.exp.agent`. Start here:\n[Agents](references\u002Fagents.md).\n\n```python\nfrom genkit.exp import Genkit\nfrom genkit.exp.agent import InMemorySessionStore\nfrom genkit_google_genai import GoogleAI\n\nai = Genkit(plugins=[GoogleAI()], model=GoogleAI.gemini('gemini-flash-latest'))\nagent = ai.define_agent(\n    name='concierge',\n    system='You are a concise hotel concierge.',\n    store=InMemorySessionStore(),\n)\n\nchat = agent.chat()\nres = await chat.send('Recommend a quiet dinner spot.')  # AgentResponse\nprint(res.text)\n# => Try Osteria Lume on 5th; it has booths and low music.\n\nturn = chat.send_stream('Is it open past 10pm?')  # AgentTurn\nasync for chunk in turn.stream:\n    if chunk.text:\n        print(chunk.text, end='')\nfinal = await turn.response  # AgentResponse\n```\n\nMore: [sessions](references\u002Fagents-sessions.md) ·\n[HITL](references\u002Fagents-human-in-the-loop.md) ·\n[branching](references\u002Fagents-branching.md) ·\n[background](references\u002Fagents-background.md) ·\n[state](references\u002Fagents-state.md) ·\n[artifacts](references\u002Fagents-artifacts.md) ·\n[custom](references\u002Fagents-custom.md) ·\n[HTTP](references\u002Fagents-http.md)\n\n## Imports\n\nEvery symbol lives in one public module (never import private `_` submodules;\nsee [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md) if a 0.12\nsymbol moved):\n\n- **Core app**: `from genkit import Genkit, FlowContext, ToolContext, Message, Part, Role, Media, Document, MultipartToolResponse, PublicError, GenkitError, Failure, ErrorReason`\n- **Google GenAI & Vertex AI**: `from genkit_google_genai import GoogleAI, VertexAI, GeminiConfig, GeminiImageConfig, GeminiTtsConfig`\n- **Other providers**: `from genkit_vertexai import ModelGarden` ·\n  `from genkit_anthropic import Anthropic, AnthropicConfig` ·\n  `from genkit_openai import OpenAI, OpenAIConfig` ·\n  `from genkit_ollama import Ollama, OllamaConfig` ·\n  `from genkit_amazon_bedrock import Bedrock, BedrockConfig`\n- **Built-in middleware**: `from genkit_middleware import Middleware, Retry, Fallback, ToolApproval, Skills, Filesystem` (plus `from genkit_middleware.exp import Artifacts` for agent sessions)\n- **Writing custom middleware**:\n  `from genkit.middleware import Middleware, MiddlewareContext`\n- **FastAPI & HTTP**:\n  `from genkit_fastapi import serve_flow, genkit_fastapi_handler,\n  handle_genkit_request` · `from genkit_fastapi.exp import serve_agent` ·\n  `from genkit.web import RequestData, to_sse, error_body, error_status`\n- **Agents (experimental)**: `from genkit.exp import Genkit, current_session` · `from genkit.exp.agent import Agent, Session, InMemorySessionStore, FileSessionStore, remote_agent`\n- **Telemetry**: `from genkit_google_cloud import enable_google_cloud_telemetry`\n  · `from genkit.telemetry import configure_instrumentation` ·\n  `from genkit_otel import GenAiInstrumentation`\n- **MCP (Client & Host)**: `from genkit_mcp import define_mcp_client, define_mcp_host, McpClient, McpHost`\n- **Testing & Mocks**: `from genkit.testing import define_echo_model, define_scripted_model, EchoModel, ScriptedModel`\n- **Evaluators (0.13 only; cut from 1.0, additive later)**:\n  `from genkit_evaluators import register_genkit_evaluators` ·\n  `from genkit.evaluator import BaseDataPoint, EvaluatorResponse, Score,\n  ScoreDetails, ScoreStatus`\n\n## Workflow\n\n1. **Agent or flow?** Use `ai.define_agent` (on `genkit.exp.Genkit`, see\n   [Agents](references\u002Fagents.md)) for multi-turn chats, state, or\n   human-in-the-loop approval instead of hand-rolling a message loop inside a\n   flow. Use `@ai.flow()` on `genkit.Genkit` for stateless request\u002Fresponse or\n   streaming pipelines.\n2. **Configure credentials & model refs.** Set **`GEMINI_API_KEY`**. Prefer\n   typed refs (`GoogleAI.gemini('gemini-flash-latest')`) and typed flat configs\n   (`GeminiConfig(...)`) so your type checker validates fields before runtime.\n   Prefixed strings (`'googleai\u002Fgemini-flash-latest'`) also work.\n3. **Enter via `ai.run_main(main())`** for standalone scripts and CLI apps so\n   the process stays up for the Dev UI under `genkit start`. FastAPI apps skip\n   `run_main`; uvicorn keeps the process alive:\n   `genkit start -- uv run uvicorn main:app --reload`.\n4. **Run with [Dev Workflow](references\u002Fdev-workflow.md)** (`genkit start` + Dev\n   UI) and type-check with `pyright`, `mypy`, or `ty`.\n5. **Verify with traces**, not a blind `uv run`. See\n   [Genkit CLI](#genkit-cli-recommended).\n6. **Stuck?** Check [Gotchas](#gotchas),\n   [Common Errors](references\u002Fcommon-errors.md), or\n   [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md).\n\n## Gotchas\n\n- **Agents need `genkit.exp`**: `from genkit.exp import Genkit`. Stable\n  `genkit.Genkit` has no `define_agent`.\n- **Tools are async**: `@ai.tool()` raises `TypeError` on a plain `def`; use\n  `async def`.\n- **Check `response.error`**: provider failures come back on the response, not\n  as exceptions (see [Hello World](#hello-world)).\n- **Gemini thinking levels**: `GeminiConfig(thinking_level='MINIMAL')` fails on\n  `gemini-flash-latest`; use `'LOW'`, `'MEDIUM'`, or `'HIGH'`.\n- **Vertex AI model IDs**: Vertex does not serve `-latest` aliases. Pass a\n  pinned model ID to `VertexAI.gemini(...)`.\n- **Logging**: `genkit.get_logger` is structlog-based.\n  `enable_google_cloud_telemetry()` injects trace context for GCP log-trace\n  correlation.\n- **Cloud telemetry auth**: call `enable_google_cloud_telemetry()` with\n  Application Default Credentials or explicit `credentials=` (service account\n  dict or `Credentials` instance).\n\n## Genkit CLI (recommended)\n\n`genkit start` wraps any Python program that uses Genkit, capturing traces from\nevery action while forwarding stdio cleanly. Running `uv run` directly skips\ntrace capture.\n\n**Primary pattern (persistent server + Dev UI):**\n```bash\ngenkit start -- uv run src\u002Fmain.py\ngenkit start --noui -- uv run src\u002Fmain.py   # persistent runtime without opening the Dev UI\n```\n`genkit start` runs until stopped with Ctrl+C (even with `--noui`). Do **not**\nrun `genkit start` as a blocking step in automated\u002Fnon-interactive scripts; use\n`flow:run` instead.\n\n**Non-interactive use (agents\u002FCI):** pass `--non-interactive` before `--` so the\nCLI never blocks on prompts:\n```bash\ngenkit start --non-interactive -- uv run src\u002Fmain.py\n```\n\n**One-shot flow execution (`flow:run`):** spins up the runtime, invokes one\n`@ai.flow()` by name, prints a `Trace ID`, and exits:\n```bash\ngenkit flow:run myFlow '{\"data\": \"input\"}' -- uv run src\u002Fmain.py\n```\nNote: `flow:run` invokes flows (`@ai.flow()`), not agents (`ai.define_agent`).\nWrap a single agent turn in a helper flow to exercise it via `flow:run` (see\n[Agents](references\u002Fagents.md)).\n\n**Inspecting traces:**\n```bash\ngenkit trace:list                        # list recent trace IDs\ngenkit trace:get \u003CtraceId>               # human-readable trace inspection\ngenkit trace:get \u003CtraceId> --format json # machine-readable JSON for jq \u002F scripts\n```\nAlways pass `--format json` when piping into `jq` or other parsers.\n\nSee [Dev Workflow](references\u002Fdev-workflow.md) for the full pre-run checklist\nand Dev UI walkthrough.\n\n## References\n\n- [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md):\n  Deterministic 0.12 -> 0.13 renames, config flattening, `PublicError`, and\n  `exp` moves.\n- [Examples](references\u002Fexamples.md): Structured output, streaming, media parts,\n  flows, tools, interrupts, cancellation, embeddings.\n- [Setup](references\u002Fsetup.md): Project bootstrap with `uv`, version alignment,\n  and provider plugins.\n- [Common Errors](references\u002Fcommon-errors.md): Fast fixes for 0.13 validation\n  errors, HTTP 500 redaction, streaming, and sessions.\n- [FastAPI](references\u002Ffastapi.md): `serve_flow`, `serve_agent`, `PublicError`,\n  SSE streaming, and parallel flows.\n- [Dotprompt](references\u002Fdotprompt.md): `.prompt` files, schema validation,\n  variants, partials, and helpers.\n- [Evals](references\u002Fevals.md): 0.13 evaluator syntax (deprecated; removed in\n  1.0).\n- [Dev Workflow](references\u002Fdev-workflow.md): `genkit start`, Dev UI, and trace\n  verification checklist.\n- [Agents (Experimental)](references\u002Fagents.md): Multi-turn stateful agents\n  (`genkit.exp`).\n","# Genkit Python\n\nBuild AI features in Python — generation, structured output, streaming, tools,\nflows, and multi-turn agents — with Genkit Python 0.13.\n\n- **New project?** See [Setup](references\u002Fsetup.md) and\n  [Examples](references\u002Fexamples.md).\n- **Upgrading from 0.12 or fixing broken 0.12 imports\u002Fsignatures?** Read\n  [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md) first.\n\n## Prerequisites\n\n- Python **3.10+** and **`uv`**\n  ([install](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F))\n- Genkit CLI: `npm install -g genkit-cli` if `genkit --version` is missing\n\n## Hello World\n\n```python\nfrom genkit import Genkit\nfrom genkit_google_genai import GoogleAI\n\nai = Genkit(\n    plugins=[GoogleAI()],\n    model=GoogleAI.gemini('gemini-flash-latest'),\n)\n\n\nasync def main() -> None:\n    response = await ai.generate(prompt='Suggest one seasonal pasta dish.')\n    if response.error:\n        raise RuntimeError(response.error.message)\n    print(response.text)\n    # => Lemony tagliatelle with asparagus, sweet peas, and herb ricotta\n\n\nif __name__ == '__main__':\n    ai.run_main(main())\n```\n\n`ai.generate` does not raise when the provider rejects or fails a call\n(`INVALID_ARGUMENT`, `UNAVAILABLE`, rate limits). It returns `response.error`\n(`Failure` with `.status` and `.message`), `finish_reason == 'failed'`, and\nempty text. Problems caught before the call raise: `GoogleAI()` raises\n`ValueError` without `GEMINI_API_KEY`; an unknown model, invalid key, or unknown\nconfig field raises `GenkitError`. See\n[Common Errors](references\u002Fcommon-errors.md).\n\n## Agents (Experimental)\n\nMulti-turn chats with history, typed state, human approval, branching, and\nbackground work live under `genkit.exp` and `genkit.exp.agent`. Start here:\n[Agents](references\u002Fagents.md).\n\n```python\nfrom genkit.exp import Genkit\nfrom genkit.exp.agent import InMemorySessionStore\nfrom genkit_google_genai import GoogleAI\n\nai = Genkit(plugins=[GoogleAI()], model=GoogleAI.gemini('gemini-flash-latest'))\nagent = ai.define_agent(\n    name='concierge',\n    system='You are a concise hotel concierge.',\n    store=InMemorySessionStore(),\n)\n\nchat = agent.chat()\nres = await chat.send('Recommend a quiet dinner spot.')  # AgentResponse\nprint(res.text)\n# => Try Osteria Lume on 5th; it has booths and low music.\n\nturn = chat.send_stream('Is it open past 10pm?')  # AgentTurn\nasync for chunk in turn.stream:\n    if chunk.text:\n        print(chunk.text, end='')\nfinal = await turn.response  # AgentResponse\n```\n\nMore: [sessions](references\u002Fagents-sessions.md) ·\n[HITL](references\u002Fagents-human-in-the-loop.md) ·\n[branching](references\u002Fagents-branching.md) ·\n[background](references\u002Fagents-background.md) ·\n[state](references\u002Fagents-state.md) ·\n[artifacts](references\u002Fagents-artifacts.md) ·\n[custom](references\u002Fagents-custom.md) ·\n[HTTP](references\u002Fagents-http.md)\n\n## Imports\n\nEvery symbol lives in one public module (never import private `_` submodules;\nsee [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md) if a 0.12\nsymbol moved):\n\n- **Core app**: `from genkit import Genkit, FlowContext, ToolContext, Message, Part, Role, Media, Document, MultipartToolResponse, PublicError, GenkitError, Failure, ErrorReason`\n- **Google GenAI & Vertex AI**: `from genkit_google_genai import GoogleAI, VertexAI, GeminiConfig, GeminiImageConfig, GeminiTtsConfig`\n- **Other providers**: `from genkit_vertexai import ModelGarden` ·\n  `from genkit_anthropic import Anthropic, AnthropicConfig` ·\n  `from genkit_openai import OpenAI, OpenAIConfig` ·\n  `from genkit_ollama import Ollama, OllamaConfig` ·\n  `from genkit_amazon_bedrock import Bedrock, BedrockConfig`\n- **Built-in middleware**: `from genkit_middleware import Middleware, Retry, Fallback, ToolApproval, Skills, Filesystem` (plus `from genkit_middleware.exp import Artifacts` for agent sessions)\n- **Writing custom middleware**:\n  `from genkit.middleware import Middleware, MiddlewareContext`\n- **FastAPI & HTTP**:\n  `from genkit_fastapi import serve_flow, genkit_fastapi_handler,\n  handle_genkit_request` · `from genkit_fastapi.exp import serve_agent` ·\n  `from genkit.web import RequestData, to_sse, error_body, error_status`\n- **Agents (experimental)**: `from genkit.exp import Genkit, current_session` · `from genkit.exp.agent import Agent, Session, InMemorySessionStore, FileSessionStore, remote_agent`\n- **Telemetry**: `from genkit_google_cloud import enable_google_cloud_telemetry`\n  · `from genkit.telemetry import configure_instrumentation` ·\n  `from genkit_otel import GenAiInstrumentation`\n- **MCP (Client & Host)**: `from genkit_mcp import define_mcp_client, define_mcp_host, McpClient, McpHost`\n- **Testing & Mocks**: `from genkit.testing import define_echo_model, define_scripted_model, EchoModel, ScriptedModel`\n- **Evaluators (0.13 only; cut from 1.0, additive later)**:\n  `from genkit_evaluators import register_genkit_evaluators` ·\n  `from genkit.evaluator import BaseDataPoint, EvaluatorResponse, Score,\n  ScoreDetails, ScoreStatus`\n\n## Workflow\n\n1. **Agent or flow?** Use `ai.define_agent` (on `genkit.exp.Genkit`, see\n   [Agents](references\u002Fagents.md)) for multi-turn chats, state, or\n   human-in-the-loop approval instead of hand-rolling a message loop inside a\n   flow. Use `@ai.flow()` on `genkit.Genkit` for stateless request\u002Fresponse or\n   streaming pipelines.\n2. **Configure credentials & model refs.** Set **`GEMINI_API_KEY`**. Prefer\n   typed refs (`GoogleAI.gemini('gemini-flash-latest')`) and typed flat configs\n   (`GeminiConfig(...)`) so your type checker validates fields before runtime.\n   Prefixed strings (`'googleai\u002Fgemini-flash-latest'`) also work.\n3. **Enter via `ai.run_main(main())`** for standalone scripts and CLI apps so\n   the process stays up for the Dev UI under `genkit start`. FastAPI apps skip\n   `run_main`; uvicorn keeps the process alive:\n   `genkit start -- uv run uvicorn main:app --reload`.\n4. **Run with [Dev Workflow](references\u002Fdev-workflow.md)** (`genkit start` + Dev\n   UI) and type-check with `pyright`, `mypy`, or `ty`.\n5. **Verify with traces**, not a blind `uv run`. See\n   [Genkit CLI](#genkit-cli-recommended).\n6. **Stuck?** Check [Gotchas](#gotchas),\n   [Common Errors](references\u002Fcommon-errors.md), or\n   [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md).\n\n## Gotchas\n\n- **Agents need `genkit.exp`**: `from genkit.exp import Genkit`. Stable\n  `genkit.Genkit` has no `define_agent`.\n- **Tools are async**: `@ai.tool()` raises `TypeError` on a plain `def`; use\n  `async def`.\n- **Check `response.error`**: provider failures come back on the response, not\n  as exceptions (see [Hello World](#hello-world)).\n- **Gemini thinking levels**: `GeminiConfig(thinking_level='MINIMAL')` fails on\n  `gemini-flash-latest`; use `'LOW'`, `'MEDIUM'`, or `'HIGH'`.\n- **Vertex AI model IDs**: Vertex does not serve `-latest` aliases. Pass a\n  pinned model ID to `VertexAI.gemini(...)`.\n- **Logging**: `genkit.get_logger` is structlog-based.\n  `enable_google_cloud_telemetry()` injects trace context for GCP log-trace\n  correlation.\n- **Cloud telemetry auth**: call `enable_google_cloud_telemetry()` with\n  Application Default Credentials or explicit `credentials=` (service account\n  dict or `Credentials` instance).\n\n## Genkit CLI (recommended)\n\n`genkit start` wraps any Python program that uses Genkit, capturing traces from\nevery action while forwarding stdio cleanly. Running `uv run` directly skips\ntrace capture.\n\n**Primary pattern (persistent server + Dev UI):**\n```bash\ngenkit start -- uv run src\u002Fmain.py\ngenkit start --noui -- uv run src\u002Fmain.py   # persistent runtime without opening the Dev UI\n```\n`genkit start` runs until stopped with Ctrl+C (even with `--noui`). Do **not**\nrun `genkit start` as a blocking step in automated\u002Fnon-interactive scripts; use\n`flow:run` instead.\n\n**Non-interactive use (agents\u002FCI):** pass `--non-interactive` before `--` so the\nCLI never blocks on prompts:\n```bash\ngenkit start --non-interactive -- uv run src\u002Fmain.py\n```\n\n**One-shot flow execution (`flow:run`):** spins up the runtime, invokes one\n`@ai.flow()` by name, prints a `Trace ID`, and exits:\n```bash\ngenkit flow:run myFlow '{\"data\": \"input\"}' -- uv run src\u002Fmain.py\n```\nNote: `flow:run` invokes flows (`@ai.flow()`), not agents (`ai.define_agent`).\nWrap a single agent turn in a helper flow to exercise it via `flow:run` (see\n[Agents](references\u002Fagents.md)).\n\n**Inspecting traces:**\n```bash\ngenkit trace:list                        # list recent trace IDs\ngenkit trace:get \u003CtraceId>               # human-readable trace inspection\ngenkit trace:get \u003CtraceId> --format json # machine-readable JSON for jq \u002F scripts\n```\nAlways pass `--format json` when piping into `jq` or other parsers.\n\nSee [Dev Workflow](references\u002Fdev-workflow.md) for the full pre-run checklist\nand Dev UI walkthrough.\n\n## References\n\n- [Migrating from 0.12 to 0.13](references\u002Fmigrating-from-0.12.md):\n  Deterministic 0.12 -> 0.13 renames, config flattening, `PublicError`, and\n  `exp` moves.\n- [Examples](references\u002Fexamples.md): Structured output, streaming, media parts,\n  flows, tools, interrupts, cancellation, embeddings.\n- [Setup](references\u002Fsetup.md): Project bootstrap with `uv`, version alignment,\n  and provider plugins.\n- [Common Errors](references\u002Fcommon-errors.md): Fast fixes for 0.13 validation\n  errors, HTTP 500 redaction, streaming, and sessions.\n- [FastAPI](references\u002Ffastapi.md): `serve_flow`, `serve_agent`, `PublicError`,\n  SSE streaming, and parallel flows.\n- [Dotprompt](references\u002Fdotprompt.md): `.prompt` files, schema validation,\n  variants, partials, and helpers.\n- [Evals](references\u002Fevals.md): 0.13 evaluator syntax (deprecated; removed in\n  1.0).\n- [Dev Workflow](references\u002Fdev-workflow.md): `genkit start`, Dev UI, and trace\n  verification checklist.\n- [Agents (Experimental)](references\u002Fagents.md): Multi-turn stateful agents\n  (`genkit.exp`).\n",{"name":5,"metadata":44,"description":7},{"version":45,"category":46},"1.0.0","AiAndMachineLearning","main","64d010629e61e4a7d59fc21e042362f370b5888b","skills\u002Fcloud\u002Fdeveloping-genkit-python",1991,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-11 03:08:50",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add google\u002Fskills --skill developing-genkit-python",{"tool":62,"command":63},"bunx","bunx skills add google\u002Fskills --skill developing-genkit-python",{"tool":65,"command":66},"pnpm","pnpm dlx skills add google\u002Fskills --skill developing-genkit-python","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002FSKILL.md",true,[70,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fagents-artifacts.md","REFERENCE","参考文档",4089,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-artifacts.md",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fagents-background.md",6465,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-background.md",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fagents-branching.md",3808,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-branching.md",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fagents-custom.md",7780,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-custom.md",{"path":89,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fagents-http.md",9056,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-http.md",{"path":93,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fagents-human-in-the-loop.md",7128,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-human-in-the-loop.md",{"path":97,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fagents-sessions.md",4281,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-sessions.md",{"path":101,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fagents-state.md",6322,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents-state.md",{"path":105,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Fagents.md",10853,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fagents.md",{"path":109,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fcommon-errors.md",15594,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fcommon-errors.md",{"path":113,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fdev-workflow.md",6153,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fdev-workflow.md",{"path":117,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fdotprompt.md",6745,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fdotprompt.md",{"path":121,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Fevals.md",7447,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fevals.md",{"path":125,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fexamples.md",11378,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fexamples.md",{"path":129,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Ffastapi.md",11530,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Ffastapi.md",{"path":133,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Fmigrating-from-0.12.md",26811,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fmigrating-from-0.12.md",{"path":137,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Fsetup.md",3762,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fdeveloping-genkit-python\u002Freferences\u002Fsetup.md",[141,178,208,237,264,288],{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":155,"publishedAt":39},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[147,152],{"categoryNo":148,"categoryName":149,"taxonomyType":150,"taxonomyTypeDesc":151},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":153,"categoryName":154,"taxonomyType":150,"taxonomyTypeDesc":151},"01JBSEEDCAT000000000000010","后端与接口",[9,156,157,158,159,160,161,162,163,164,165,166,19,167,168,169,170,171,172,173,174,175,176,177],"sign in with google web","sign","with","web","android","go","security","google workspace","google cloud","implement","policy","implementing","react","iam","permissions","buttons","secure","manager","identity","architectures","domain","runtimes",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":193,"publishedAt":39},"01M6998PHPDCAD684VW5WRG83D","dpop-adoption","Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com\u002Ftoken. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM \u002F service account authentication.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fdpop-adoption\u002FSKILL.md",[184,185,188],{"categoryNo":153,"categoryName":154,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":186,"categoryName":187,"taxonomyType":150,"taxonomyTypeDesc":151},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":189,"categoryName":190,"taxonomyType":191,"taxonomyTypeDesc":192},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[194,195,9,164,196,197,198,36,199,200,169,201,202,203,204,205,206,174,177,207,33],"dpop adoption","adoption","es6","retry","authentication","challenge","code","browser","loops","at","node","token","pair","platform",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":220,"publishedAt":39},"01M6998M72TC73EEAQH4XC7EXW","retrieving-developer-knowledge","Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI\u002FGemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fretrieving-developer-knowledge\u002FSKILL.md",[214,215,218,219],{"categoryNo":153,"categoryName":154,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":216,"categoryName":217,"taxonomyType":150,"taxonomyTypeDesc":151},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":186,"categoryName":187,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":189,"categoryName":190,"taxonomyType":191,"taxonomyTypeDesc":192},[221,222,223,224,164,225,226,227,228,229,230,231,232,33,233,234,235,169,236,170],"retrieving developer knowledge","knowledge","developer","MCP","mcp server","official","developer documentation","get","search","local","choice","documents","query","api","across","documentation",{"skillNo":238,"name":239,"nameZh":6,"description":240,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":241,"categories":242,"keywords":243,"publishedAt":39},"01M6998J2CZEXS9BES9S3WWFKC","migrate-to-rust","Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",[],[244,245,246,247,248,249,250,251,19,252,253,254,255,256,257,230,258,259,260,33,261,262,235,263],"migrate to rust","rust","migrate","github","memory","performance","directory","safe","ports","llvm","soa","cycle","porting","fix","arrays","infographic","high-performance","URL","architecture","unrelated",{"skillNo":265,"name":266,"nameZh":6,"description":267,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":268,"categories":269,"keywords":273,"publishedAt":39},"01M6998GCC3K29WZ82KXMB9E02","finding-google-skills","Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Ffinding-google-skills\u002FSKILL.md",[270,271,272],{"categoryNo":153,"categoryName":154,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":186,"categoryName":187,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":189,"categoryName":190,"taxonomyType":191,"taxonomyTypeDesc":192},[9,274,275,276,277,207,278,279,280,281,282,198,283,284,285,231,34,286,33,287,234],"finding google skills","storage","as","messaging","model","trade-offs","provider","answer","fit","catalog","up","decision","database","candidate",{"skillNo":289,"name":290,"nameZh":6,"description":291,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":292,"categories":293,"keywords":296,"publishedAt":39},"01M6998DWNHTH0BS6W1CY8ZXMP","workload-manager-basics","Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fworkload-manager-basics\u002FSKILL.md",[294,295],{"categoryNo":153,"categoryName":154,"taxonomyType":150,"taxonomyTypeDesc":151},{"categoryNo":186,"categoryName":187,"taxonomyType":150,"taxonomyTypeDesc":151},[297,298,173,299,9,224,300,164,225,301,302,303,304,33,305,234,169,306,307,308,309],"workload manager basics","workload","basics","cli","review","vpc","resources","inspect","you","create","libraries","server","run"]