Skip to main content
Install and configure the Control Plane SDK for managing agents, context graph, and other organization resources.

Prerequisites

Before installing the SDK, ensure you have:
  • Python 3.8+ installed on your system
  • pip package manager
  • Kubiya Control Plane API Key from the Kubiya platform

Installation

Install via pip

Install from Source

Optional Dependencies

Configuration

Get Your API Key

  1. Log in to the Kubiya platform
  2. Navigate to SettingsAPI Keys
  3. Create a new API key or copy an existing one

Configure Authentication

Configure the client directly in your Python code with your API key:
Note: The api_key parameter is required. The base_url parameter is optional and defaults to the Kubiya cloud platform. Specify a custom base_url for on-premise deployments.

Verify Installation

Quick Test

Test your installation and connection:

Version Check

Feature Test

IDE Setup

VS Code

  1. Install the Python extension
  2. Add these settings to your workspace (.vscode/settings.json):
  1. For better autocompletion, install type stubs:

PyCharm

  1. Go to FileSettingsProjectPython Interpreter
  2. Add the kubiya-sdk package to your interpreter
  3. Enable type checking in SettingsEditorInspectionsPython
  4. Configure code style to use Black formatter

Jupyter Notebooks

The SDK works great in Jupyter notebooks:

Docker Setup

Using Docker

Create a Dockerfile:

Docker Compose

Create a docker-compose.yml:
Run with:

Environment Variables

Configure your environment by creating a .env file:

Development Setup

For SDK development and contributions:

Clone Repository

Create Virtual Environment

Install Development Dependencies

Run Tests

Troubleshooting

Common Issues

ImportError: No module named ‘kubiya’

Solution: Ensure the SDK is installed in your current Python environment

AuthenticationError: Invalid API key

Solution: Verify your API key is correct and passed to the ControlPlaneClient constructor

ConnectionTimeout: Request timed out

Solution: Increase timeout or check network connectivity

SSL Certificate Error

Solution: For development environments only (not recommended for production)

Enable Debug Logging

For troubleshooting, enable debug logging:

Version Compatibility

Next Steps

Now that you have the SDK installed:

Quick Start Guide

Build your first integration in minutes

Control Plane Client

Learn the Control Plane client services

Context Graph

Query entities and relationships

Examples

Explore real-world usage patterns