Skip to main content

Python SDK for Kestrel — AI Agents for Cloud Operations

Project description

Kestrel SDK

Python SDK for Kestrel — AI Agents for Cloud Operations.

Build, deploy, and manage workflows programmatically with a typed, fluent API.

Installation

pip install kestrel-workflows

Quick Start

from kestrel import KestrelClient
from kestrel.workflows import Workflow, Trigger, Action

client = KestrelClient(api_key="kestrel_sk_...")

wf = (
    Workflow("Pod Crash RCA + Jira")
    .description("Run RCA on pod crash, create Jira ticket")
    .trigger(
        Trigger.k8s_pod_status()
        .reasons("CrashLoopBackOff")
        .namespace("production")
    )
    .cooldown(hours=24)
    .then(Action.kestrel_trigger_rca().label("Run RCA"))
    .then(Action.jira_create_ticket()
        .project("KAN")
        .title("{{incident.title}}")
        .priority("High")
    )
)

created = client.workflows.deploy(wf, activate=True)
print(f"Deployed: {created.id}")

Async Support

from kestrel import AsyncKestrelClient

async with AsyncKestrelClient(api_key="kestrel_sk_...") as client:
    workflows = await client.workflows.list()
    execution = await client.workflows.test(workflows[0].id)
    result = await client.executions.wait(execution.id)
    print(f"Result: {result.status}")

Authentication

Create an API key in the Kestrel platform under Workflows > API Keys.

# API key (recommended)
client = KestrelClient(api_key="kestrel_sk_...")

# From CLI login
client = KestrelClient.from_config()

# Async
client = AsyncKestrelClient(api_key="kestrel_sk_...")

Documentation

Full SDK documentation: docs.usekestrel.ai/workflows/sdk

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kestrel_workflows-0.3.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kestrel_workflows-0.3.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file kestrel_workflows-0.3.0.tar.gz.

File metadata

  • Download URL: kestrel_workflows-0.3.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kestrel_workflows-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ab0044195320928eeabec2bb53f116e6e91e25d7473827467f4061d476f8134f
MD5 44e2009c3a7146de76ea3e0f3d3696d0
BLAKE2b-256 36381a1a3f3cff929d78b8a1f6c7691daefd1a9a3ee4e16ee91c1a9801b5e3c7

See more details on using hashes here.

File details

Details for the file kestrel_workflows-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kestrel_workflows-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed3e2555302310731226ecb7463a3085d3253b2186a9eff8be4b4b06ccd86bd3
MD5 0538c2bd62ccdd72f05bacc345a3ab66
BLAKE2b-256 486ee818cfe163377a20f6428982d592ef8eb25230cab23615ec14c4ed2e5891

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page