Google

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, feed the result back, and repeat until the model replies with text.

Install

uv add composio composio_gemini google-genai

Configure API Keys

Set COMPOSIO_API_KEY with your API key from Settings and GOOGLE_API_KEY with your Google API key.

.env
COMPOSIO_API_KEY=xxxxxxxxx
GOOGLE_API_KEY=xxxxxxxxx

Create 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)

Next

What is a session?

How sessions scope users, tools, and auth, and how to reuse them across requests.

On this page