Google Gen AI Provider

The Google provider transforms Composio tools into a format compatible with Gemini’s function calling capabilities through it’s API

Setup

The Google Gen AI SDK and theprovider can only be installed for the Python SDK.

pip
$pip install google-genai composio_google
Python
1from composio import Composio
2from composio_gemini import GeminiProvider
3from google import genai
4from google.genai import types
5
6# Create composio client
7composio = Composio(provider=GeminiProvider())
8# Create google client
9client = genai.Client()

Usage

Python
1user_id = "0000-1111-2222"
2tools = composio.tools.get(user_id, tools=["COMPOSIO_SEARCH_DUCK_DUCK_GO_SEARCH"])
3
4# Create genai client config
5config = types.GenerateContentConfig(tools=tools)
6
7# # Use the chat interface.
8chat = client.chats.create(model="gemini-2.0-flash", config=config)
9response = chat.send_message("search about the latest info on windsurf acquisition.")
10print(response.text)

Modifiers

Modifiers are functions that can be used to intercept and optionally modify the schema, the tool call request and the response from the tool call.

OpenAI provider modifiers are the standard framework modifiers. Read more here: Framework Modifiers