Skip to content

Guide · Agent skill

How to use the Genkit Python Developer agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide shows you how to install and use the developing-genkit-python agent skill, which teaches an AI agent how to write Python code with Genkit, Google's SDK for building AI features. It is written for readers who have never used agent skills. By the end you will know what the skill changes, how to add it to Claude, how to phrase requests so it triggers, and how to check the agent's work with Genkit traces.

Genkit Python Developergoogle/skills · Apache-2.0

Quick start

  1. 1Get the skill ZIP. Download the developing-genkit-python skill as a ZIP file from this page.
  2. 2Unzip into a skills folder. Place the skill folder in ~/.claude/skills/ for all projects, or in .claude/skills/ inside one project.
  3. 3Or upload it in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP.
  4. 4Install the prerequisites. Make sure Python 3.10+, uv and the Genkit CLI are installed, and set GEMINI_API_KEY.
  5. 5Ask a natural-language request. Describe a Genkit Python task, such as a flow, a tool or a chatbot, and mention Genkit.
  6. 6Run under genkit start. Run the app with genkit start -- uv run src/main.py so traces are captured.
  7. 7Inspect the traces. Use genkit trace:list and genkit trace:get <traceId> --format json to confirm tools and model calls ran.

What is an agent skill and what does this one do?

An agent skill is a folder of instructions and reference files that an AI agent loads when a task matches it. This skill, developing-genkit-python, is about Genkit in Python. Its description says it applies when you ask about Genkit, AI agents, flows, or tools in Python, or when you hit Genkit errors, import issues, or API problems.

Once installed, the agent knows the conventions of the Genkit Python SDK. It can write generate, streaming, tool, flow and multi-turn agent code, and it knows which imports to use. It also knows how to run apps under the Genkit CLI so you can inspect traces of model calls and tool use.

  • Hello-world style generate calls using GoogleAI and Gemini models
  • Multi-turn agents with ai.define_agent, sessions, and chat.send
  • Flows (@ai.flow) for single-shot, stateless generation
  • Imports for Google AI, agents, middleware, FastAPI and evals
  • Running apps with genkit start and inspecting traces

How do you install the developing-genkit-python skill?

Download the skill as a ZIP file from this page. Unzip it so the skill folder ends up in one of two places: your personal skills folder at ~/.claude/skills/, or a project-specific .claude/skills/ folder inside the project you are working in. Use the personal folder if you want the skill everywhere, and the project folder if you want it limited to one codebase.

If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the ZIP there.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

What do you need before using it?

The skill is for Python projects and expects a few tools. Install these before you ask the agent to build anything, or it will hit errors early on.

The skill's prerequisites are Python 3.10 or newer, the uv package manager, and the Genkit CLI. If genkit --version is missing, install the CLI globally with npm. For Google AI models you also need a GEMINI_API_KEY environment variable. The Genkit Python packages, such as genkit and genkit-google-genai, are installed as part of your project, and genkit-fastapi and genkit-evaluators are optional.

  • Python 3.10+
  • uv package manager
  • Genkit CLI (npm package genkit-cli, installed globally)
  • GEMINI_API_KEY environment variable for Google AI models
  • Packages such as genkit, genkit-google-genai, and optionally genkit-fastapi and genkit-evaluators
npm install -g genkit-cli

How do you trigger the skill with natural requests?

You do not need a special command. Describe what you want in plain language that mentions Genkit or Python AI work. Requests like these match the skill's description: asking how to write a Genkit flow, asking for a tool-using agent or chatbot in Python, or pasting a Genkit error message and asking why it fails.

If the agent does not seem to use the skill, name Genkit and Python explicitly in your request.

  • "Write a Genkit Python flow that summarises a text file with Gemini."
  • "Build a Python chatbot with Genkit that remembers the conversation."
  • "I get an import error from genkit_google_genai. What is wrong?"
  • "Add a weather tool to my Genkit agent in Python."

What does a basic Genkit Python app look like?

The skill's basic example creates a Genkit object with the GoogleAI plugin and a Gemini model id, then calls generate inside an async main function. Model ids use a prefix, such as googleai/gemini-flash-latest. Set GEMINI_API_KEY first, and enter through ai.run_main(main()).

For conversational apps, the skill tells the agent to use ai.define_agent rather than building a generate-plus-tools loop inside a flow. Plain flows are for single-shot, stateless generation.

from genkit import Genkit from genkit_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())

How do you run apps and check traces with the Genkit CLI?

Run your app under genkit start, not with uv run alone. Running directly skips trace capture, so you cannot prove that tools were called. genkit start runs until you press Ctrl+C, which is expected for servers and interactive tools. For a quick non-interactive check, use genkit flow:run, which runs one flow, prints a Trace ID and exits. Note that flow:run works on flows, not on agents.

After a run, list and inspect traces from the terminal. For scripts or piping into jq, use --format json, because the default output is meant for people and may be truncated.

  • Persistent app: genkit start -- uv run src/main.py
  • Without the Dev UI: genkit start --noui -- uv run src/main.py
  • One-shot flow: genkit flow:run myFlow '{"data": "input"}' -- uv run src/main.py
  • Non-interactive: genkit start --non-interactive -- uv run src/main.py
  • List traces: genkit trace:list
  • Inspect a trace: genkit trace:get <traceId> --format json
genkit start -- uv run src/main.py genkit flow:run myFlow '{"data": "input"}' -- uv run src/main.py genkit trace:list genkit trace:get <traceId> --format json

What are the safety notes for running the skill?

This skill runs scripts and uses the network. Its instructions cause the agent to run commands such as the Genkit CLI and uv, and the code it writes calls Google AI models, so it needs your GEMINI_API_KEY and will send prompts to those services. Review commands before they run, keep API keys in environment variables rather than source files, and avoid running the skill against production systems without review.

The skill's Agents API is marked Beta. Some referenced files, including setup.md and fastapi.md, were not included in the files reviewed, so do not assume guidance from those topics has been checked.

  • Scripts and network access are both used
  • Keep GEMINI_API_KEY in an environment variable
  • Agents API is Beta; review before production use
  • setup.md and fastapi.md were not in the reviewed files

What tips help you get the best results?

Ask the agent to verify with traces rather than a blind run. Mention which kind of app you want (flow, agent, or FastAPI service) so it chooses the right pattern. When something breaks, point the agent at the common errors reference first, since the skill tells it to check that before anything else.

The skill includes reference notes on agent sessions, human-in-the-loop approval, branching, background work, state, artifacts, custom agents and HTTP, plus dotprompt files and evals. Ask for these by name when you need them.

  • Ask for trace-based verification, not just a successful run
  • Name the pattern you need: flow, agent, or FastAPI
  • Start debugging from the common errors reference
  • Ask about sessions, human approval, or evals by name

What people use it for

  • Start a new Python app that calls Gemini models through Genkit's generate and streaming methods.
  • Build a chatbot or assistant with multi-turn history using ai.define_agent and chat.send.
  • Add tools to an agent so the model can call your Python functions.
  • Debug a Genkit import or API error by pasting the message into the agent with context.
  • Check that a tool was really called by reading the trace from genkit trace:get.

Frequently asked questions

Is the Genkit Python developer skill free to use?

The skill is published under the Apache-2.0 licence, as listed on this page. Genkit and its Python packages are used by your own project, and calls to Google AI models need your own GEMINI_API_KEY.

What do I need to install before using the developing-genkit-python skill?

You need Python 3.10 or newer, the uv package manager, and the Genkit CLI installed globally with npm install -g genkit-cli. For Google AI models you also need a GEMINI_API_KEY environment variable.

Where do I put the skill so Claude can use it?

Unzip the downloaded ZIP into ~/.claude/skills/ for personal use or into .claude/skills/ in a project. You can also upload the ZIP in the Claude apps under Settings, then Capabilities, then Skills.

Does this skill work for JavaScript or other languages?

No. The skill is specific to the Genkit Python SDK, so it is not suitable for non-Python projects.

Why does my Genkit app not show traces when I run it with uv run?

Running the app directly with uv run does not capture dev traces. Run it through genkit start -- uv run src/main.py so the Genkit CLI can collect telemetry from your program.

Is it better than calling the model API directly?

For a one-off API call, Genkit adds framework complexity you may not need. The skill is most useful for multi-turn agents, tools, flows, and teams who want trace-based checks of model and tool use.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are writing a Python app that calls Gemini through Genkit, especially chatbots, agents, or teams debugging Genkit errors with traces. Pick something else if your project is not in Python, if you only need a single direct model call, or if you need a production-ready setup today, since the Agents API is Beta and some referenced files were not reviewed.

Download the skill