Skip to main content

composio-gemini

Adapts Composio tools to the google-genai SDK as Python callables compatible with Gemini's Automatic Function Calling.

Installation

pip install composio composio-gemini google-genai

Set COMPOSIO_API_KEY (create one at https://dashboard.composio.dev/settings) and GOOGLE_API_KEY (from https://aistudio.google.com/apikey) in your environment.

Quickstart

GeminiProvider wraps each Composio tool as a typed Python callable. Pass the callables to GenerateContentConfig(tools=...) and the google-genai SDK derives function declarations from their signatures and executes tool calls automatically inside the chat loop; there is no manual tool-call handling.

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)

response = chat.send_message(
    "Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'"
)
print(response.text)

If you disable Automatic Function Calling and handle function calls yourself, composio.provider.handle_response(response) executes the function calls in a Gemini response and returns Part objects ready to send back.

composio-gemini vs composio-google

This package targets the google-genai SDK (from google import genai). composio-google targets the older Vertex AI SDK (vertexai.generative_models). For new projects, Google recommends google-genai, so use this package.

Metadata

Release files for composio-gemini 0.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for composio-gemini 0.29.0
File Size Uploaded Provenance
composio_gemini-0.29.0.tar.gz 6.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for composio-gemini 0.29.0
File Interpreter ABI Platform
composio_gemini-0.29.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / composio_gemini-0.29.0.tar.gz

Download URL composio_gemini-0.29.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8c33bdaebd3d526bd867d2505bf0976eb69af275ada200d6528ae0d09d9d21e6
BLAKE2b-256 checksum
How to use checksums
34345c44224d39418c08b6fd31e011fcc07d0981ba0b4b7fc29c348077abaa9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / composio_gemini-0.29.0-py3-none-any.whl

Download URL composio_gemini-0.29.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f1b5ff240d5a152ab9dfecb73326e53632c427241ac1206d42a09bf165a62d2
BLAKE2b-256 checksum
How to use checksums
4b2eb9ba4718ff87bbed6d0c505ff630def2548ac3757ac57db88bba7fe0a377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for composio-gemini 0.29.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.29.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page