Skip to main content

genkit

Genkit is a framework designed to help you build AI-powered applications and features. It provides open source libraries for Python, Node.js and Go, plus developer tools for testing and debugging.

You can deploy and run Genkit libraries anywhere Python is supported. It's designed to work with many AI model providers and vector databases. While we offer integrations for Firebase and Google Cloud, you can use Genkit independently of any Google services.

Setup Instructions

uv add genkit genkit-google-genai
from pydantic import BaseModel, Field
from genkit import Genkit
from genkit_google_genai import GoogleAI

ai = Genkit(
    plugins=[GoogleAI()],
    model='googleai/gemini-flash-latest',
)


class RpgCharacter(BaseModel):
    """An RPG game character."""

    name: str = Field(description='name of the character')
    back_story: str = Field(description='back story')
    abilities: list[str] = Field(description='list of abilities (3-4)')


@ai.flow()
async def generate_character(name: str) -> RpgCharacter:
    result = await ai.generate(
        prompt=f'generate an RPG character named {name}',
        output_schema=RpgCharacter,
    )
    return result.output


async def main() -> None:
    """Main function."""
    character = await generate_character('Goblorb')
    print(character.model_dump_json(indent=2))


if __name__ == '__main__':
    ai.run_main(main())

See https://python.api.genkit.dev for more details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genkit-0.10.0.tar.gz (330.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genkit-0.10.0-py3-none-any.whl (248.6 kB view details)

Uploaded Python 3

File details

Details for the file genkit-0.10.0.tar.gz.

File metadata

  • Download URL: genkit-0.10.0.tar.gz
  • Upload date:
  • Size: 330.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for genkit-0.10.0.tar.gz
Algorithm Hash digest
SHA256 a5cc69dcca3f391d14f47527fbb5c129c7a6f1e662be8746408f74003e7bf94e
MD5 0e6986ab85c5ef3e86fe9581211f3f0c
BLAKE2b-256 ffbbcc7967d5f5f011107bcc02ea539fd0614845effdb14109bf793b934e9322

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit-0.10.0.tar.gz:

Publisher: publish_python.yml on genkit-ai/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genkit-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: genkit-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 248.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for genkit-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78c5e2cdddc4b779107decf1b0711224c445f025922c8796a77d64fafbd89675
MD5 c75d4a6a73d151d5f98797c421b84401
BLAKE2b-256 90b2a3ba21cfb51d39b8f253323fbba91c4613bcd4bb181cf1ecab033ca6acce

See more details on using hashes here.

Provenance

The following attestation bundles were made for genkit-0.10.0-py3-none-any.whl:

Publisher: publish_python.yml on genkit-ai/genkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page