Metadata-Version: 2.4
Name: kubiya-control-plane-api
Version: 0.2.2
Summary: Agent Control Plane API - Multi-tenant AI agent orchestration and management platform
Author-email: Kubiya <support@kubiya.ai>
License-Expression: MIT
Keywords: ai,agents,orchestration,temporal,fastapi,multi-tenant,workflow,automation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Framework :: FastAPI
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: <4.0.0,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi<1.0.0,>=0.109.0
Requires-Dist: uvicorn[standard]<1.0.0,>=0.27.0
Requires-Dist: sqlalchemy<3.0.0,>=2.0.25
Requires-Dist: psycopg2-binary<3.0.0,>=2.9.9
Requires-Dist: pydantic<3.0.0,>=2.5.3
Requires-Dist: pydantic-settings<3.0.0,>=2.1.0
Requires-Dist: alembic<2.0.0,>=1.13.1
Requires-Dist: httpx<1.0.0,>=0.26.0
Requires-Dist: python-multipart<1.0.0,>=0.0.6
Requires-Dist: python-jose[cryptography]<4.0.0,>=3.3.0
Requires-Dist: PyJWT<3.0.0,>=2.8.0
Requires-Dist: passlib[bcrypt]<2.0.0,>=1.7.4
Requires-Dist: litellm<2.0.0,>=1.30.0
Requires-Dist: agno<3.0.0,>=2.0.10
Requires-Dist: supabase<3.0.0,>=2.3.0
Requires-Dist: temporalio<2.0.0,>=1.5.0
Requires-Dist: structlog<25.0.0,>=24.1.0
Requires-Dist: mangum<1.0.0,>=0.17.0
Requires-Dist: mcp<2.0.0,>=1.0.0
Requires-Dist: nest-asyncio<2.0.0,>=1.5.0
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio<1.0.0,>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov<6.0.0,>=4.1.0; extra == "dev"
Requires-Dist: pytest-mock<4.0.0,>=3.11.0; extra == "dev"
Requires-Dist: pytest-xdist<4.0.0,>=3.5.0; extra == "dev"
Requires-Dist: fakeredis<3.0.0,>=2.20.0; extra == "dev"
Requires-Dist: respx<1.0.0,>=0.20.0; extra == "dev"
Requires-Dist: black<25.0.0,>=23.0.0; extra == "dev"
Requires-Dist: ruff<1.0.0,>=0.1.0; extra == "dev"
Requires-Dist: mypy<2.0.0,>=1.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<9.0.0,>=7.4.0; extra == "test"
Requires-Dist: pytest-asyncio<1.0.0,>=0.21.0; extra == "test"
Requires-Dist: pytest-cov<6.0.0,>=4.1.0; extra == "test"
Requires-Dist: pytest-mock<4.0.0,>=3.11.0; extra == "test"
Requires-Dist: pytest-xdist<4.0.0,>=3.5.0; extra == "test"
Requires-Dist: fakeredis<3.0.0,>=2.20.0; extra == "test"
Requires-Dist: respx<1.0.0,>=0.20.0; extra == "test"
Provides-Extra: all
Requires-Dist: kubiya-control-plane-api[dev,test]; extra == "all"

# Kubiya Control Plane API

Multi-tenant AI agent orchestration and management platform powered by Temporal workflows.

## Installation

### Basic Installation

```bash
pip install kubiya-control-plane-api
```

### Installation with Extras

Install with development dependencies:

```bash
pip install "kubiya-control-plane-api[dev]"
```

Install with test dependencies:

```bash
pip install "kubiya-control-plane-api[test]"
```

Install with all optional dependencies:

```bash
pip install "kubiya-control-plane-api[all]"
```

## Running for Development

### 1. Clone the repository

```bash
git clone https://github.com/kubiyabot/agent-control-plane.git
cd agent-control-plane
```

### 2. Set up environment variables

Create a `.env` file with the required variables (see below).

### 3. Build an image and run.

```bash
make build

make up
```

The API will be available at `http://localhost:7777/api/docs`

## Running the Worker

The worker processes Temporal workflows for agent execution.

### Using the CLI command

After installing the package, run:

```bash
kubiya-control-plane-worker
```

### Using Python module

```bash
python -m control_plane_api.worker
```

## Required Environment Variables

The following environment variables **must** be set to run the worker:

### Temporal Configuration (Required)

```bash
TEMPORAL_HOST=localhost:7233
TEMPORAL_NAMESPACE=default
```

- `TEMPORAL_HOST`: Address of your Temporal server
- `TEMPORAL_NAMESPACE`: Temporal namespace to use

### Database Configuration (Required)

**Option 1: Direct PostgreSQL**

```bash
DATABASE_URL=postgresql://user:password@localhost:5432/control_plane
```

**Option 2: Supabase**

```bash
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your-service-role-key
SUPABASE_POSTGRES_URL=postgresql://user:password@host:5432/database
```

You need **either** `DATABASE_URL` **or** all three Supabase variables.

### Temporal Cloud Authentication (If using Temporal Cloud)

If connecting to Temporal Cloud instead of a self-hosted server, you also need **one** of:

**Option A: API Key**

```bash
TEMPORAL_API_KEY=your-temporal-cloud-api-key
```

**Option B: mTLS Certificates**

```bash
TEMPORAL_CLIENT_CERT_PATH=/path/to/cert.pem
TEMPORAL_CLIENT_KEY_PATH=/path/to/key.pem
```

### Quick Start Example

```bash
# 1. Install the package
pip install kubiya-control-plane-api

# 2. Set required environment variables
export TEMPORAL_HOST=localhost:7233
export TEMPORAL_NAMESPACE=default
export DATABASE_URL=postgresql://user:password@localhost:5432/control_plane

# 3. Run the worker
kubiya-control-plane-worker
```

The worker will connect to Temporal and start processing agent execution workflows.
