> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kubiya.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubiya Python SDK

> Comprehensive Python SDK for programmatic access to the Kubiya platform

The Kubiya Python SDK provides programmatic access to the Kubiya Control Plane, enabling teams to manage organization-scoped resources such as Agents, Models, Skills, and the global Context Graph.

## Requirements

* **Python 3.8 or higher**
* pip or poetry package manager
* A Kubiya API key from the [Kubiya platform](https://compose.kubiya.ai)

<Tip>
  For installation instructions, see the [Installation Guide](/sdk/installation).
</Tip>

## Core Capabilities

<CardGroup cols={2}>
  <Card title="Control Plane Client" icon="network-wired" href="/sdk/control-plane-client-overview">
    Manage organization-scoped resources (Agents, Context Graph, Models, Skills)
  </Card>

  <Card title="Context Graph" icon="project-diagram" href="/sdk/context-graph">
    Query entities and relationships with intelligent search
  </Card>

  <Card title="Real-time Streaming" icon="bolt" href="/sdk/quick-start">
    Stream long-running operations and events from Control Plane endpoints
  </Card>

  <Card title="Production Ready" icon="shield-check" href="/sdk/installation">
    Error handling, retries, logging, and async support built-in
  </Card>
</CardGroup>

## Quick Example

```python theme={null}
from kubiya import ControlPlaneClient

# Initialize control plane client
cp = ControlPlaneClient(api_key="your-api-key")

# List organization resources
agents = cp.agents.list()

print(f"Agents: {len(agents)}")
```

## SDK Components

### Control Plane Client

The Control Plane Client provides access to organization-scoped services:

* **Agents**: manage agent records and executions at the organization level
* **Task Planning**: AI-powered task decomposition and planning
* **Context**: resolve entity context with inheritance across organizational layers
* **Context Graph**: query and resolve entity relationships
* **Models, Runtimes, Skills, Policies**: configure LLMs, runtimes, tools, and access controls
* **Workers, Secrets, Integrations**: manage infrastructure, credentials, and external integrations

[Learn more about the Control Plane Client →](/sdk/control-plane-client-overview)

## What You Can Build

* **Organization automation** — Manage agents and their executions across your enterprise
* **Context-aware applications** — Use the Context Graph to resolve entity relationships and make informed decisions
* **AI-powered task planning** — Decompose complex tasks into executable steps

## Getting Started

<Steps>
  <Step title="Install the SDK">
    ```bash theme={null}
    pip install kubiya-sdk
    ```
  </Step>

  <Step title="Use the Control Plane client">
    ```python theme={null}
    from kubiya import ControlPlaneClient

    cp = ControlPlaneClient(api_key="your-api-key")
    print(cp.agents.list())
    ```
  </Step>
</Steps>

[View detailed installation guide →](/sdk/installation)

## Architecture

```mermaid theme={null}
graph TB
    subgraph "Your Application"
        APP[Python Application]
        CPCLIENT[Control Plane Client]
    end

    subgraph "Kubiya SDK"
        API[Control Plane API Client]
        STREAM[Streaming Engine]
    end

    subgraph "Kubiya Platform"
        CP[Control Plane]
        RUNNER[Runtime/Runner]
        AGENT[Managed Agents]
    end

    APP --> CPCLIENT
    CPCLIENT --> API
    API --> CP
    CP --> RUNNER
    RUNNER --> AGENT
    STREAM --> RUNNER

    style APP fill:#E1BEE7
    style CPCLIENT fill:#B39DDB
    style CP fill:#2196F3,color:#fff
    style RUNNER fill:#4CAF50
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation & Setup" icon="download" href="/sdk/installation">
    Get the SDK installed and configured in minutes
  </Card>

  <Card title="Control Plane Client" icon="network-wired" href="/sdk/control-plane-client-overview">
    Access orchestration and graph services
  </Card>

  <Card title="Context Graph" icon="project-diagram" href="/sdk/context-graph">
    Query entities and relationships
  </Card>

  <Card title="Examples Gallery" icon="lightbulb" href="/sdk/examples">
    Browse real-world usage patterns
  </Card>

  <Card title="API Reference" icon="terminal" href="/sdk/api-reference">
    Complete API documentation
  </Card>
</CardGroup>

## Support & Community

* **Documentation**: [docs.kubiya.ai](https://docs.kubiya.ai)
* **GitHub**: [github.com/kubiyabot/sdk-py](https://github.com/kubiyabot/sdk-py)
* **Issues**: [Report bugs and feature requests](https://github.com/kubiyabot/sdk-py/issues)
* **Community**: Join our Slack community for support and discussions
