The Google provider formats Composio tools for Gemini and the Google Agent Development Kit (ADK). Pick the tab that matches your setup.
In Python, the Gemini provider (composio_gemini) wraps Composio tools as typed callables, and the google-genai SDK's Automatic Function Calling executes tool calls inside the chat loop for you. In TypeScript, the Google provider transforms Composio tools into Gemini function declarations, and you run the loop: execute each call with composio.provider.executeToolCall(session, functionCall), feed the result back, and repeat until the model replies with text.
Object arguments that declare no properties preserve arbitrary nested keys in both providers. The TypeScript provider also adds type: "object" to schema nodes that declare properties without a type, which is the shape Gemini expects for object schemas.
Install
uv add composio composio_gemini google-genaiConfigure API Keys
Set COMPOSIO_API_KEY with your API key from Settings and GOOGLE_API_KEY with your Google API key.
COMPOSIO_API_KEY=xxxxxxxxx
GOOGLE_API_KEY=xxxxxxxxxCreate session and run
from composio import Composio
from composio_gemini import GeminiProvider
from google import genai
from google.genai import types
composio = Composio(provider=GeminiProvider())
client = genai.Client()
# Create a session for your user
session = composio.create(user_id="user_123")
tools = session.tools()
config = types.GenerateContentConfig(tools=tools)
chat = client.chats.create(model="gemini-3-pro-preview", config=config)
# Automatic Function Calling executes tool calls inside the chat loop
response = chat.send_message(
"Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'"
)
print(response.text)Pass the session to executeToolCall when the model received tools from session.tools(). The helper preserves the provider's argument normalization and executes the call through that session, so session meta-tools such as COMPOSIO_SEARCH_TOOLS keep working. For tools fetched via tools.get, pass the user ID instead. Passing a session requires @composio/core ≥ 0.17.0 with @composio/google ≥ 0.12.0; on earlier versions, execute session tools with session.execute(). The Python Gemini tab needs neither: Automatic Function Calling runs provider-wrapped callables, which carry the session.
Next
What is a session?
How sessions scope users, tools, and auth, and how to reuse them across requests.