Registry / llm-agents / composio-core

composio-core

JSON →
library0.7.21pypypi✓ verified 86d ago

Composio Core was the foundational Python package acting as a bridge between the Composio platform and other services. It is now officially DEPRECATED. Users are strongly advised to migrate to the 'composio' package for all new and existing projects, which offers improved performance, enhanced developer experience, and continued support. The 'composio' library is actively maintained with frequent updates and a clear release cadence.

pip install composio-core
INSTALL
IMPORT
SIG · COMPOSIO-CORE
C
composio-core
llm-agentspythonv0.7.21
Install
10.1s avg
Import
3568ms
Disk
154MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.21 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 3.675s · 117.3MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 10.1s · import 3.461s · 187MB
154MB installed
● package 154MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Composio
from composio import Composio
from composio_core import OpenAIToolSet
The 'composio-core' package is deprecated. Use 'composio' instead for the main SDK entry point.

This quickstart demonstrates the recommended way to initialize and verify connectivity with the Composio platform using the 'composio' library. It fetches available tools for a specified user ID and requires `COMPOSIO_API_KEY` to be set as an environment variable. This example showcases the basic setup for interacting with Composio's toolkit management features.

import os from composio import Composio # Ensure COMPOSIO_API_KEY is set in your environment variables # (e.g., in a .env file or directly in your shell) composio = Composio( api_key=os.environ.get('COMPOSIO_API_KEY', '') ) def verify_connection(): try: # 'user-id-123' should be a unique identifier for your user # Toolkits specifies which sets of tools to load (e.g., HACKERNEWS, GITHUB) tools = composio.tools.get(user_id='user-id-123', toolkits=['HACKERNEWS']) print(f"Successfully connected! Found {len(tools)} tools.") except Exception as error: print(f"Connection failed: {error}") if __name__ == '__main__': verify_connection()
Debug
Known issues
breakingThe `composio-core` package is officially DEPRECATED and no longer supported. Continuing to use it may expose your application to unpatched security vulnerabilities (e.g., arbitrary command injection, file read vulnerabilities in older versions) and prevent access to new features and performance improvements.
fix
Migrate immediately to the `composio` package. Install with `pip install composio` and update your import statements from `composio_core` to `composio`. Refer to the official Composio documentation for migration guides.
affects: <0.7.21
breakingDirect tool execution methods like `composio.tools.get()` and `composio.tools.execute()` are deprecated in the current `composio` SDK versions (0.6.0+). Using these methods directly without a session is discouraged and may lead to unexpected behavior or future breakage.
fix
Adopt the 'sessions' API for tool interactions. Initialize a session with `session = composio.create(user_id=...)` and then retrieve tools via `session.tools()`. This ensures proper context management, authentication, and framework integration. The Composio docs provide detailed quickstart guides for the session-based approach.
affects: composio>=0.6.0 (replacement library)
breakingStarting with Python SDK v0.9.0 and TypeScript SDK v0.2.0 (for the `composio` library), manual tool execution (if still performed, though sessions are recommended) now requires explicit version specification. The `tools.execute()` method will fail without a version.
fix
When performing manual tool execution, explicitly provide the toolkit version either at the SDK initialization level (`composio = Composio(api_key=..., toolkit_versions={'toolkit_slug': 'YYYYMMDD_XX'})`) or directly within the `execute` call (`version='YYYYMMDD_XX'`). It is highly recommended to migrate to the session-based API which handles versioning automatically.
affects: composio>=0.9.0 (replacement library)
gotchaHardcoding API keys directly in your source code or configuration files is a security risk. API keys can be compromised if the code is exposed.
fix
Always use environment variables (e.g., `COMPOSIO_API_KEY`) to store sensitive credentials. For local development, use tools like `python-dotenv` to manage a `.env` file, but ensure this file is never committed to version control. For production, leverage your deployment platform's secret management solutions.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'composio_core'
The `composio-core` package is deprecated and is no longer the correct package to import; current projects should use the `composio` package instead.
fix
First, uninstall the deprecated package: `pip uninstall composio-core`. Then, install the correct package: `pip install composio`. Finally, update your Python imports from `import composio_core` or `from composio_core import ...` to `import composio` or `from composio import ...`.
ImportError: cannot import name 'Composio' from 'composio_core'
You are attempting to import the `Composio` class (or other main components) from the deprecated `composio-core` package. The class name and package structure have changed with the migration to the actively maintained `composio` library.
fix
First, ensure `composio-core` is uninstalled: `pip uninstall composio-core`. Then, install the new package: `pip install composio`. Update your import statement from `from composio_core import Composio` to `from composio import Composio`.
[DEPRECATED] Core package to act as a bridge between composio platform and other services. Please use 'composio' instead.
This message indicates that `composio-core` is no longer supported and users are strongly advised to migrate to the `composio` package for all new and existing projects.
fix
Migrate your project from `composio-core` to `composio`. This involves uninstalling `composio-core` (`pip uninstall composio-core`), installing `composio` (`pip install composio`), and updating all relevant import statements and API calls according to the `composio` library's documentation.
Upgrade
Version history
0.7.21latest on PyPI · released Sep 9, 2025
Audit
Dependencies
pythonrequiredRequires Python versions >=3.9 and <4.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
composio-core — pip install composio-core · libregistry