composio-google
Adapts Composio tools to the Vertex AI SDK (vertexai.generative_models) as FunctionDeclaration objects for Gemini function calling.
Installation
pip install composio composio-google google-cloud-aiplatform
Set COMPOSIO_API_KEY (create one at https://dashboard.composio.dev/settings) in your environment. Vertex AI authenticates with Google Cloud credentials; run gcloud auth application-default login or set GOOGLE_APPLICATION_CREDENTIALS.
Quickstart
GoogleProvider is non-agentic: the model returns function calls, and composio.provider.handle_response executes every function call in the response and returns the results.
import vertexai
from vertexai.generative_models import GenerativeModel, Tool
from composio import Composio
from composio_google import GoogleProvider
vertexai.init(project="your-gcp-project", location="us-central1")
composio = Composio(provider=GoogleProvider())
# Create a session for your user
session = composio.create(user_id="user_123")
tools = session.tools()
model = GenerativeModel(
"gemini-3.7-flash",
tools=[Tool(function_declarations=tools)],
)
chat = model.start_chat()
response = chat.send_message(
"Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'"
)
# Execute the function calls the model requested
results = composio.provider.handle_response(user_id="user_123", response=response)
print(results)
To execute a single call instead of the whole response, use composio.provider.execute_tool_call(user_id="user_123", function_call=part.function_call).
composio-google vs composio-gemini
This package targets the Vertex AI SDK (vertexai.generative_models, installed via google-cloud-aiplatform). composio-gemini targets the newer google-genai SDK with Automatic Function Calling. For new projects, use composio-gemini.
Links
- Google provider docs: https://docs.composio.dev/docs/providers/google
- Composio docs: https://docs.composio.dev
Release files for composio-google 0.21.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| composio_google-0.21.1.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| composio_google-0.21.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / composio_google-0.21.1.tar.gz
| Download URL | composio_google-0.21.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33fd08cf1c9a9b25a8995af44608d4529ebeb5e431eecad4c6097489a34c46d3
|
|
BLAKE2b-256 checksum How to use checksums |
09580769bf3cc2bff0562bc8818371fcd26701b0bfe9a26bfb95c1e2b7b93bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / composio_google-0.21.1-py3-none-any.whl
| Download URL | composio_google-0.21.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86cfb9ed8b04d95717fe441aa22515abae4df00b6f9e85590a2524c8c4dd63f4
|
|
BLAKE2b-256 checksum How to use checksums |
839fb471c15fa346a5bc8f5819e3da4ba4f13a070659cd2ce4e8d2590838a32e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|