Skip to content

KestrelAI/kestrel-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python SDK for Kestrel Workflows — typed builder pattern for programmatic workflow management

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages