Starkite

Secure Runtime for Cloud-Native and Agentic AI Automation with Starlark

Get Started Starkite Core Starkite Cloud Starkite AI

Features

25+ Built-in Modules

File I/O, HTTP, SSH, JSON/YAML, string/text, concurrency, os, time, and more.

Kubernetes Native

Kubernetes primitives for first-class programmatic support: apply, deploy, scale, rollout, run, exec, and more.

Agentic AI

Build agentic workflows with MCP servers, multi-provider LLM clients, and tool calling.

Safe by Default

Scripts can be sandboxed with sensible defaults or fine-grained restriction policies.

Starkite examples

Starkite can help automate local tasks, work with Kubernetes workloads, build agentic AI workflows, and create HTTP/SSH clients and servers.

Aggregate system info from local machine into a JSON report

ops-report.star
#!/usr/bin/env kite

report = {
    "date":    time.format(time.now(), "2006-01-02"),
    "host":    os.hostname(),
    "uptime":  os.exec("uptime").strip(),
    "configs": [fs.path(f).name for f in glob("/etc/nginx/conf.d/*.conf")],
}

write_text("/var/log/ops-report.json", json.encode(report))
printf("report written for %s\n", report["host"])

Automate Kubernetes cluster operations

rollout.star
#!/usr/bin/env kite

k8s.deploy("web", "nginx:1.27", replicas=3, namespace="prod",
    labels={"app": "web", "tier": "frontend"})

k8s.expose("deployment", "web",
    port=80, type="LoadBalancer", namespace="prod")

k8s.wait_for("deployment", "web",
    condition="Available", namespace="prod", timeout="2m")

print("web is live")

Build MCP server for LLM tool calling

weather-server.star
#!/usr/bin/env kite

def get_weather(city):
    """Return the current weather for a city."""
    # Stub data — replace with a real weather API in production.
    forecasts = {
        "san francisco": {"temp_f": 64, "conditions": "foggy"},
        "tokyo":         {"temp_f": 78, "conditions": "sunny"},
        "berlin":        {"temp_f": 52, "conditions": "cloudy"},
    }
    return forecasts.get(city.lower(), {"error": "no data for " + city})

mcp.serve(
    name  = "weather",
    tools = [get_weather],
)

Run commands across an SSH fleet

fleet-uptime.star
#!/usr/bin/env kite

fleet = ssh.config(
    hosts=["web-1", "web-2", "web-3"],
    user="deploy",
    key="~/.ssh/id_ed25519",
    exec_policy="concurrent",
)

results = fleet.exec("uptime -p")
for r in results:
    status = "OK" if r.ok else "FAIL"
    printf("%s %-8s %s\n", status, r.host, r.stdout.strip())

Spin up a JSON API server

api-server.star
#!/usr/bin/env kite

def health(req):
    return {"status": 200, "body": {"ok": True}}

def echo(req):
    return {"status": 200, "body": req.body}

http.serve(
    {
        "GET /health": health,
        "POST /echo":  echo,
    },
    port=8080,
)

Built-in test runner with assertions

math_test.star
def test_addition():
    assert(2 + 2 == 4, "basic math should work")

def test_string_contains():
    assert("kite" in "starkite", "starkite should contain kite")

def test_list_length():
    items = ["a", "b", "c"]
    assert(len(items) == 3, "list should have 3 items")

Running Starkite Scripts

1. Run via the kite CLI

Pass any .star file to kite run (or use the implicit shorthand). Best for ad-hoc invocation, CI pipelines, and passing variables.

shell
$ kite run deploy.star

# shorthand — `run` is implicit
$ kite deploy.star --var image_tag=v1.0.0

# pipe results to other tools
$ kite manifest.star | kubectl apply -f -

2. Execute directly via shebang

Add #!/usr/bin/env kite at the top, mark the file executable, and run it like any other script — no kite prefix needed.

shell
$ cat deploy.star
#!/usr/bin/env kite
print("rolling out v1.0.0")

$ chmod +x deploy.star
$ ./deploy.star
rolling out v1.0.0

Script Security

Trust mode

Trusted scripts have access to all modules and host operations.

shell
$ kite run deploy.star            # script is trusted (default)

Strict permissions

Script functionalities are restricted with execution policies.

shell
$ kite run untrusted.star --permissions=strict
Error: permission denied: os.exec is not allowed

Quick Install

go install github.com/project-starkite/starkite@latest

Download from GitHub Releases

git clone https://github.com/project-starkite/starkite.git
cd starkite
go build -o kite .