Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Flyte Gemini Plugin

This plugin provides integration between Flyte and Google's Gemini API, enabling you to use Flyte tasks as tools for Gemini agents.

Installation

pip install flyteplugins-gemini

Usage

import flyte
from flyteplugins.gemini import function_tool, Agent, run_agent

env = flyte.TaskEnvironment(
    "gemini-agent",
    secrets=[flyte.Secret(key="google_api_key", as_env_var="GOOGLE_API_KEY")],
)

@env.task
async def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"The weather in {city} is sunny, 72F"

@env.task
async def agent_task(prompt: str) -> str:
    tools = [function_tool(get_weather)]
    return await run_agent(
        prompt=prompt,
        tools=tools,
        model="gemini-2.5-flash",
    )

if __name__ == "__main__":
    flyte.init_from_config()
    run = flyte.run(agent_task, prompt="What's the weather in San Francisco?")
    print(run.result)

Features

  • Convert Flyte tasks to Gemini tool definitions automatically
  • Support for both sync and async tasks
  • Automatic type conversion from Python type hints to JSON schema
  • Integration with Flyte's task environment for secrets and resources

Metadata

Release files for flyteplugins-gemini 2.5.8

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

Built distribution (wheel)

Table of built distributions (wheels) for flyteplugins-gemini 2.5.8
File Interpreter ABI Platform
flyteplugins_gemini-2.5.8-py3-none-any.whl Python 3 none any Details

Release files / flyteplugins_gemini-2.5.8-py3-none-any.whl

Download URL flyteplugins_gemini-2.5.8-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d84ece6c32dc9e7e6c987e9fbe648acdaea5a236b228fa3fe1a5b4ebeb403ce0
BLAKE2b-256 checksum
How to use checksums
c3fd0f468743b290a640748659860931750db59849d1ea463a0ffb390b54976d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.5.8 This release

1 release file

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