{"id":8903,"library":"cmdop","title":"CMDOP Python SDK","description":"The `cmdop` Python SDK provides a client for interacting with CMDOP agents, enabling programmatic control over agent execution and data exchange. It is currently at version 2026.4.7.2 and follows an agile release cadence, often aligning with platform updates.","status":"active","version":"2026.4.7.2","language":"en","source_language":"en","source_url":"https://github.com/commandoperator/cmdop-sdk","tags":["AI","Agent","SDK","API","Automation"],"install":[{"cmd":"pip install cmdop","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"Agent","correct":"from cmdop import Agent"}],"quickstart":{"code":"import os\nfrom cmdop import Agent\n\n# Ensure CMDOP_API_KEY is set as an environment variable\n# e.g., export CMDOP_API_KEY=\"your_api_key_here\"\napi_key = os.environ.get(\"CMDOP_API_KEY\")\n\nif not api_key:\n    print(\"Warning: CMDOP_API_KEY environment variable is not set. Using a placeholder.\")\n    print(\"Please set it for actual API interaction.\")\n    api_key = \"sk-fake-api-key\"\n\ntry:\n    agent = Agent(api_key=api_key)\n    response = agent.execute(\"What is the capital of France?\")\n    print(f\"Agent Response: {response}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates initializing an Agent with an API key from an environment variable and performing a simple execution. Replace 'your_api_key_here' with your actual CMDOP API key."},"warnings":[{"fix":"Ensure `os.environ['CMDOP_API_KEY']` is set before initializing `Agent`, or pass the `api_key` directly: `Agent(api_key='YOUR_KEY')`.","message":"The `api_key` parameter for `Agent` initialization is mandatory. If not provided or if the `CMDOP_API_KEY` environment variable is not set, it will lead to an `AuthenticationError` or `TypeError`.","severity":"gotcha","affected_versions":">=2024.1.0"},{"fix":"Upgrade your Python environment to 3.10 or a later version using tools like `pyenv` or `conda`.","message":"The library requires Python 3.10 or newer. Users on older Python versions will encounter installation failures or runtime errors.","severity":"breaking","affected_versions":">=2023.1.0"},{"fix":"Verify your internet connection and check if there are any proxy or firewall settings that might be blocking access to the CMDOP API. Consult CMDOP documentation for specific endpoint details if necessary.","message":"Network connectivity issues or incorrect API endpoint configuration can result in `ConnectionError` exceptions, preventing successful interaction with the CMDOP service.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Set the `CMDOP_API_KEY` environment variable with a valid key, or pass it directly to the `Agent` constructor: `agent = Agent(api_key=\"your_valid_key\")`.","cause":"The provided API key is either missing, incorrect, or has expired.","error":"cmdop.errors.AuthenticationError: Missing or invalid API key"},{"fix":"Either set the `CMDOP_API_KEY` environment variable before running your script, or explicitly pass the API key when creating the `Agent` instance: `from cmdop import Agent; agent = Agent(api_key=\"YOUR_API_KEY\")`.","cause":"The `Agent` class was initialized without the required `api_key` argument, and the `CMDOP_API_KEY` environment variable was also not found.","error":"TypeError: Agent() missing 1 required positional argument: 'api_key'"},{"fix":"Check your internet connection. If behind a proxy, ensure proxy settings are correctly configured for your Python environment. Verify that the CMDOP API status page indicates no outages. If using a custom endpoint, ensure it's correct.","cause":"The Python client could not establish a network connection to the CMDOP API server. This could be due to network issues, an incorrect endpoint, or the API server being unavailable.","error":"cmdop.errors.ConnectionError: Could not connect to the CMDOP API: [Errno 111] Connection refused"}]}