{"id":"dadd05b0-74fa-4d3c-b514-5e1e49607873","shortId":"tW3Ywr","kind":"skill","title":"developing-genkit-python","tagline":"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.","description":"# Genkit Python\n\n## Prerequisites\n\n- **Runtime**: Python **3.14+**, **`uv`** for deps ([install](https://docs.astral.sh/uv/getting-started/installation/)).\n- **CLI**: `genkit --version` — install via `npm install -g genkit-cli` if missing.\n\n**New projects:** [Setup](references/setup.md) (bootstrap + env). **Patterns and code samples:** [Examples](references/examples.md).\n\n## Hello World\n\n```python\nfrom genkit import Genkit\nfrom genkit.plugins.google_genai import GoogleAI\n\nai = Genkit(\n    plugins=[GoogleAI()],\n    model='googleai/gemini-flash-latest',\n)\n\nasync def main():\n    response = await ai.generate(prompt='Tell me a joke about Python.')\n    print(response.text)\n\nif __name__ == '__main__':\n    ai.run_main(main())\n```\n\n## Critical: Do Not Trust Internal Knowledge\n\nThe Python SDK changes often — verify imports and APIs against the references here or upstream docs. On **any** error, read [Common Errors](references/common-errors.md) first.\n\n## Development Workflow\n\n1. Default provider: **Google AI** (`GoogleAI()`), **`GEMINI_API_KEY`** in the environment.\n2. Model IDs: always prefixed, e.g. **`googleai/gemini-flash-latest`** (always-on-latest Flash alias; same pattern as other skills).\n3. Entrypoint: **`ai.run_main(main())`** for Genkit-driven apps (not `asyncio.run()` for long-lived servers started with `genkit start` — see [Common Errors](references/common-errors.md)).\n4. After generating code, follow [Dev Workflow](references/dev-workflow.md) for `genkit start` and the Dev UI.\n5. On errors: step 1 is always [Common Errors](references/common-errors.md).\n\n## References\n\n- [Examples](references/examples.md): Structured output, streaming, flows, tools, embeddings.\n- [Setup](references/setup.md): New project bootstrap and plugins.\n- [Common Errors](references/common-errors.md): Read first when something breaks.\n- [FastAPI](references/fastapi.md): HTTP, `genkit_fastapi_handler`, parallel flows.\n- [Dotprompt](references/dotprompt.md): `.prompt` files and helpers.\n- [Evals](references/evals.md): Evaluators and datasets.\n- [Dev Workflow](references/dev-workflow.md): `genkit start`, Dev UI, checklist.","tags":["developing","genkit","python","skills","genkit-ai","agent-skills"],"capabilities":["skill","source-genkit-ai","skill-developing-genkit-python","topic-agent-skills"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/genkit-ai/skills/developing-genkit-python","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add genkit-ai/skills","source_repo":"https://github.com/genkit-ai/skills","install_from":"skills.sh"}},"qualityScore":"0.456","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 12 github stars · SKILL.md body (2,132 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:07:19.372Z","embedding":null,"createdAt":"2026-04-23T13:03:28.737Z","updatedAt":"2026-05-18T19:07:19.372Z","lastSeenAt":"2026-05-18T19:07:19.372Z","tsv":"'/uv/getting-started/installation/)).':50 '1':147,221 '2':159 '3':177 '3.14':43 '4':202 '5':217 'agent':22 'ai':7,21,88,151 'ai-pow':6 'ai.generate':99 'ai.run':112,179 'alia':171 'alway':162,167,223 'always-on-latest':166 'api':36,129,154 'app':186 'applic':9 'ask':18 'async':94 'asyncio.run':188 'await':98 'bootstrap':68,240 'break':250 'chang':124 'checklist':277 'cli':51,61 'code':72,205 'common':141,199,224,243 'critic':115 'dataset':269 'def':95 'default':148 'dep':46 'dev':207,215,270,275 'develop':2,5,145 'developing-genkit-python':1 'doc':136 'docs.astral.sh':49 'docs.astral.sh/uv/getting-started/installation/)).':48 'dotprompt':259 'driven':185 'e.g':164 'embed':235 'encount':30 'entrypoint':178 'env':69 'environ':158 'error':32,139,142,200,219,225,244 'eval':265 'evalu':267 'exampl':74,228 'fastapi':251,255 'file':262 'first':144,247 'flash':170 'flow':23,233,258 'follow':206 'g':58 'gemini':153 'genai':85 'generat':204 'genkit':3,11,20,31,38,52,60,80,82,89,184,196,211,254,273 'genkit-c':59 'genkit-driven':183 'genkit.plugins.google':84 'googl':150 'googleai':87,91,152 'googleai/gemini-flash-latest':93,165 'handler':256 'hello':76 'helper':264 'http':253 'id':161 'import':33,81,86,127 'instal':47,54,57 'intern':119 'issu':34 'joke':104 'key':155 'knowledg':120 'latest':169 'live':192 'long':191 'long-liv':190 'main':96,111,113,114,180,181 'miss':63 'model':92,160 'name':110 'new':64,238 'npm':56 'often':125 'output':231 'parallel':257 'pattern':70,173 'plugin':90,242 'power':8 'prefix':163 'prerequisit':40 'print':107 'problem':37 'project':65,239 'prompt':100,261 'provid':149 'python':4,13,27,39,42,78,106,122 'read':140,246 'refer':132,227 'references/common-errors.md':143,201,226,245 'references/dev-workflow.md':209,272 'references/dotprompt.md':260 'references/evals.md':266 'references/examples.md':75,229 'references/fastapi.md':252 'references/setup.md':67,237 'respons':97 'response.text':108 'runtim':41 'sampl':73 'sdk':123 'see':198 'server':193 'setup':66,236 'skill':176 'skill-developing-genkit-python' 'someth':249 'source-genkit-ai' 'start':194,197,212,274 'step':220 'stream':232 'structur':230 'tell':101 'tool':25,234 'topic-agent-skills' 'trust':118 'ui':216,276 'upstream':135 'use':10,14 'user':17 'uv':44 'verifi':126 'version':53 'via':55 'workflow':146,208,271 'world':77","prices":[{"id":"de21e231-792e-4dfc-b5c1-93c20625a6d7","listingId":"dadd05b0-74fa-4d3c-b514-5e1e49607873","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"genkit-ai","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-23T13:03:28.737Z"}],"sources":[{"listingId":"dadd05b0-74fa-4d3c-b514-5e1e49607873","source":"github","sourceId":"genkit-ai/skills/developing-genkit-python","sourceUrl":"https://github.com/genkit-ai/skills/tree/main/skills/developing-genkit-python","isPrimary":false,"firstSeenAt":"2026-04-23T13:03:28.737Z","lastSeenAt":"2026-05-18T19:07:19.372Z"}],"details":{"listingId":"dadd05b0-74fa-4d3c-b514-5e1e49607873","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"genkit-ai","slug":"developing-genkit-python","github":{"repo":"genkit-ai/skills","stars":12,"topics":["agent-skills","ai"],"license":null,"html_url":"https://github.com/genkit-ai/skills","pushed_at":"2026-04-27T22:14:25Z","description":"Agent Skills that teach AI coding agents how to build applications with the Genkit framework (JS/TS, Go, Dart).","skill_md_sha":"b22257b14fa4caa385ad1ea4c74adebefb6f7e82","skill_md_path":"skills/developing-genkit-python/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/genkit-ai/skills/tree/main/skills/developing-genkit-python"},"layout":"multi","source":"github","category":"skills","frontmatter":{"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."},"skills_sh_url":"https://skills.sh/genkit-ai/skills/developing-genkit-python"},"updatedAt":"2026-05-18T19:07:19.372Z"}}