Skip to main content

ARK Python SDK

Python SDK for ARK - Agentic Runtime for Kubernetes. This SDK is part of the open source Agents at Scale ARK project.

This package provides Python bindings for managing ARK agents, models, queries, and other resources in Kubernetes. It is partly generated from the ARK Custom Resource Definitions (CRDs), with additional capabilities layered on top.

Installation

pip install ark-sdk

Usage

Kubernetes Resource Management

from ark_sdk import ARKClientV1alpha1
from ark_sdk.models.agent_v1alpha1 import AgentV1alpha1, AgentV1alpha1Spec

# Initialize client
client = ARKClientV1alpha1(namespace="default")

# Create agent
agent = AgentV1alpha1(
    metadata={"name": "my-agent"},
    spec=AgentV1alpha1Spec(prompt="Hello", modelRef={"name": "gpt-4"})
)
created = client.agents.create(agent)

# Get, update, delete
agent = client.agents.get("my-agent")
agent.spec.prompt = "Updated"
client.agents.update(agent)
client.agents.delete("my-agent")

Execution Engine Development

The SDK now includes utilities for building execution engines:

from ark_sdk import BaseExecutor, ExecutorApp, ExecutionEngineRequest, Message

class MyExecutor(BaseExecutor):
    def __init__(self):
        super().__init__("MyEngine")
    
    async def execute_agent(self, request: ExecutionEngineRequest) -> List[Message]:
        # Your execution logic here
        return [Message(role="assistant", content="Hello from my engine!")]

# Create and run the executor
executor = MyExecutor()
app = ExecutorApp(executor, "MyEngine")
app.run(host="0.0.0.0", port=8000)

Async Operations

# List agents asynchronously
agents = await client.agents.a_list()

# Create query asynchronously
query = await client.queries.a_create(QueryV1alpha1(...))

Execution Engine Types

The SDK provides common types for execution engines:

  • ExecutionEngineRequest - Request format for agent execution
  • ExecutionEngineResponse - Response format from execution engines
  • AgentConfig - Agent configuration structure
  • Message - Chat message format
  • BaseExecutor - Abstract base class for execution engines
  • ExecutorApp - FastAPI application setup for execution engines

Documentation

For full documentation and examples, visit the ARK project repository.

Requirements

  • Python 3.9+
  • Kubernetes cluster with ARK installed
  • FastAPI and uvicorn (for execution engine development)

Metadata

Release files for ark-sdk 0.1.71

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ark-sdk 0.1.71
File Interpreter ABI Platform
ark_sdk-0.1.71-py3-none-any.whl Python 3 none any Details

Release files / ark_sdk-0.1.71-py3-none-any.whl

Download URL ark_sdk-0.1.71-py3-none-any.whl
Size 250.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fda92d57d17baea587c2a233bcbc6cb5fb3cdc199908e0280d7c7a2f02a45b2
BLAKE2b-256 checksum
How to use checksums
5c7a3bbe29e67a404804895209b804ba47f04c05764fe34f1b5fb8feccf328f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.71 This release

1 release file

0.1.70

1 release file

0.1.69

1 release file

0.1.68

1 release file

0.1.67

1 release file

0.1.66

1 release file

0.1.64

1 release file

0.1.63

1 release file

0.1.62

1 release file

0.1.61

1 release file

0.1.60

1 release file

0.1.59

1 release file

0.1.57

1 release file

0.1.56

1 release file

0.1.55

1 release file

0.1.54

1 release file

0.1.53

1 release file

0.1.52

1 release file

0.1.51

1 release file

0.1.50

1 release file

0.1.49

1 release file

0.1.48

1 release file

0.1.46

1 release file

0.1.45

1 release file

0.1.44

1 release file

0.1.43

1 release file

0.1.42

1 release file

0.1.41

1 release file

0.1.40

1 release file

0.1.38

1 release file

0.1.37

1 release file

0.1.36

1 release file

0.1.35

1 release file

0.1.34

1 release file

0.1.33

1 release file

0.1.32

1 release file

0.1.31

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page