Skip to main content

genkit-a2ui

Experimental A2UI middleware for Genkit Python.

Building with a coding agent? Install the Genkit Python skill first.

npx skills add genkit-ai/skills --skill developing-genkit-python

It teaches your agent the current Genkit Python APIs and common gotchas. Source, manual install and skills for other languages: genkit-ai/skills.

Add Surfaces() to use=[...] on ai.generate or define_agent. The model may emit ```a2ui fences; the middleware rewrites them into application/a2ui+json data parts. On the next turn, those parts become text again so the model can see prior surfaces and button clicks.

from genkit import Genkit
from genkit_a2ui import Surfaces, envelopes_from_parts
from genkit_google_genai import GoogleAI

ai = Genkit(plugins=[GoogleAI()])

response = await ai.generate(
    model='googleai/gemini-flash-latest',
    prompt='Show me the weather in Tokyo',
    use=[Surfaces()],
)
envelopes = envelopes_from_parts(response.message.content)

Surfaces() uses the bundled basic catalog. To use your own components, register a catalog and pass its id:

from genkit_a2ui import Surfaces, A2uiCatalog, A2uiCatalogComponent, load_catalog

catalog = A2uiCatalog(
    id='https://my-app.org/catalogs/custom.json',
    components=(
        A2uiCatalogComponent(name='Banner', description='A prominent alert.', props='title: string.'),
    ),
)
load_catalog(ai, catalog)

response = await ai.generate(
    model='googleai/gemini-flash-latest',
    prompt='Show a warning banner',
    use=[Surfaces(catalog=catalog.id)],
)

load_catalog_file(ai, './my-catalog.json') does the same from disk. register_basic_catalog(ai) puts the bundled catalog on the registry so the Developer UI can list it next to custom ones (GET /api/values?type=a2ui-catalog).

Status: experimental.

Metadata

Release files for genkit-a2ui 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genkit-a2ui 0.13.0
File Size Uploaded Provenance Actions
genkit_a2ui-0.13.0.tar.gz 26.6 kB With provenance Details for genkit_a2ui-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genkit-a2ui 0.13.0
File Interpreter ABI Platform Actions
genkit_a2ui-0.13.0-py3-none-any.whl Python 3 none any Details for genkit_a2ui-0.13.0-py3-none-any.whl

Total release size: 50.4 kB

Release files / genkit_a2ui-0.13.0.tar.gz

Download URL genkit_a2ui-0.13.0.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
10dd9e305e360e6c5d65a8d0a2990945f0abe40f98462a56887c3d54b2712f9d
BLAKE2b-256 checksum
How to use checksums
2f4c411a9898d6d39fea5b3d6ee2e667dc4072de439793284fc06b9cf80a2cdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / genkit_a2ui-0.13.0-py3-none-any.whl

Download URL genkit_a2ui-0.13.0-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f62c014eb123ef1da2cc1d20ae5023fdce5cf8b046c15c4e104b9d70baf9a106
BLAKE2b-256 checksum
How to use checksums
22225a993dfa233c4c7446b77bebdd406db7cc89a8f9ec39d00a7a54e2142d1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for genkit-a2ui 0.13.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for genkit_a2ui-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page