Skip to main content
The Kubiya Control Plane can be self-hosted on your own infrastructure, giving you full control over your agent orchestration platform with VPC-only access, compliance boundaries, and custom integrations.
Run Anywhere: Deploy on local machines, cloud VMs (AWS, GCP, Azure), Kubernetes clusters, or bare metal servers with full access to private resources.

Overview

The Control Plane is a FastAPI-based REST API server that orchestrates your entire Kubiya infrastructure. Key Responsibilities:
  • Manages agent lifecycle and configuration
  • Integrates with Temporal for workflow orchestration
  • Handles teams, projects, environments, and policies
  • Streams real-time execution events via WebSocket
  • Routes tasks to appropriate queues and workers

Quick Start

1

Create Database

2

Configure Connection

URL-encode special characters: !%21, @%40, #%23
3

Start Server

Automatically installs the latest version from PyPI.
4

Verify

Visit http://localhost:7777/api/docs for interactive API documentation.

Prerequisites

System Requirements

  • Python 3.10+ (NOT 3.8+)
  • PostgreSQL 13+ (required)
  • Redis (optional, recommended)
  • 2GB RAM minimum (4GB recommended)

Database Setup

Optional: Redis

Configuration

Package Installation

By default, the CLI installs the latest version from PyPI automatically.

Server Options

Development Mode (--development):
  • Hot reloading on code changes
  • Single worker process
  • NOT for production
Production Mode (--workers=N):
  • Gunicorn with multiple workers
  • Better performance and fault tolerance
  • Recommended: 4 workers
Route LLM requests through your own proxy:
Benefits: centralized management, cost tracking, rate limiting

Environment Variables

Use CLI flags --workers and --development for worker count and hot reloading.
Production Security: Never use auto-generated SECRET_KEY in production!

Production Deployment

Docker

Kubernetes

Nginx Reverse Proxy

Database Management

Automatic Migrations

Migrations run automatically on startup using Alembic:

Backup & Restore

Connection Pooling

Use PgBouncer for production:

Monitoring

Health Checks

API Documentation

Once running, access:
  • Swagger UI: http://localhost:7777/api/docs
  • ReDoc: http://localhost:7777/api/redoc
  • OpenAPI Spec: http://localhost:7777/api/openapi.json

Built-in WebUI

The WebUI provides real-time logs, health status, and process info.

Logs

Security

Production Checklist

Best Practices

Never use auto-generated keys in production:
Never pass secrets via CLI flags (visible in process list)
Always use SSL/TLS:
Grant minimal permissions:
Bind to localhost for local-only access:
Always use reverse proxy for external access with:
  • SSL/TLS termination
  • Rate limiting
  • WAF protection

Troubleshooting

Error: migration failed: connection refusedSolutions:
  1. Verify PostgreSQL is running: pg_isready -h localhost -p 5432
  2. Check DATABASE_URL format: echo $DATABASE_URL
  3. Test connection: psql $DATABASE_URL -c "SELECT 1"
  4. Check firewall: nc -zv postgres-host 5432
Error: server did not become healthySolutions:
  1. Find process: lsof -i:7777
  2. Kill process: lsof -ti:7777 | xargs kill
  3. Use different port: --port=8888
Error: could not translate host nameCause: Special characters in password not encodedSolution: Encode special characters:
  • !%21, @%40, #%23, $%24, %%25
Or use Python: python3 -c "from urllib.parse import quote; print(quote('pass!word'))"
Error: ModuleNotFoundErrorSolutions:
  1. Reinstall: kubiya control-plane start --no-cache
  2. Specific version: kubiya control-plane start --package-version=0.6.0 --no-cache
  3. Use Git: --package-source=git+https://github.com/kubiyabot/control-plane-api.git@main
Warning: Using auto-generated SECRET_KEY (not suitable for production)Solution:

Debug Mode

Next Steps

Deploy Workers

Set up workers to execute agent workflows

Configure LLM Gateway

Route models through your own LiteLLM proxy

Create Agents

Build and configure AI agents

API Reference

Explore the full Control Plane API