Python SDK for Kestrel Workflows
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kestrel_workflows-0.11.0.tar.gz.
File metadata
- Download URL: kestrel_workflows-0.11.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f168bb5630b28d0d2280cb9bc8176612aa7f90c09faa4e3c074209f20b0eb63c
|
|
| MD5 |
91177fcd155fbe1f17a51b1a19aef89b
|
|
| BLAKE2b-256 |
ea64b5fb0b68983f1522805d67c17db6edddb3fbea0dc9bebc28872eb14ddcbe
|
File details
Details for the file kestrel_workflows-0.11.0-py3-none-any.whl.
File metadata
- Download URL: kestrel_workflows-0.11.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a32dac859e2ff7ae1ed74e4bd223f00aac60ea8ed0cb3b2b0c34c1f0360906
|
|
| MD5 |
1381da9e4a26da7e9d619949fecc475a
|
|
| BLAKE2b-256 |
bca8552715eb3a4edacd2bed59da54432cbf6c4e4df796b15fe2976e2dcfdd7a
|