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-coreVerified import paths — ran on the pinned version, not inferred.
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.
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.
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.
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.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.
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 ...`.
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`.
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.