Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

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, session=session) executes the function calls in a Gemini response the way that session's tools would, and returns Part objects ready to send back. For tools fetched with composio.tools.get(user_id=...), pass user_id= instead:

function_responses, executed = composio.provider.handle_response(
    response, user_id="user_123"
)

A Gemini response does not record which user it belongs to, so pass the user or session whenever one Composio instance serves more than one. Without one, handle_response raises a ValueError once the provider has wrapped tools for more than one user or session.

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.32.0

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

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for composio-gemini 0.32.0
File Size Uploaded Provenance Actions
composio_gemini-0.32.0.tar.gz 7.8 kB With provenance Details for composio_gemini-0.32.0.tar.gz

Built distribution (wheel)

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

Total release size: 15.6 kB

Release files / composio_gemini-0.32.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL composio_gemini-0.32.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
417bfaf0e44d17ec7adc41d81817c7afe68e333d8c22ef1c9ddff5b7c3b5f11c
BLAKE2b-256 checksum
How to use checksums
22d3ba8e8d0720df22d9a569927e5759e8f64b4fe8910864e6b7404f0a10e49d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL composio_gemini-0.32.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fecb56a27d0ef31b615cec395a868c07923e7e7356080c5276c4a972963989f
BLAKE2b-256 checksum
How to use checksums
649f63de12edceb9d7b0af2261cec7f59f14fb826a3d427f274dd23c58e9f54a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for composio-gemini 0.32.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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for composio_gemini-0.32.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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