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 executionExecutionEngineResponse- Response format from execution enginesAgentConfig- Agent configuration structureMessage- Chat message formatBaseExecutor- Abstract base class for execution enginesExecutorApp- 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.73
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ark_sdk-0.1.73-py3-none-any.whl | Python 3 | none | any | Details for ark_sdk-0.1.73-py3-none-any.whl |
Release files / ark_sdk-0.1.73-py3-none-any.whl
| Download URL | ark_sdk-0.1.73-py3-none-any.whl |
|---|---|
| Size | 250.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d70a79fcb2be8b9b395df98f44996085c1c7152caa89146889de79ee565c047b
|
|
BLAKE2b-256 checksum How to use checksums |
3494409195fde93625371ab04c985f3d9cf10a1925777452b7a95c08199007e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for ark-sdk 0.1.73
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.