{"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":"en","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,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}