CMDOP Python SDK

2026.4.7.2 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

import os
from cmdop import Agent

# Ensure CMDOP_API_KEY is set as an environment variable
# e.g., export CMDOP_API_KEY="your_api_key_here"
api_key = os.environ.get("CMDOP_API_KEY")

if not api_key:
    print("Warning: CMDOP_API_KEY environment variable is not set. Using a placeholder.")
    print("Please set it for actual API interaction.")
    api_key = "sk-fake-api-key"

try:
    agent = Agent(api_key=api_key)
    response = agent.execute("What is the capital of France?")
    print(f"Agent Response: {response}")
except Exception as e:
    print(f"An error occurred: {e}")

view raw JSON →