Metadata-Version: 2.4
Name: agentsdk-gemini-adapter
Version: 0.1.0
Summary: A Python adapter for using Google Gemini with OpenAI Agents SDK
Author-email: Abbas Asad <abbas07tech@gmail.com>
Maintainer-email: Abbas Asad <abbas07tech@gmail.com>
License: MIT
Keywords: gemini,openai,agents,ai,machine-learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```bash
pip install agentsdk-gemini-adapter
```

## Quick Start

1. Set up your Gemini API key in a `.env` file:
```bash
GEMINI_API_KEY=your_gemini_api_key_here
```

2. Import and use the config:
```python
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:

```bash
pip install openai-agents
```

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

## Usage Example

```python
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.
