{"id":6572,"library":"composio-core","title":"Composio Core","description":"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.","status":"deprecated","version":"0.7.21","language":"python","source_language":"en","source_url":"https://github.com/composiohq/composio","tags":["api","integration","ai-agents","deprecated","tooling"],"install":[{"cmd":"pip install composio-core","lang":"bash","label":"Deprecated Installation"},{"cmd":"pip install composio","lang":"bash","label":"Recommended Installation (replacement library)"}],"dependencies":[{"reason":"Requires Python versions >=3.9 and <4.","package":"python","optional":false}],"imports":[{"note":"The 'composio-core' package is deprecated. Use 'composio' instead for the main SDK entry point.","wrong":"from composio_core import OpenAIToolSet","symbol":"Composio","correct":"from composio import Composio"}],"quickstart":{"code":"import os\nfrom composio import Composio\n\n# Ensure COMPOSIO_API_KEY is set in your environment variables\n# (e.g., in a .env file or directly in your shell)\ncomposio = Composio(\n    api_key=os.environ.get('COMPOSIO_API_KEY', '')\n)\n\ndef verify_connection():\n    try:\n        # 'user-id-123' should be a unique identifier for your user\n        # Toolkits specifies which sets of tools to load (e.g., HACKERNEWS, GITHUB)\n        tools = composio.tools.get(user_id='user-id-123', toolkits=['HACKERNEWS'])\n        print(f\"Successfully connected! Found {len(tools)} tools.\")\n    except Exception as error:\n        print(f\"Connection failed: {error}\")\n\nif __name__ == '__main__':\n    verify_connection()\n","lang":"python","description":"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."},"warnings":[{"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.","message":"The `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.","severity":"breaking","affected_versions":"<0.7.21"},{"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.","message":"Direct 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.","severity":"breaking","affected_versions":"composio>=0.6.0 (replacement library)"},{"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.","message":"Starting 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.","severity":"breaking","affected_versions":"composio>=0.9.0 (replacement library)"},{"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.","message":"Hardcoding API keys directly in your source code or configuration files is a security risk. API keys can be compromised if the code is exposed.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'act':10 'activ':56 'advis':29 'agent':70 'ai':69 'ai-ag':68 'api':66 'bridg':13 'cadenc':65 'clear':63 'composio':1,3,16,34,53 'continu':50 'core':2,4 'deprec':25,71 'develop':47 'enhanc':46 'exist':40 'experi':48 'foundat':7 'frequent':59 'improv':44 'integr':67 'librari':54 'maintain':57 'migrat':31 'new':38 'offer':43 'offici':24 'packag':9,35 'perform':45 'platform':17 'project':41 'python':8 'releas':64 'servic':20 'strong':28 'support':51 'tool':72 'updat':60 'user':26","created_at":"2026-04-15T18:33:39.680674+00:00","updated_at":"2026-04-16T03:23:14.740511+00:00","problems":[{"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 ...`.","cause":"The `composio-core` package is deprecated and is no longer the correct package to import; current projects should use the `composio` package instead.","error":"ModuleNotFoundError: No module named 'composio_core'"},{"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`.","cause":"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.","error":"ImportError: cannot import name 'Composio' from 'composio_core'"},{"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.","cause":"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.","error":"[DEPRECATED] Core package to act as a bridge between composio platform and other services. Please use 'composio' instead."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.7.21","cli_name":"","cli_version":null,"type":"library","homepage":"https://composio.dev","github":"https://github.com/composiohq/composio","docs":null,"changelog":null,"pypi":"https://pypi.org/project/composio-core/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["llm-agents","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}