Catalog PyPI
PACKAGE EXPLORERView in registry

agentsdk-gemini-adapter

PyPI

A Python adapter for using Google Gemini with OpenAI Agents SDK

agentsaigeminimachine-learningopenai
Versions collected1
Direct dependencies0From release 0.1.0
Last observed20 Oct, 23:18 UTC

README

Version 0.1.0 documentation

AgentSDK Gemini Adapter

A Python adapter for using Google Gemini with OpenAI Agents SDK. This package provides a seamless integration between Google's Gemini models and the OpenAI Agents SDK.

Installation

pip install agentsdk-gemini-adapter

Quick Start

  1. Set up your Gemini API key in a .env file:
GEMINI_API_KEY=your_gemini_api_key_here
  1. Import and use the config:
from agentsdk_gemini_adapter import config

# Now you can use the config with OpenAI Agents SDK
# The config includes a pre-configured Gemini model

Features

  • Pre-configured Gemini 2.0 Flash model
  • Seamless integration with OpenAI Agents SDK

Requirements

  • Python 3.7+
  • Gemini API Key
  • OpenAI Agents SDK

Dependencies

This package requires openai-agents to be installed separately:

pip install openai-agents

Note: python-dotenv will be installed automatically as a dependency of openai-agents.

Usage Example

from agents import Agent, Runner
from agentsdk_gemini_adapter import config

# Create an agent using OpenAI Agents SDK
agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant.",
)

# Pass the Gemini configuration in run_config to any Runner method
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.", run_config=config)
print(result.final_output)

Configuration

The package automatically:

  • Loads your GEMINI_API_KEY from environment variables
  • Configures the Gemini client with the correct base URL
  • Sets up the Gemini 2.0 Flash model
  • Creates a ready-to-use RunConfig object

License

MIT License - see LICENSE file for details.

Contribution

Contributions are welcome! Please feel free to submit a Pull Request.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.02 Jul 20250

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:18 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e198760229994296d9ed30a813ee008596bad7f8ee384a453f430ecd2d556700