Skip to main content

Installation

Using pip

pip install kubiya-control-plane-api

With Optional Dependencies

# For API server
pip install kubiya-control-plane-api[api]

# For worker runtime
pip install kubiya-control-plane-api[worker]

# For development
pip install kubiya-control-plane-api[dev]

# All dependencies
pip install kubiya-control-plane-api[all]

Environment Variables

Create a .env file. Configure the following environment variables to run the Control Plane API:
# Redis
REDIS_URL=
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
REDIS_DB=

# Temporal
TEMPORAL_HOST=
TEMPORAL_NAMESPACE=

# Database URL
DATABASE_URL= # example: postgresql://postgres:postgres@postgres:5432/agent_control_plane

# API Settings
ENVIRONMENT=development
LOG_LEVEL=debug

# Security (change in production)
SECRET_KEY=

# External Services
LITELLM_API_BASE=
LITELLM_API_KEY=

# Kubiya
KUBIYA_API_BASE=https://api.kubiya.ai
KUBIYA_API_KEY=

# Policy Enforcer (optional)
ENFORCER_SERVICE_URL=

Database Setup

Before running the server, set up the database and seed initial data:
# Run migrations to create necessary tables
kubiya-migrate

# Seed the LLM models table
kubiya-seed-models

# Seed environments and worker queues
kubiya-seed-worker-queues

Running the Server

Start the Control Plane API server:
uvicorn control_plane_api.app.main:app --host 0.0.0.0 --port 7777 --reload --env-file .env