ark-sdk


Nameark-sdk JSON
Version 0.1.37 PyPI version JSON
download
home_pageNone
SummaryPython SDK for ARK - Agentic Runtime for Kubernetes
upload_time2025-10-09 13:27:38
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords agentic-ai agents ai ark automation kubernetes llm mckinsey
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ARK Python SDK

Python SDK for ARK - Agentic Runtime for Kubernetes. This SDK is part of the open source [Agents at Scale ARK](https://github.com/mckinsey/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

```bash
pip install ark-sdk
```

## Usage

### Kubernetes Resource Management

```python
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:

```python
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

```python
# 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](https://github.com/mckinsey/agents-at-scale-ark).

## Requirements

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

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ark-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "agentic-ai, agents, ai, ark, automation, kubernetes, llm, mckinsey",
    "author": null,
    "author_email": "McKinsey & Company <dave.kerr@quantumblack.com>",
    "download_url": null,
    "platform": null,
    "description": "# ARK Python SDK\n\nPython SDK for ARK - Agentic Runtime for Kubernetes. This SDK is part of the open source [Agents at Scale ARK](https://github.com/mckinsey/agents-at-scale-ark) project.\n\nThis 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.\n\n## Installation\n\n```bash\npip install ark-sdk\n```\n\n## Usage\n\n### Kubernetes Resource Management\n\n```python\nfrom ark_sdk import ARKClientV1alpha1\nfrom ark_sdk.models.agent_v1alpha1 import AgentV1alpha1, AgentV1alpha1Spec\n\n# Initialize client\nclient = ARKClientV1alpha1(namespace=\"default\")\n\n# Create agent\nagent = AgentV1alpha1(\n    metadata={\"name\": \"my-agent\"},\n    spec=AgentV1alpha1Spec(prompt=\"Hello\", modelRef={\"name\": \"gpt-4\"})\n)\ncreated = client.agents.create(agent)\n\n# Get, update, delete\nagent = client.agents.get(\"my-agent\")\nagent.spec.prompt = \"Updated\"\nclient.agents.update(agent)\nclient.agents.delete(\"my-agent\")\n```\n\n### Execution Engine Development\n\nThe SDK now includes utilities for building execution engines:\n\n```python\nfrom ark_sdk import BaseExecutor, ExecutorApp, ExecutionEngineRequest, Message\n\nclass MyExecutor(BaseExecutor):\n    def __init__(self):\n        super().__init__(\"MyEngine\")\n    \n    async def execute_agent(self, request: ExecutionEngineRequest) -> List[Message]:\n        # Your execution logic here\n        return [Message(role=\"assistant\", content=\"Hello from my engine!\")]\n\n# Create and run the executor\nexecutor = MyExecutor()\napp = ExecutorApp(executor, \"MyEngine\")\napp.run(host=\"0.0.0.0\", port=8000)\n```\n\n### Async Operations\n\n```python\n# List agents asynchronously\nagents = await client.agents.a_list()\n\n# Create query asynchronously\nquery = await client.queries.a_create(QueryV1alpha1(...))\n```\n\n## Execution Engine Types\n\nThe SDK provides common types for execution engines:\n\n- `ExecutionEngineRequest` - Request format for agent execution\n- `ExecutionEngineResponse` - Response format from execution engines\n- `AgentConfig` - Agent configuration structure\n- `Message` - Chat message format\n- `BaseExecutor` - Abstract base class for execution engines\n- `ExecutorApp` - FastAPI application setup for execution engines\n\n## Documentation\n\nFor full documentation and examples, visit the [ARK project repository](https://github.com/mckinsey/agents-at-scale-ark).\n\n## Requirements\n\n- Python 3.9+\n- Kubernetes cluster with ARK installed\n- FastAPI and uvicorn (for execution engine development)",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python SDK for ARK - Agentic Runtime for Kubernetes",
    "version": "0.1.37",
    "project_urls": {
        "Bug Tracker": "https://github.com/mckinsey/agents-at-scale-ark/issues",
        "Documentation": "https://mckinsey.github.io/agents-at-scale-ark",
        "Homepage": "https://github.com/mckinsey/agents-at-scale-ark",
        "Repository": "https://github.com/mckinsey/agents-at-scale-ark"
    },
    "split_keywords": [
        "agentic-ai",
        " agents",
        " ai",
        " ark",
        " automation",
        " kubernetes",
        " llm",
        " mckinsey"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3bb1f507e96a615916032c79ccd603f71ed3de0e70ec2aa0283dfc7e680b9ce8",
                "md5": "ac5ba93a17607d92900dc174fd613fca",
                "sha256": "32a935fd2cbae1909608ee4e74b956e58317861658467bd7c793491a55c716c2"
            },
            "downloads": -1,
            "filename": "ark_sdk-0.1.37-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac5ba93a17607d92900dc174fd613fca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 192241,
            "upload_time": "2025-10-09T13:27:38",
            "upload_time_iso_8601": "2025-10-09T13:27:38.388803Z",
            "url": "https://files.pythonhosted.org/packages/3b/b1/f507e96a615916032c79ccd603f71ed3de0e70ec2aa0283dfc7e680b9ce8/ark_sdk-0.1.37-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-09 13:27:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mckinsey",
    "github_project": "agents-at-scale-ark",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ark-sdk"
}
        
Elapsed time: 3.56744s