developing-genkit-python

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…

INSTALLATION
npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-python
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2b

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](references/common-errors.md) 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](references/common-errors.md)).

4. After generating code, follow [Dev Workflow](references/dev-workflow.md) for `genkit start` and the Dev UI.

5. On errors: step 1 is always [Common Errors](references/common-errors.md).

## References

- [Examples](references/examples.md): Structured output, streaming, flows, tools, embeddings.

- [Setup](references/setup.md): New project bootstrap and plugins.

- [Common Errors](references/common-errors.md): Read first when something breaks.

- [FastAPI](references/fastapi.md): HTTP, `genkit_fastapi_handler`, parallel flows.

- [Dotprompt](references/dotprompt.md): `.prompt` files and helpers.

- [Evals](references/evals.md): Evaluators and datasets.

- [Dev Workflow](references/dev-workflow.md): `genkit start`, Dev UI, checklist.
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card